DIP9 - Intensity Transformation Functions Using MATLAB
DIP9 - Intensity Transformation Functions Using MATLAB
f g
Function imadjust
Examples
• Cont. Example1:
g = imcomplement (f);
Function imadjust
Examples
• Example2:
f g
Function imadjust
Examples
• Example3:
f g
Function imadjust
Examples
• Example4:
f g
Logarithmic Transformations
• The shape of logarithmic function curve, is similar to the gamma
curve where gamma < 1, where low values set to 0 and high values
set to 1 on both scales.
gs = im2uint8 (mat2gray(g));
f g gs
Contrast-Stretching
Transformation
The function shown in the figure below, as indicated in lecture 8, is called a
contrast-stretching transformation function, because it compresses the input
levels lower than m into a narrow range of dark levels in the output image.
Similarly, it compresses the values above m into a narrow band of light
levels in the output. The result is an image of higher contrast.
The limiting case shown below (b), shows the output of a binary image. This
function is called Thresholding, as mentioned earlier. Thresholding, is a
simple tool that can be used for image segmentation.
Contrast-Stretching
Transformation
• The function takes the form of: