Mechatronics Department
Mechatronics Department
Mechatronics Department
Fourth Stage
Image processing
Date : 23/6/2020
Introduction:
A black and white image means that the image has the maximum
range up to 2 n , starting from 0 to 2n (where n is number of bit / bits
in one pixel).This is also called a gray scale image. Black and white
image has pure black means 0 up to pure white means 2n . for
example- if one pixel have 8 bits than the values are in between 0
(pure black) to 255 (pure white).The BW (Black and White) image
and Binary image both are different with each other as we can see in
the following images.
2.Binary image :
A binary image is a digital image that has only two possible values of
each pixel. Typically, the two colours used for binary image are black
and white, though any two colours can be used. The colour used for
the object(s) in the image is foreground colour while the rest of the
image is the background colour. Binary images are also called bilevel
or two-level. This means that each pixel is stored as a single bit i.e., 0
(black) or 1 (white).
3.Negative of an image:
4. Brightness of an image:
5.Edge detection:
Some equations that are used in the programming are given below:
global im im2
[Path]=imgetfile();
global im
a=im2bw(im);
global im
imgray=(im(:,:,1)+im(:,:,2)+im(:,:,2));
4. For sliders:
val=2*get(hObject,‟value‟);
ibt=im2+val;
c==(im(:,:,1)+im(:,:,2)+im(:,:,2))/val;
Ex. for Negative of an image
a=imread('C:\Users\Sajad
hbeeb\Desktop\CAD.CAM/Capture10.jpg');
[m,n]=size(a);
for i=1:1:m
for j=1:1:n
b(i,j)=255-a(i,j);
end
end
subplot(1,2,1),subimage((a))
subplot(1,2,2),subimage((b))
REFERENCES