matleb

lynxherringΤεχνίτη Νοημοσύνη και Ρομποτική

18 Οκτ 2013 (πριν από 4 χρόνια και 25 μέρες)

104 εμφανίσεις

Digital Image P
rocessing

& Machine Vision (MC 705)

06MC44



U.V.Patel College O
f Engineering
, Ganpat Vidhyanagar



AIM
:
-
Make a program to make use of command imshow & imread.


Program
:
-

a=imread
(
‘bacteria.tif’
);

% It read the image
.

F
igure



%
Create
New
figure window.

imshow
(a)
;



% It shows the image.

title(‘Bacteria’)
;

c=imread
('saturn.tif');

figure

i
mshow(c
)
;

title(‘Saturn)
;



Output
:
-

















DEPARTMENT OF

MECHANICAL & MECHATRONICS ENGINEERING


Shri. U.V.Patel College of Engineering, Ganpat Vidhyanagar

Sub
: Digital Image Processing & Machine Vision (MC 705)


Exp No
:
-
03







Date
:
-

/
/2009

Digital Image P
rocessing

& Machine Vision (MC 705)

06MC44



U.V.Patel College O
f Engineering
, Ganpat Vidhyanagar



DEPARTMENT OF

MECHANICAL & MECHATRONICS ENGINEERING


Shri. U.V.Patel College of Engineering, Ganpat Vidhyanagar

Sub
: Digital Image Processing

& Machine V
ision

(
MC
705)


Exp No
:

-
04







Date
:
-

/ /2009


AIM
:
-

Make a program to illustrate to use of command subplot.


Program
:
-

a1=ones(300,300)

%
Create matrix with all value 1
.

r=1:1:100;

c=1:1:100;

a1(r,c)=0;

subplot 221


%
Create axes in tile
d positions

imshow(a1)
;

title('F
irst image')

a2=a1;

r=200:1:300;


% Create vector.

c=200:1:300;

a2(r,c)=0;

subplot 222

imshow(a2)
;

title('S
econd image')

a3=a2;

r=200:1:300;

c=1:1:100;

a3(r,c)=0;

subplot 223

imshow(a3)
;

title('T
hird image')

a4=a3

r=1:1:100;

c=200:1:300;

a4(r,c)=0;

subplot 224

imshow(a4)
;

title('F
orth image')






Digital Image P
rocessing

& Machine Vision (MC 705)

06MC44



U.V.Patel College O
f Engineering
, Ganpat Vidhyanagar



Output
:
-

















Digital Image P
rocessing

& Machine Vision (MC 705)

06MC44



U.V.Patel College O
f Engineering
, Ganpat Vidhyanagar



DEPARTMENT OF

MECHANICAL & MECHATRONICS ENGINEERING


Shri. U.V.Patel College of Engineering, Ganpat Vidhyanagar

Sub
: Digital Imag
e Processing

& Machine V
ision

(
MC
705)


Exp No
:
-
05








Date
:
-

/ /2009


AIM
:
-

Make a program to illustrate to use of command imcrop.

Program
:
-

a=imread('rice.tif');

b=imread('cameraman.tif');

subplot 221

imshow(a);

title('Original image');

c=imcrop(a,[100,100:200,200]);

%
Crop image.
.

subplot 222

imshow(c);

title('Crop image');

subplot 223

imshow(b);

d=imcrop(b);




%Dynamic crop.

title('Original image');

subplot 224

imshow(d);

title('Crop image');


O
utput
:
-


Digital Image P
rocessing

& Machine Vision (MC 705)

06MC44



U.V.Patel College O
f Engineering
, Ganpat Vidhyanagar



D
EPARTMENT OF MECHANICAL & MECHATRONICS ENGINEERING


Shri. U.V.Patel College of Engineering, Ganpat Vidhyanagar

Sub
: Digital Image Processing & Machine Vision (MC 705)


Exp No
:
-
05







Date
:
-


/ /2009


AIM
:
-
Make a program to illustrate use of command imhist and
produce a

histogram.

Program
:
-

a=imread('cameraman.tif’
);

imshow(a);

subplot 122

[count,g]=imhist(a);


%
Display histogram of image data.

plot(g,count);

xlabel('gray level');


%
X
-
axis label.

yl
abel('No of pixel');

%Y
-
axis label.

title('histogram');

subplot 121

imshow(a);

title('Original Image');


Output
:
-



Digital Image P
rocessing

& Machine Vision (MC 705)

06MC44



U.V.Patel College O
f Engineering
, Ganpat Vidhyanagar



DEPARTMENT OF MECHANICAL & MECHATRONICS ENGINEERING


Shri. U.V.Patel College of Engineering, Ganpat Vidhyanagar

Su
b
: Digital Image Processing & Machine Vision (MC 705)


Exp No
:
-
05







Date
:
-

/ /2009


AIM
:
-
Make a program to

make image negative to learn
command im
2double

and
abs
.


Program
:
-

a=imread('
C:
\
Documents and Settings
\
tarun
\
Desktop
\
tree.jpg
');

subplot 121

imshow(a);

title('Original Image');

r=im2double(a);


%
Convert image to double

datatype
.

s=r
-
1;

s=abs(s);



%

Absolute value.

subplot 122

imshow(s);

title('N
egative image');


Output
:
-




Digital Image P
rocessing

& Machine Vision (MC 705)

06MC44



U.V.Patel College O
f Engineering
, Ganpat Vidhyanagar




AIM
:
-
Make a program

for histogram equalization.

Program
:
-

a=imread('pout.tif');

subplot 222

[count,g]=imhist(a);

plot(g,count);

xlabel('gray level');

ylabel('No of pixel');

title('H
istogram');

subplot 221

imshow(a);

title('Original Image');

b=histeq(a);



%
Enhance contrast
using histogram equalization

subplot 223

imshow(b);

title('E
quilize Image');

subplot 224

[count,g]=imhist(b);

plot(g,count);

xlabel('gray level');

ylabel('No of pixel');

title('H
istogram equilization');












DEPARTMENT OF

MECHANIC
AL & MECHATRONICS ENGINEERING


Shri. U.V.Patel College of Engineering, Ganpat Vidhyanagar

Sub
: Digital Image Processing & Machine Vision (MC 705)


Exp No
:
-
08







Date
:
-

/
/2009

Digital Image P
rocessing

& Machine Vision (MC 705)

06MC44



U.V.Patel College O
f Engineering
, Ganpat Vidhyanagar





Output
:
-