Ignore:
Timestamp:
04/14/03 17:54:32 (21 years ago)
Author:
tbretz
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Cosy/videodev
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Cosy/videodev/Filter.cc

    r1531 r1959  
    203203}
    204204
     205void 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}
  • trunk/MagicSoft/Cosy/videodev/Filter.h

    r1111 r1959  
    2929public:
    3030    static void Execute(byte *img);
     31    static void Stretch(byte *img);
    3132
    3233    ClassDef(Filter, 0)
Note: See TracChangeset for help on using the changeset viewer.