Image Processing Reference
In-Depth Information
3. Histogram of an image A
imhist(A)
4. Histogram equalization
histeq(A)
5. Cropping an image, A, from a coordinate point of dimension
'dim' - A small portion from the image is cropped.
imcrop (A,[x y [dim dim])
6. Rotating an image by 30°
imrotate (A, 30)
7. Convert to unsigned 8-bit integer. The command (uint8)
converts a matrix into an unsigned 8-bit integer. B can be
any numeric object such as Double. The elements of an UINT8
range from 0 to 255. The result for any element of B outside
this range is not defined and they are either assigned to 0
or 255. It is written as
C = uint8(B)
8. Finding the edges of the image. There are many edge
detection operators such as  Roberts, Sobel, Prewitt,
Laplacian of Gaussian(LoG), Canny. An example using Prewitt
edge detector  is as follows:
A = imread('cameraman.tif');
EIM = edge(I,'prewitt', thresh);
imshow(A), figure, imshow(EIM)
9. To convert an image to a binary image
BIM = graythresh(A)
10. Converting a RGB color image to gray image
rgb2gray(a)
11. Performing morphological operators on the binary image.
There are many operations such as erode, dilate, thin, and
open remove. An example of “thin” an image is shown.
A = imread('cameraman.tif');
imshow(A)
IM1 = bwmorph(BW1,'dilate');
figure, imshow(IM1)
5.6.1 Examples Using MATLAB
A MATLAB code for image enhancement is given which will be beneficial to
the readers to implement the method.
1. Type II fuzzy image enhancement using Hamacher t-conorm
image=imread('knee.jpg');
b=rgb2gray(image);
dim=140;
c=imcrop(b,[1 1 dim-1 dim-1]);
d=double(c);
mx=max(max(d));
mn=min(min(d));
Search WWH ::




Custom Search