Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Image Image :: increasecontrast ()
- {
- int min_value=255;
- int max_value=0;
- for (int i=0 ; i < height ; i++)
- for (int j=0 ; j < width ; j++)
- {
- if (image [i][j] < min_value)
- min_value = image[i][j];
- else
- min_value=min_value
- if (image [i][j]> max_value)
- max_value =image [i][j];
- else
- max_value = max_value
- }
- double m = 255.0 / (max_value - min_value);
- double c= -m * min_value;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement