200 likes | 305 Views
Digital Image Processing. Part 2 Contrast processing. Brightness and Contrast. Grey scale and histogram of pixel values. Dark and Light Images. Low Contrast. To lighten or darken, shift the distribution left or right To increase contrast, stretch the distribution over a wider range.
E N D
Digital Image Processing Part 2 Contrast processing
Brightness and Contrast • Grey scale and histogram of pixel values
Low Contrast To lighten or darken, shift the distribution left or right To increase contrast, stretch the distribution over a wider range
Good Contrast • Almost full dynamic range used. Could contrast stretch slightly
Contrast stretch • Histogram towards right so bright • Width narrow so low contrast
Contrast stretch limitations • Subjective so needs human judgment • Best enhancement not always linear • May need to do brightness shift first • Sometimes need an automated method • Can be slow if each point is calculated so use look-up table to speed-up processing
Histogram equalisation • Simple image with up to 10 brightness levels • Plot histogram
Process • Determine the frequency of each pixel level • i.e. distribution as on histogram • Determine the cumulative frequency • How many pixels at level n plus all previous levels • Determine new mapping function • Map old values to new values using the new mapping function
Worked Example • Count the number of pixels at each level and create a frequency column
Cumulative frequency is the sum of the pixels at the current level and all previous levels
New Pixel Levels • Old levels (Level) are converted to new levels (F(g)) • New histogram plotted from new distribution (New)
Advantages and Disadvantages • Does not need human intervention so can be used in systems which need automatic image enhancement • Sometimes it makes a good job but not always • It will improve contrast for imaging systems but may not always produce an image which is pleasing to the eye