Changeset 1959 for trunk/MagicSoft/Cosy/videodev/Filter.cc
- Timestamp:
- 04/14/03 17:54:32 (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/MagicSoft/Cosy/videodev/Filter.cc
r1531 r1959 203 203 } 204 204 205 void Filter::Stretch(byte *img) 206 { 207 const int offset = 10; 208 209 int max; 210 int min; 211 212 /*const float mean =*/Mean(img, offset, &min, &max); 213 214 for (int x=0; x<768; x++) 215 for (int y=0; y<576; y++) 216 { 217 img[y*768+x] -= min; 218 img[y*768+x] *= 255/(max-min); 219 } 220 }
Note:
See TracChangeset
for help on using the changeset viewer.