4. FUNCTION imadjust
g = imadjust(f, [low_in high_in] [low_out high_out], gamma)
SYNTAX
low_in low_out
high_in high_out
MAPPING
Input Image (f) Output Image (g)
BRIGHTER
OUTPUT
DARKER
OUTPUT
LINEAR
MAPPING
DEFAULT VALUE OF GAMMA IS 1
5. FUNCTION imadjust
Adjust Contrast of Grayscale Image
Adjust the contrast of the image so that 1% of the data is saturated at low and high intensities, and display it.
6. FUNCTION imadjust
Adjust Contrast of Grayscale Image Specifying Contrast Limits
Adjust the contrast of the image, specifying contrast limits.
12. FUNCTION imcompliment
g = imcomplement (f);
SYNTAX
Input Image (f)
Output Negative
Image (g)
IMCOMPLEMENT
In the complement of a binary image, zeros become ones and ones become zeros;
black and white are reversed.
16. LOGARITHMIC TRANSFORMATIONS FUNCTION im2uint8
gs = im2uint8 (mat2gray(g));
SYNTAX
mat2gray brings the values to
the range [0 1]
im2uint8 brings them to the
range [0 255]
Convert Image To 8-bit Unsigned Integers.
19. CONTRAST-STRETCHING TRANSFORMATION FUNCTION
g = 1 ./ (1+ (m./(double(f) + eps)) .^ E)
SYNTAX
Expands a narrow range of input levels
into a wide (stretched) range of output
levels.
The result is an image of higher contrast.
Convert Image To 8-bit Unsigned Integers.
30. SPATIAL FILTERING
Spatial filtering is a technique that uses a pixel and its
neighbors to select a new value for the pixel.
Linear Spatial FilterEXAMPLES
31. FUNCTION imfilter
SYNTAX
g=imfilter(f, w, filtering_mode, boundary_options, size_options)
f is the input image
w is the filter mask
filtering_mode -- correlation(‘corr’) or convolution (‘conv’)
boundary_options -- border-padding issue
size_options -- ‘same’ or ‘full’
‘full’: The output is of the same size as the extended (padded) image.
‘same’: The output is the same size as the input. This is the default.
32. Apply the filter to the original image to create an image with
motion blur
originalRGB = imread('peppers.png');
imshow(originalRGB)
h = fspecial('motion', 50, 45);
filteredRGB = imfilter(originalRGB, h);
The output is an array of uint8.
FUNCTION imfilter