|
|
|
|
|
by abecedarius
3749 days ago
|
|
Does this help any? Say we're looking at a grayscale image, where each pixel has a value between 0.0 and (just less than) 1.0. Sort all the pixel values, then scan them from lowest value to highest. The pixels with the lowest value in the image get reassigned the value 0; and in general, a pixel that's brighter than k of the other pixels, out of n total, gets changed to intensity k/n. This spreads the intensities as evenly as we can. (Which might not be so even, for example if all of the input pixels were the same intensity to start -- then this just changes them to 0!) Maybe the image is, say, 8-bit grayscale, so the values can range from 0 to 255 instead -- then it'd be floor(k/n times 256). This is usually described in terms of a cumulative description function; I tried to say the same with less jargon. |
|