0% found this document useful (0 votes)
11 views51 pages

Image Processing

Uploaded by

rfan49970
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
11 views51 pages

Image Processing

Uploaded by

rfan49970
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 51

‫‪www.newbook.

ir‬‬

‫‪www.MatlabKar.com‬‬ ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر ‪ -‬ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬
www.newbook.ir

' !% & #$ " !


& (-. ) ,& $ + # (* ! () &
# ' # 12 /% & + ( 12 *0 "# / # #!
$ '* 3 '(*: ' "# ' % !3 ! 2 " 8 $ 96 ((! 7 56 & 3 4 .
' ' . # + ( ! ?@ # A% & > # ) * ) 4 ( = ; , 7 # 2< % &#
' # '7 B ' #3 4 .# ! # 2< !C # # " 7 (D 3 2< B *! !
/ &

" '. #G ! !% & 0( . F( A3# " . E >Computer vision= " # (


A K '( AL ' '( ' # '. ' # (' IJ
5D " .#9 >Image processing= H
/ 2< 3 M N (* . C #

Q S 3 (0 / B # L % ?@ R # 8@ O P QL O P

/> #7 7 =3 7 U & " -T


/ .VE0 # 2< % DW .3 - M # N &(
/3 . .3 - " D & % ?@ + *P

Q S 3 (0 /I. & % " D3 # ( " " ) Q" )

/ # # 9! B # ! )(. O P B " )

Q S 3 (0 /C 7 R B B + & Q X( -

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

'6 M # B " # G + # !" B *! @ B + &


/

S 3 (0 / # ( 8 0 3 (0 + # %!@ 3 E 3 !O 7 Q 3E

/ B 3 # M #B -

" # ( ". &

Q ! I -; ". & 3 #" # ( 0 &B

"#
YZ '*D / > 6 & A# ?A# # A+ # ="# &B ?1
/ I X( & $ "# &

$
` 9 ' $ . != 6 $ . ! + _ ./ # W + ] ^& *0[\ D # A $ #
3 ". #" #! Y0 # ! + /% & . 5! # ; 3 !I! >9 () & 3 ! T
Q ( / > =

Ac '& ')5*0 A - 9b? ^ " . 56 . ) -1*. A .$ a A " . 56 *0 A " *


A c 1e B A 5-E " &< A d ^; A> 3 Z *@ =
Y 3 1& 7
A ' ' (' I'. "# # + *P ! 57 " . @ " % ! @ + *P A # 6c 1
/ W (4 c 57 ( -T # -*. + *P

, ' 3 4 g ! A% & . e " 0* . 3 $ .! e f P& _ .


/+ # % DW A" #

/ 1?" &# E <


/" ". e f P&

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

/ 6#h " . ; $ 4 f P&


/$ * " . N #i Y
Z *@ H ^ 3 # <% &

% 1j
') B ' # ( -T " . e % 0* ". e 3 K ( "# W % 1j _ .
# '! + ' # '(4 / '&# 2 6B % 1j # /% & 51W ". e R ".
Q M # 10

/M D + *! + *P
/3 # k .c 1
/ & (. " &I.#
/" #l 3 ?

! "# $
% ! &

A !O P 3 * ) _ : (Computer Vision) + ( _ :B + P
(High level) Z ' ] ^'& (Mid level) ' ] ^& A(Low level) + ] ^& &3 @+
/ O P

% '& (! '12 A9 _ i@ " . $ ( ". c + ] ^&


3< T " # !% & + + P /% & 3 ! 56 (Contrast)
/ (-.
@ ' ' 3< I -; # X( (Image Segmentation) " ($ P c ] ^&
L' O P " ( ;1: ( G&( n! " ! 6 L m N Am 5P L
L' 'N 3< 'T Z *D 3< " # ! % & + + e /% & m 5P
/% & L O P .# ! A . 1? (

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

-' H 1'& A (Making sense) O P L + , # 3 *26 c Z ] ^&


" '. ' "# - / . 3- ( I- & !% & .O P - (7N
/ # W+ ( ^ @ # Z ] ^&
A+ ' " @ @ 3 ! O P " / ) X # #+ B O P I-&B S#:
' o 7 ^ @ # . !# ! 3< O P m 5P . !# ! f P & Ac N @ $
/ # W 9?< + ( ^@ # X # + " 7 2 H 1& / # # W

Low level Mid level High level


(Preprocessing)

Image Image
Restoration Segmentation Representation
& Description
Image Image
Acquisition Enhancement
Description of the Performing the
Objects cognitive functions
Image
(edges, contours, (Like human
Compression
objects) vision)
& Coding

"# $ % & ' !

# '^; '. # f # ; E M P # Y X 3< # ! f(x,y) " D d ,& 3 # B


!' ' (' # M ' ' 9 " -! ] ^& p q ^N . ( ^; 3<# ( #M
. cE " D " D 9 )# . rq :
' ? B # A3 3 7 -- ; f(x,y) # ; Y X ; !
. ( quantization # f(x,y) # ; 3 ! Sampling # Y X ;3 ! / (
'N (0 A 'N (0 + ' /% & cE m 5P % DW # ; 7 N (0 " D ? B
/ (Pixel) c -E (Picture element)
n '! '& ' ?' B " # m 5P " . *0 (D ?
/% & ?

& ' ! ( )

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

/ I '(! ' '& # 3 & N ^& M ! >V =" D #< B M*N B $ *"
I. " & ! D * # /% & ^; 3< # ( #M (. 3 #< (0 . # ;
'(. 3 N # ;/ uvv t + "# ; !% & s# ; B #< (0 . A !
.% & > &=+ # w # (. 3 uvv # ; > &= w #
# * x ? / (x,y)=(0,0) Q m D M#N 1A "2 ! "# - #
(. 3 # c -E B 3 & # * y ? ^&
' m D M#N 1, 7 + # A * 0 . # ? V Matlab # E( c ?
(r,c)=(1,1) Q

/ m D Matlab , 7 # V B 3 (0 M# N +

! *!

V ' ' '& / (-. - w # 1DT V Z *D


Y ( V B c Matlab #
Q - 5P " .M # N ! . ! # T "
>Indexed= "#i V '
>Intensity= w # M '

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

RGB '

Q -,. /+ , `
l X # c -E w # # * 3< " . # !% & " D " #< "#i V B dW #
# '.V ' M # 'N ' # ". # w # 1DT B A "#i V B /
c M×3 3< " !% & # & w # 1DT B Aw # 1DT V / (! - w # 1DT V
Acmap w '# 1DT " #< % & H ! X(i,j) " " #< " x# /% & RGB 1W c W ;
'0 AX '; '! % '& + ) ^ #+ ! O P cmap(X(i,j),:) c -E .w #
Q $ * # & & 3 # + /% & [1 length(cmap)] " # 7 7N
image (X);
colormap (cmap)

RGB '
& . RGB ) # I - & # S#: / cE " D (4 G ! A )#
%& cE < 91& A9 W ?

B
Cyan
Magenta
White

Black
G
R Yellow

Q0 1 ,. `
'T '^; . " 9 W 91& < 5N w # ) # T# " 0 % ?@ # I ! . ! # ^ *.
% ' 6+ ' ' '# / (! b c N @ w # A 5N ? .M 3 I! ! #
Yq S' AI' # ') # 7 B O P Z *D
Y # ! % & + % 50 y% - G & ( q N
# -' "# '! 'E( ' % - + E* 5N w # G ! )# 7 + + 6 % ?@ + # A # w #
/% & 0 WU & # T ( + # !" ) # I- &/ %W #

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

Q# T P w # ."

' # c * 9 W w *! < S 3 (0 / w # ((! O P ! Q >Hue= w # `z


///

I! , ;6 % & % j3< l% . w # I! w # w # . Q > Saturation= w # M `u


%& w # w #

' b 3< # ! (! + D #w #M ?| + Q >Intensity= w # ( # `{


+ '( / ' ' '& c * Y1 ; 6# #w #A I! # S 3 (0 / (!
HSI Y@q ^'N )# @+ /% & m Dc W 3- I 4 6 2? ! w # " T @
Q (! 3 ? + T #w #M b# * c E /% &Z *5! m P !

9 W < T# < 91& T# 91& 9 W (D A% & bc W + H


/% 0 & " . ;0 % ! @ % 2T _ q # T#

> =w # > = w # I! !% & bc W + S

> =+ # > =B # (D A (! b 0 I

Q # !i @ # .w # * (4

HSI ; RGB ; w #

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

&
&
9 W
91&
<
" 2W

% 6 B + S 3 (0 + (/ HIS I - & D Y;W 9 HSV I - & 3 ! # !


/% 6 " # # X # ".w # H ;3E @# 3 HSV

,2 34 5 3.

+ ' D H '; ! I&# M P " .# 7 " # # . ". #< " 0 * c E I&# d + plot
/ (! c ) E I ;- H ^ & #
x=linspace (0,2*pi,30);
y=sin (x);
plot(x,y)
!y #" ) # & ## * ;6 # 7 0 x 2 " # ^; Ar 6 S#
' # '2< H ; I&# D / (! I&# # * " # #H ; (! x # H ; 3< U (& c
/ (! c ) E % &#H ^
/ ! I&# # * B " # # , (7( (4 3
z =cos(x)
plot(x,y,x,z)
/ (! 3# T# " I. # * . b # .3 #< G a (4
plot(x,y)

@ :; < =>?9 6!78 *!

(! ) # # 2< E #! #: Matlab I (! # * B # # (7( !I c 1W S #


'(9 + ' / '! + ' D 'P? # (7( + w # 3 (! & #!+ " 91& < " .w #
/ T ! # ! (4 B c ! " !# ! # B "#
' '< w # MatlabA (! & \ 6$ " .w # (E O P A # * I&# " # )#
/ (! & T# T " D " .w # G A# * , .3 6 !

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

\ '6 $ ' % ?@ Ixq 0 " / , A * \ 6$ , A E O P #, ! #N #


/ * I&# I. q0A E O P # q0 /# T

, * Ixq 0 * w # *
+ 4 ^; Q ^; < b
+4, `` 91& g
d*T % q 0 } 9 W r
#& " 6 c
d s g# m
# % q0 x # y
"# d & k
+ # o 5S x & w
Z # o 5S ^
~4 # o 5S <
% &# # o 5S >
•( # & p
$ #& h

/ #! % q0 , " X # w # #B # # % q 0 Aw #
plot(x,y,'b:p',x,z, 'c-',x,1.2*z, 'm+')
title ('figure 25.4:linestyles and markers')

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

Q B $% 1 C D2A 9 !) , 5 ,A

/ & D6"# T # * " #M P " .# 7 H " E1 H ^ # & + grid on


/ 3< 3 D6 g o 0 grid off
H '^ 1 D6 C D6 E1 H ^ A (! & #< € . 3 grid # &
/ 6 r 6# * E1
/% & D6 grid off % ?@ \ 6$ #:
+' / ' ' ' M P " .# 7 1DT 2< ! 6 # : ^ ,& " D " .# 7 Z *D
/ '(! D6 # M P " .# 7 • box on # & / (! D6 g box off # & & # 1DT
/ (! D6 # 3< D6 g ! D6 g # 3< D6 M P " .# 7 1DT box # & " T
/ . # WG -4 M P " .# 7 " M # & + & ylable,xlable
/ . # W# * "Z # # 3 (0 title

y=sin(x);
z=cos(x);
plot(x,y,x,z);
box off
xlable ('indcpendent variable x');
ylable ('dcpendent variable y and z');
title ('figare 25.5:sine curves,no box');

# '& / ' . # 'W # * ] ^& " # X # c 7 # # 1-4 + text d & text


G -'4 + ~ 4 % *& M P (x,y)3< # ! # W & # text (x,y,'string') M # N text
/ . 3 M P " .# 7 " # T @
grid on
box on
text(25,0.7,'sin (x)')

U ' (! & X # c7 M P . * ? (! 6 # * # 1-4 . P


" # # D: '; H '^ Vn'& ‚ . T# "# T figare ( # (! gtext('text') d / . ##!+
# ' 5! 7 'N " 5! U 5! ! T . T TU %!@ ! . # W "# T 7 N
/ . # W <# # X # + . # 6

Q1 C !EC - ! & F

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

' " '*0 ';6 " '.# 7 $ * " 7 " ( T# " # 5 ! (! axis # & &
/
(E I X( # "# T # * M P " .# 7 7 axis [xmin xmax ymin ymax]
" .# 7 " . 7 c ! # " ^& "# X=axis
% & "# T
. # W\ 6$ % ?@ #M P # 7 " ( T# Axis outo
# ; ! # ) % j#M P " .# 7 " ( T# Axis manual
+ *. I. 3< # " .# * A on hold
/ ((! & M P " .# 7 7
I&# " . #M P #7 7 Axis light
. # W
(! I X( # : " .% 1- M P #7 7 Axis fill
O P "86 * M P #7 !"
! (! #! , ;6 (9 + / (! #
data aspect ratio mode plot box aspect ratio
/ manual M # N

x = linspace(0.2*pi , 30);
y = sin(x);
plot (x,y);
axis( [0 2*pi -1.5 2])

" ' ‚% & c E # - axis & A . b # 7 B " # , ;6 # M P " .# 7 " 7 ! )(.


/ (! & ylim xlim d Matlab c E + c@

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

o '0 hold on # & / ! 6 T # * #" T " .# * 3 hold # & & Q Hold


" ' "# 'T figure ' ( hold off # '& " 'T ' / 6 "# T # * T " .# * !
' on "# T % ?@ ) < A (! T #< € . 3 # hold # & / C A T " .# *
/ c 1 on off off
x = linespace(0,2*pi , 30);
y = sin (x);
z = cos(x);
plot(x,y);
hold on
ishold
ans=
1
plot (x,2,'m');
hold off ;
ishold
ans=
0
Figure -'
I'&# '2< ! .# 3 ". # # 5P " . 0* * " D ". (3
# File New Figure E( A (! & Command # & A T figure " . ( " / !
/ (! T
/ . # # ! + *. 9 Close # & 1? / (! _ i@ # 2< figure " . (+ -

clos ( # "# T figure (


close(h) (( # h # * figure (
close all ( # figure " . ( *

/ (! & clf # & (! C 3< _ i@ 3 # figure (M 7 .


clf (! C # "# T (M 7

!)

subplot(m,n,p) # & / # ) # #M P " .# 7 0* B $ figure (B


' '(! ƒ P D6 @ 3 (0 #p @ (! I -; # * I&# @ m*n # "# T figure (
Q S#:

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

x = linspace(0,2*pi,30);
y = sin (x);
z = cos(x);
subplot(2,2,1)
plot(x,y);
axis([0,2*pi ,-1,1]);
subplot(2,2,2)
plot(x,z)
axis ([0,2*pi, -1 , 1]);

'! ^ ." # x*(. # + 3< & ! (! # * " # # x*(. # 1DT Legend


/ (! _ i@ # *(. # 1DT legend off # & / (! # # W# * " #
x = linspace(0,2*pi,30);
y = sin (x);
z = cos(x);
plot(x,y,x,z);
legend('sin(x)' , 'cos(x)');

/ x*( #9 % ?@ Zoom out


. # 6#U % & # % *& 5! k #9 # * AU ~ 4 % *& 5! 3 # 6
/ m "# T *( #9

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

/ . 3 #9 1 n # # * Q Zoom(n)
/ (! D6 g # x*( #9 % ?@ Q Zoom off

G -@ ! # D5 (4 B Fill(x,y,'c') # & / ! & Fill d 3 D5 (4 B 3 ! w # "


/ (! w ## O P c w # x,y & " .#

t = (1:2:12)*pi / 8;
x = sin(t);
y = cos (t);
fill (x,y,'r');
axis square off

B 'b '; "# ' a 3< # ! (! E! # & " .# * pie(a,b) d &


/ (! m N #A # <3 E!# * %- ! x. „ W „ W ! % & "# ;^( #
a = [.5 1 1.6 1.2 .8 2.1 ];
pie (a,a = = max(a));

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

y # '7 " # 5P " .U ; & M P #7 B " # # m 5P d %& 2 dW


/ . # # ! + Plotyy d AI (! I&#
x = -2*pi : pi /10 : 2*pi;
y = sin(x);
z =3*cos(x);
subplot(2,2,1);
plot(x,y,x,z);
subplot(2,1,2);
plotyy(x,y,x,z);

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

"< Matlab ! G 4H !;%

JPEG, TIFF, GIF, BMP, PNG, HDF, PCX, XWD, " .% 6 E6 " .c 6 Matlab •
" 8 '6 ' cameraman.tif ' ' " 3 ! # " qS /
Y P E6 c 6 3 (0 # ICO, CUR
QI (! & imread # & %& 6 ! Matlab

MyImage = imread('cameraman.tif','tif');

# ' ' '(D / ' U & c W " . #$ # & ! 56 ! T


& & 3< @ @# ! # W >folder= " # E( Matlab >Path= -
# '.# ! + % . # ! # # & ! 5 63 ! " Matlab ! E( " /#
" ' dir # '& % '& Matlab \ 6$ - L9T . ! E( " path # & Q (E
/ (! & ‚% - 4 Current Directory ! E(
/ ! & 3< " & l c 7 I ;- U # < B 3 " 3 + (a*.
f= imread(‘D;\myimages\chestxay.jpg’);
$ '* 9' # f '(D V " 7 3 )(. A # W# & <# ; Q E
/ .

Q !O P # V (D A D 3 size d
size(f)
ans=
1024 1024
/ ! & 9 6 # r 6d 3
[M,N]=size(f);
/ (! O P # ( N) " .3 & (M) . ^& D r 6# &

" # ' ' ' B ' I' ! # ^ *. /I ! # Matlab , 7 # # c 6B (


" ' /% & V B Matlab " . b *. c S MyImage V / lV B G ?W # n!
QI - > ) # Gray Scale A & &=% & 6 4 c 6I E(
imfinfo('cameraman.tif')
4 MyImage lV ! . P /// - 4 (1 (! T # # & +
/ (1 # 2< X6 @ # I ; " . b % - ? whos Q - ( % & 6! % & 0

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

"< D ! !7%

Q - ( /I (1 # % & lV B # !# I. Z@
imshow(Myimage)
QI (1 I. # I subplot# & &
YourImage = imread('tire.tif','tif');
Figure
subplot(1,2,1), imshow(MyImage), title('MyImage')
subplot(1,2,2), imshow(YourImage), title('YourImage')

Q% & cE d + ) 7
imshow (f,G)
/% & 3< \ 6 $ # ; /% & " -! p ^& DG V f !
imshow(f,[low high]) Q % 6 &
high " - #9 2< # ; ! .c -E & low " - *! 2< ; ! .c -E
/ 3 &A (
6 X # f I* -! high # ; f I* ( low # ; imshow(f,[ ]) Q% 6 &
/% & G&( # + A (-. *! E ( 7 "# !" " /
f = imread('c:\matlab7\work\gradiant.bmp'); Q S
(Current 5D6"# ! c:\matlab7\work\ ! 4 % 9 M#N # r 6# & 3
/% - - 3 " ƒ -7 Directory)
f= imread(‘gradiant.bmp');
imshow (f,[ ])
size(f)
ans =
512 512

& 3 # $ *
% 6 3 AFile " ( # Export
! l P?

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

! I .!

Q l P? % 6 B 3 (0 % 6 V B
imwrite (f, ‘filename’)
TIFF, JPEG, BMP, PNG, PGM, Q + " " .% 6
Q S
imwrite (f, ‘D:\gradiant2.tif’)

imwrite (f, ‘D:\gradiant2’, ‘tif’)

Q-,. - ( ) ! H I .!

# # A 7 N # + $ * % DW AI (! & # & T # + + "


I . # + 9 &I ( # O P & # # T + O P
Q S/ . $ * # + $ (4
text(130,240,'Write by Robotic Group in 86/7/10 ',...
'FontSize',7,'HorizontalAlignment','right')

Q . ##!+ # & ! 3 3 (0 B 3 # . + (4 I.
title('Please click & enter for get a point !');

! ) $ J K,

Imcrop d
' ') B dW # ! ƒ P c ^ - >c E =M#N # *-W 3 d +
'! + ' ') c E' ! TU # P " 7 3 ! AI (! P
/ ! # " # ". # # # P " 7 M P
')(. >B ' 5! % '& # ' B 5! ~ 4 3 9*.= shift 5! 3 # 6 %& # 3 imcrop ! )(.
/ c 1d c ^- X # c ^- ƒ P
I= imread('ic.tif');
I1=imcrop(I);
I2=imcrop(I,[60 40 100 90]);
I2=imcrop(I,rect) % rect= P " 7 M P [x min, y min , width , heath] %

! L 8 $CK 5D
Improfile

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

M#N # - " . c -E ; > (! ƒ P U !" - = P - : # dW # d +


'(D AI ' ) inter pollution 3 ' !% & + # T ! *2 E B . 3 # B
' q S' A '. 3 ' # ' # # H '; A P - # 3 *. I. d + " # # B
-' I # )? B #!+ " dW # A . 3 P - + # # ^; AI . improfile(10)
/ (! &

! B &J

'0 % '& Double % W + /% & Double Matlab # \ 6 $ " 0"


" ! # '! " " '.G ?W c A " .G ?W 1 " Matlab / c 9 # *50 *
/% & s % q03 ] 7N

' # '2< G '?W '! + ' '(. $ * # ( A imagesc image d Q E


/ ((! c 1 Double

[0 65535] ". " " ;" [0 255] A ". " " ;"
/
9' '. ' # W )# w # 1DT # ; + ? # # # ; Aimage d A "#i V "
/ '(! & 1& ( " ^; #! #: ! X # # ;+ < 3 (0 # uvv # ;
+ '( A% '& [1 length(Cmap)] A "#i V " Double " . ? *D " ! <
" ' ' # ; VE0 Double ". Double s". c 1"
/ ! 6 @
'; " # ')5*0 " 'T " + (‚ m D " . #< " # A # " . )5*0 A+ q0
Q S / (! c 1 Double G ?W # 2< % - % q 0 3 ] 7N
Xdouble = double (Xuint8)+1 ;
Xuint8 = uint (Xdouble -1);
/VE0 c 1 Double Xuint8 b # " A S+ # S"

M EC

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

#' # # ( ZC 7 $ *" ! # "#9 Amovie getframe d Matlab #


/ (. # W*
" ` '?1 M # 'N ' # 2< A .I 6 % & D movie d "# T c E VE0 B AGetframe
d ' " ' # M 0q : * c !% & * & Agetframe d T / . 3 I. & %
Q (! T S / movie

[x, y, z] = peaks(50); " D & (7( B 3 !o 0


surf (x, y, z)
Axis ([-3 3 -3 3 -10 10])
Axis vis3d off
Shading interp
colormap(copper)
for i = 1:15
view (-37.5+15*(i-1) , 30)
m(i) = getframe;
end
Cla % clear axis for movie
movie(m)

" ' ' b 3 ' # " D & " .c E 3 # ! (! … @" #G & (G Axis vis3d
/ & - M P " .# 7

/ (! (! # . † - ] ^& w # & Shading

‡ ^ # " d + /% & view (AZ,EL) view ([AZ,EL]) M # N 3< 5! c E view


# EL ;6 % 2T # $ 4 AZ / . # W ( ((! . B ! a<
/ % 0 & " . ;0 % 2T # $ 4o0 ( ;
AZ = -37.5 , EL = 30 \ 6$ % ?@
/ $ *Z Y* ;- o 0 AZ = 0 , EL = 90 ;

c E = "# T % ?@ >"# 6= " X7? B d + dW # / # I56 I 6 B Q getframe d


/ & ;5@ B # d + Z *D !
Y >"# T

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

I56movie (m,n) /% & .I 6 #< B m / . # W m " #< # # I56 B movie(m) d Q movie d


n (D ‚ $ * G ;0 ) # 5T # B I56 (n / (! T # n #
/ T # $ * 3< VE0 % 2T # ) # 5T # B I56 A `
/ (-. T " .I 6 - ?c N (0 " ; % & # E M D6 D (0 + ? # B n
Q S 3 (0
n = [10 4 4 2 1]
u I '6 D A $ * ˆI 6# / T ˆI 6 Vn& / . 3 ## E D zt 0
/ $ * z I 6% 2 #
/% & I 6 B c 2( A #< ; ! . !% & * & " #< c m b
m=
1×15 struct array with fields:
cdata
colormap

size (m(1).cdata)
ans =
412 369 3
! # J

' # C '7 " .I 6 "#i V Aframe2im im2frame d &


Q S / !c 1 ) E
[X , cmap] = frame2im (m(n))
c '1 Acmap w '# '1DT x "#i V m C 7 V I 6+ n S+ #
/
m(n) = im2frame (x , cmap)
m C '7 ' V ' I 6+ n # cmap #9 1DT x "#i V 9 r 6 S#
/ (! c 1
‚ ' (! '& C 7 % j " &B c 1" 3 im2frame ! T
/ (! c 1C 7 # . axis . figure " & B getframe d ! # 3 *. 1

! / B $%

' # Z ~ 4 % *& E( (D A & & & B " # "#i G -4 " d


d + V . # W/// ;G # B # ; !# &".T (! %!@+

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

' '0 ' # & + & S 3 (0 / . # W T G -4 B # VE0 &". E !.


Q (!
l= bwlabel(bw);

A ' ' # 'W a! & B # M 0q : + ! . .G -4 B . # # 0q : # &


# W b # # . 56 *. All I# Z ## & + " . 56 ! ! (! O P #
I' # < % & # 24 7 B G -4 . " ! GT V! w ( 56 & A .
'(D /% '& bwlabel d ' 'T 3 *. ! % & - B d + # ! I (! % W # : + *.
d ' +' 'T " '. '56 * # /I ! "#i G -4 # d + & "
Q 6D
Stats = imfeature(l,'BoundingBox');

Area /% & b + # c 1? . % @ -
Centroid /% & # # G -4 "9! ^; > y x = M P b +
BoundingBox / O P G -4 ." # 24 b + #
MajorAxisLength /% & b + # #7 + #9 :
MinorAxisLength /%& b + # # 7 + E4 ! :
Eccentricity "9! I. `9! f
Orientation % DW O P % 2T &
ConvexHull >ƒ 7 = ) -T
ConvexImage >ƒ 7 = ) -T
ConvexArea % @ - >ƒ 7 = ) -T
Image /I # V + # # G -4 B
FilledImage >V = G -4
FilledArea > 0=G -4 1@ -
EulerNumber > 0B =
Extrema >" D #< B =
EquivDiameter >"# 0 0 B =" ^W "

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

Solidity >B E4 ! "# 0 0 B =` P& A &


Extent >B E4 ! "# 0 0 B =`# ; A T # A ( A -
PixelList /% & V + # . c -E -?

a= stats(2).BoundingBox
b= stats(3).BoundingBox
d= stats(6).BoundingBox
e= stats(10).BoundingBox
:

Q I (! &# # # " & (2 o 71 #


B H # M $ 96 '
" # 1& 7 " # 24 M 5*0 '
" ( % 6 )# $ * b '
>c -E ."## ) # M 0q : + 6 = ) # # 3 96 )# $ * '
>noise= 9 _ i@ '
" # "# 1?M 5*0 '
"# 1?" .I # )? '
P? " @ _ i@ '
P? " @ 3 ! '
3 ! 56 '
56 @ : '
B % & (! D '
B " # Thresholding M 5*0 '

" # ' # + # ! 5N c *0 / M#N % ! 12 ( 5Z B # M $ 96


# '; ' A d*T j# ; c -E . >" -! ] ^&=# M ] ^& ! % & +
'! % '& '(D + ' ' Š9 * L ;# ‰ c *0 + / B 9 + #" @ (! "
Z 3 -E 3 9 " . c -E c ! # M c! # I. $ 96 j# ; # c -E .# M
/% & 3 + # 3< " ! ‚ (! L ;# #
Q S/ M # N histeq() d B *! + Matlab #
I= imread('food.tif');

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

imshow(I) ! . # 5! # M $ 96 3 #M # & &


I2= histeq(I);
Figure # M H # * Aimhist (i)d & 3 + (a*.
imshow(I2) / ! . # + B .

Q " # 1& 7 # 24 M 5*0

>Adding Images= d*T `z


>Subtracting Images= ‡ `u
>Multiplying Images= ƒ `{
>Dividing Images= I -; `ˆ

D EC N !

T % 0 & o 0 ///////////////////////////////////////////////////////////ippl (1
d*T ////////////////////////////////////////////////////////imadd(2
‡ /////////////////////////////////////////////////imsubtract(3
I -; ///////////////////////////////////////////////////imdivide(4
ƒ ///////////////////////////////////////////////immultiply(5
c ‡ 5^ # W////////////////////////////////////////////imabsdiff(6
I* ////////////////////////////////////////imcomplement(7
^ G ! ///////////////////////////////////////////////imlincomb(8
IPPL Intel Performance Primitives Library

ipplK ! 5 24 O 5 24
TF= ippl
[TF B]= ippl
Q]
/% & intel" .# -& U & # , ;6 % & intel % ! ‹ P ippl (1
/% & ?A # #! () & # ! & & d 0* B " ippl (2
T " %0& 1& 7 d o0 %& #9 1DT d ippl (3

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

/% & >false= TF Œ % & >True= TFŒ D6 ippl (4


B# -& # # 0q : QTF
/% & # B 3< ^& . ! ? 5& #< Q B
(imadd) c S 1& 7 d %& D6 W !% & M # N + ippl E5*0 (5
3 .# ! & " (! d*T I. # #< N (0 B B E( " T I (! &
/ d + " T # % 0 & $ 96 o 0 M # N + (! d*T I. # #< N (0 .

imsubtract immultiply imlincomp imadd= ( 1& 7 d A% & U & # ippl W (6


/ ((! & Ippl% 9 imfilter d (imcomplement imdivide

ippl 3 ! D6 g
(! m D # LPT_IPPL_OFF B system environment variables % *-W# ippl 3 ! D6 g "
/ . # W NO # 3< "
c (A ( (! B 5! prorerties " # ! B 5! % & # my computer ( " ##!+ "
/ (! # new % *-W" # system variable $ P # !ƒ P # advanced

ImaddN
/ (! d*T % j 0 B # B (! d*T I. # d +
Z= imadd(x,y)
Z= imadd(x,y,’w’)

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

Q]
/ (! lZ # # ! d*T y #< # x #< # & +
ZM # (+ # ! logical x E( ) /% & x U q! 1 z class
/% & Double
/ * f# #< # ; 7 y X d*T c N @ / ( I. I. x y
/ * f# 7 T # N (0 ( Uint8 y x qS
<% & 0A < % & "# 0 M # N T # N (0 + (a*.
/% & D6 ippl A single uint8 logical " 2&q ! E U q ! I. " #< y x
A ( Single uint8 uint16 " . U q ! E U q ! I. z x double ?E& 0B y
/% & D6 ippl

Imaddd # " # &3 #<


Z= imadd(x,y,’w’)
Q " . Class E w
Double,int8,int16,int32,uint8,uint16,uint32
/ (! O P # T U q!d + &3 #< !
Q S
x= uint8([255 0 75;44 225 100]);
y= uint8([50 50 50 ;50 50 50]);
z= imadd(x,y)
z=
255 50 125
94 255 150
y ?E& 0B x #< d*T
Z = imadd(x,y)
#<:Z A ?E& 0B :y A #< :x

% j 0B B 3 ! d*T Q S
I = imread('rice.png');
J = imadd(I,50);
subplot(1,2,1), imshow(I)
subplot(1,2,2), imshow(J)

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

QY x d*T
Z= imadd(x,y)
#<:Z A #< :y A #< :x

d*T Q S
I = imread(Image1);3
J = imread(Image2);
K = imadd(I,J,'uint16');
imshow(K,[])

J I

K:

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

Imsubtract N

/ (! I! B # 0B (! ‡ ) B # B
Z= imsubtract(x,y)
Q]
Z= imsubtract(x,y)
I. y x / 9# Z #< # # (! I! y #< #x #<
/ * f# U q! # ; 7 Z ( U q ! I.

/% & D6 ippl Single uint8A uint16U q ! x #<


Q S
X = uint8([ 255 10 75; 44 225 100]);
Y = uint8([ 50 50 50; 50 50 50 ]);
Z = imsubtract(X,Y)
Z=

205 0 25
0 175 50

B 0B ‡
Z=imsubtract(X,Y);
> #<= :Z A ?E& 0B :y A > #<= :x

Q S
I = imread('rice.png');
Iq = imsubtract(I,50);
figure, imshow(I), figure, imshow(Iq)

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

B 4 !c ? M#N + # ! I! X # " .c -E * " 0 # ; B % ?@ + #


/ $ .! 2 # M A .c -E #3

< ! P Q
> #<= :Z A > #<= :y A > #<= :x

Q S
I = imread('rice.png');
background = imopen(I,strel('disk',15));
Ip = imsubtract(I,background);
imshow(Ip,[])

Q 1& 7 h(x,y) f(x,y) K ( " .c -E f B .+ c ‡ M 5*0 #


g(x,y)= f(x,y) - h(x,y)

/ *‡ A . K+ #Y
q ! (- ! .% *-W
/ > E 9 "# S71 AL ;# " 5•- # = ƒ ; % ?@ " " 5•- A ? D + " . # !

Imdivide N
% 2T YZ *D % ?@ + ! / (! I -; 0B # # B (! I -; I. # d +
/ & B ( #M $ .!
Z= imdivide(x,y)
Q]
/ (! l Z #< # # I (! I -; y #< # K( (0 #x #< (0 . # & +

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

Z= x./y
Z# D "# 0 0A "# 0 0 B I -; c N @ / ( I. y x
/ * f# # ; 7 9 I -; c N @ ‚ P#

A 3 -E y xU q ! 9 & (-. single uint8A uint16U q ! . #y x ! 2( ippl


/% & D6
Q S
x = uint8([255 10 75;44 255 100])
y = uint8([50 20 50;50 50 50 ])
z= imdivide(x,y)
z=
5 1 2
1 5 2
0B # I -; "
Z= imdivide(x,y)
:Z A ?E& 0B :y A :x

Q S
I = imread(‘rice.png’);
J = imdivide(I,2);
subplot(1,2,1), imshow(I)
subplot(1,2,2), imshow(J)

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

; ! ! H < $R
Z= imdivide(x,y)
:Z A :y A :x
Q S
I = imread(‘rice.png’);
background = imopen(I,strel(‘disk’,15));
Ip = imdivide(I,background);
figure, imshow(Ip,[])

Immultiply N

M ' $ 96 % 2T # ! + Z *D / (!
Y ƒ B # # 0B (! ƒ I. # #
'* # A 'X ' 'X ƒ # ! % & 3< ( #M $ 96 % 50 & B ( #
" Z' # '2 ' " '.c -'E # ƒ ) E # . # * I. " .c -E
/% (.

Z= immultiply(x,y)
Q]
/ 9# Z #< # # (! ƒ y #< # 3< K ( (0 #x #< (0 . A# & +

Z= x.× y

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

Q ! + 9T /% & xU q ! 1 ZU q ! / ( -E U q ! 9 & x y

/% & y U q ! 1 Z A numeric y logical x


/% & x U q ! 1 Z A logical y numeric x
/ * f# U q! # ; 7 Z
/% & D6ippl single logicalA uint8 3 -E U q ! z y x
Q S
X=uint8([1 2 3 ;333 23 33])
Y= uint8([22 33 44;55 55 66])
Z= immultiply(X,Y)
Z=
22 66 132
255 255 255
# 0B ƒ

> #<= :Z A ?E& 0B :y A > #<= :x


Q S
I = imread('moon.tif');
J = immultiply(I,0.5);
subplot(1,2,1), imshow(I)
subplot(1,2,2), imshow(J)

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

< ! S T

:Z A :y A :x
Q S
I = imread('moon.tif');
I16 = uint16(I);
J = immultiply(I16,I16);
imshow(I), figure, imshow(J)

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

Imabsdiff N

! G T Q P 7C ,J
Z= imabsdiff(x,y)
Q]
Z=abs(x-y) %& M#N + d + T
# W U q! # ; 7 f# A T N (0 # ; / ( -E U q ! Z y x
/ *
/% & D6 ippl single uint8A logical" 2&q ! E 3 -E U q ! Z y x
Q S
X = uint8([ 255 10 75; 44 225 100]);
Y = uint8([ 50 50 50; 50 50 50 ]);
Z = imabsdiff(X,Y)
Z=
205 40 25
6 175 50
c ‡ 5^ # W

:Z A :y A :x
Q S
I = imread('cameraman.tif');
J = uint8(filter2(fspecial('gaussian'), I));

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

K = imabsdiff(I,J);
imshow(K,[]) % [] = scale data automatically

imcomplement N
! <) C
IM2= imcomplement(IM);
Q]
RGB grayscale A binaryQ d " #
/# " # 1 &q ! 9 & T Qd T
/ c 1 N B B N " ( " I* #
/ c 1 + # + # d + 5&
IM2= ~IM : " ( " #
IM2= 1-IM Q grayscale " #
IM2= 255-IM Q RGB " #
Q S
X= uint([255 10 75;44 225 100]);
X2= imcomplement(X);
X2=
0 245 180

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

211 30 155
Q S
bw = imread('text.png );
bw2 = imcomplement(bw);
subplot(1,2,1),imshow(bw)
subplot(1,2,2),imshow(bw2)

Qd + #! ?S

/ . 3 # 3< c *E 9 % & # % *& c E %& B ~ 4 % *& c E

imlincomb N

! 78 B
Z= imlincomb(K1,A1,K2,A2,……..Kn,An)
Z= imlincomb(K1,A1,K2,A2,……..Kn,An,K)
Z= imlincomb(………output_class)
Q]
Q (! 1& 7 # # ; Z= imlincomb(K1,A1,K2,A2,……..Kn,An)

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

K1*A1+K2*A2+……..+Kn*An

/ # A1 1 "9 & U q ! Z
Q (! 1& 7 # # ; 9 Z=imlincomb(K1,A1,K2,A2,……..Kn,An,K)
K1*A1+K2*A2+……..+Kn*An+K
Q% & D6 ippl # W ". # E
Z=imlincomb(1.0,A1,1.0,A2)
Z=imlincomb(1.0,A1,-1.0,A2)
Z=imlincomb(-1.0,A1,1.0,A2)
Z=imlincomb(1.0,A1,K)
Q (-. " . U q! E # -E U q ! A1,A2,K W
Single ,int 16,uint8
Q S
I = imread('cameraman.tif );
J = imlincomb(2,I );
Imshow(I), figure, imshow(J)
/ (! lj # (! ƒ 0# #I

3 ! d*T 0 # c c N @Q S
I = imread('cameraman.tif );
J = uint8(filter2(fspecial('gaussian'), I));
K = imlincomb(1,I,-1,J,128); % K(r,c) = I(r,c) - J(r,c) + 128
subplot(1,2,1), imshow(I)
subplot(1,2,2), imshow(J)
figure,imshow(K)

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

T U q! 3 ! O P d*T Q S
I = imread('rice.png');
J = imread('cameraman.tif');
K = imlincomb(1,I,1,J,'uint16');
subplot(1,2,1),imshow(I),subplot(1,2,2)
imshow(J),figure, imshow(K,[])

Q S
X = uint8([ 255 10 75; 44 225 100]);
Y = uint8([ 50 20 50; 50 50 50]);
Z = imdivide(imadd(X,Y),2)
Z=
128 15 63
47 128 75

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

D #9 #< d*T c N @ imadd d S+ #


/ imdivide d
#9 <# . double % W # # I -; d*T imlincomb d A S # ! ?@ #
/ (! # 3<
Z2 = imlincomb(.5,X,.5,Y) %Z2=0.5X+0.5Y
Z2=
153 15 63
47 138 75
U !$ !)

O P " # # ( # ] ^& . > 6= . c -E D 3< #


% '& (! ( - . 9! # 9! * . c -E % ?@ + # A 6 1-4 # * -.# *
/% & I! % ! >B E = x& ( I. ƒ H ; x( # ] ^& dW # %& +
6 M#N H ;B E # VP " 7 # dW # -- "# * @
/I # ƒ ;! Z % & (! "
Q # T grayscale & &". % & (! $ 96 " d
imadjust `z
> match + D \ 6$ -.B T = histeq u
/ . $ * #" - -. !

/ c W% 7 % & (! 3 Z # noise " 5T " Q E


5N w # * 4 & E( 3 # $ # 3 ! "# E & A )#" . % & (! $ 96 "
makecform convert to l*a*b /I. ##!+ A +
a ( , , 1)= histez(L)*100 (! #! Z$ # " #

! 8 V S

Bwselect d

# P 7 2( I P & & I A%& 3< I& ! # ^ *.


3 ' A % & dW 3< # >H ;= ^; + !" 7 X # ^; ƒ P !M # N + / . 3
!ƒ P #H ; 3 U N # 3< 3 I. ! A .
bw2 bwselect BW1,N

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

/ #ƒ P A # #y H ; " ) x H ; E ! r,c # 3 3 I.
bw1= bwselect(bw1,c,r,n)
>% & H ; )& " ?| = n !

! *! F

"#i V = indexed B 6 " # # 3 (0 # rgb B !% & D rgb2ind


'& " # ! map B > " . y, x c =" D #< B c indexed dW # ! (! c 1>
Q% & 3 &
9 Ww # M Q 3 &
91& w # M Q 3 &
<w # M Q &3 &
[x , map]= rgb2ind (rgb, n)
! map m #N n A " D & #< map " D #< @x

map * (4
black: [0 0 0]
pure red: [1 0 0]
white: [1 1 1]
Gray : [0.5 0.5 0.5]

c '1 rgb B #> #< G = indexed B # + !% & 51W d VE0 ind2rgb


/% & double U q ! m×n×3 #< B rgb ! / (!
double unite16 Aunite8 U q ! x A>x,map= #

# ^ '*. '! (! c 1 >hsv= w # M M B # rgb B !% & D rgb2hsv


/w # ( # Aw # M Aw # (! l# P & c -E ." !l Y
q 1W !
%& + + # %6# D # ! + ? A% & RGB Y
Z *D . + # T E( T
d %& 6! & # - Matlab #96 # # ! + /I (! c 1 HSV # RGB I - & !
A= rgb2hsv(k)
/ HSV % 6 51W 3 *. A RGB % 6 K Z M # 10 # /I (! &
'! ' ) *. /I . x# ( + # " # ! ?S I (! &# " # ! # d + % *. I . P
' -T O P >% - ?1 6 " . M # # S#: =B ## # I2 c x- E I

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

c'? ' ' A ' ' , 7 M # ! . VE0 + ! ‚% & 2< w # &


5'N 6 3 B # ! . VE0 % & + E* A, 7 ( # # b S#: A3 6 ^7 M b
# ' 3 9' 'b S" / ( M ) E A 6 L B ) E I! # - ".
3< O P A% & RGB 6 ! . VE0 % 63 4 + # -T w # , 7
/I (! & >RGB2HSV= AHSV RGB c 1 d cE + 3 !_ : " # I-T

K !) ;

# N # ; " .c -E # & Y
qS / & " ( 3 ! )#" ! # T 5*0
/ (! c 1 <w # # " .c -E 9 Ww #
I= imread (apples.jpg');
BW = rgb2gray(I)
imshow(BW, [1 0 0 ,0 0 1]) 9 Ww # N # ; " .c -E 100
<w # # ; " .c -E 001

/ !m D 3< " w # uvv 3 intensity " Q E

@ -! & V W /V

roifill N
M#N x @ _ i@ % 2T 3< ! %& I50 # I2 #! d 5*T
/ # # ! gray scale " ! & P?

Q & #
U B *! & M#N `z
G&(3 & ^& ; ,& P? 7 ƒ P `u

B I&# , & P? 7 ƒ P d + " T 5N 6 V ## •


' ƒ 'P % *-'W ! 2 !+ D # X # 7 U B *! D5 (4
/ . A _ i@ @ 3<
I= imread(‘aass.tif’);
roifill(I);
Q !i
/ " % 6 *@ *0 3< " # d + !" `z

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

delete 7 ƒ P " 1G & ( P 7 # & M # N # `u


/ & Back space )

3 '& m ' # # * Vn& ! 6# X # !% & M # N + #+ •


3 '*. # ' H ; ! / # M#N 7 5N !" 7 ".
/ P D5 (4 U x# H ;
Row=[a,b,c,d,…]
Coloumn=[t,y,u,I,…]
J= roifill(I,Coloumn,Row);
ƒ P # X # @ . P D5 (4 " . 3 # # B dW # d +
/ (! 7 !

Q%& M# N + d + ) 7
J= roifill(I,BW);
/ B & 3 (0 !% & I 9 & 3 *. " ( B BW A# & + #
' '7 = fill ( BW # " . c -E K( !I @ !M # N +
/>
/ . c ;- # : @ ." # # B roifill T @ + (4

[J,BW]= roifill(…)
/ 7 ! .c -E " #B & " ( # & +
# # '; H '; ') " ' " '0 # ; A (-. # @ # ! . c -E " BW dW #
/ (! + 9) T
Q%& M#N d + " ) 7
J= roifill(x,y,I,xi,yi)
(! & 3 7 " T E I-&B " y x 0 # & + #
I! 0 + # (! + D # + D D5 (4 U x# ! yi xi # " 7 !M # N +
/ . # # TM P # (!

Q roipoly N
/# & " # # 3 *. I. d + !/ roipoly d ( + # " ) d

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

'7 roifill d # ! % & + # d + 3 M 2( roifill d 1 " @ 3< # ! 7


d ' ' ' ' 5'N " . % *-W & # " b E( 3 7 ƒ P
M # 'N # 7 ; i # (! > & w #= M # N # ƒ P 7 dW # roipoly
/ . $ * > & w #=
/ roifill d &` & B & 3 *. d + dW #

Q ! -! & V K

@ @ !% & Z M 5*0 % W $ 96 " # 2 % 2T # #


@ 3 bwfill d B *! ! 5N 7 ] ^& I. ! # # T ".
! # binary % 6 background
bw2= bwfill (bw1,c,r,n)
c *0 ( " - : .# c r ! #N # (r,c) c -E bwfill d E5*0
/ r(k) c(k) % DW %6 . " M#N 3 !
& 0 ! / connectivity ((! + D ! M#N n " 0# ;
# & 0 ! #N # # T foreground # # 24
/# T foreground
bw2=bwfill(bw1,n)
/ + D mouse B *! P? ^; ! . T . 3 $ * 7 N # # A# & +

[bw2,idx]=bwfill(…)

/ #d + ,& " . c -E * ^ M P # & +


Bw2=bwfill(bw1,’holes’,n)
# @ " . c -E " 0 # )< ( . @ 9T . c -E ! ! (! + D dW # bwfill d
/ . bB N
/%& n# ; \ 6$
/ . ;^( % 6 T ;^( " 0% 6 *@ " #

! X!

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

B * c 56 " (D 9 + ! I (! &# # ’salt&pepper’ ‘speckle’ 9 (#


/ I.
YH ) G Q 4 ) salt&pepper X !
J=imnoise(I,’salt&pepper’,D)
(! 6 # >c 56 B * 9 = A> + #=B N " .c -E # & +
> DŽ . c -E c ! D = " # 1 ; dW # ! D # ; 6 I! #B N " . c -E +
\ 6$ #: 9 9 D + # ; 4 . ! ‚ #i j c -E
/ 0/05 3< # ;

Y 5 8Z speckle X !

j= imnoise(I,’speckle’,V) j=I+n*I : (! & ?D B 9 +

#: V # # ; ! VV # N +) d % (E # : ! 6 0B n !
/ 0/04 \ 6$

QX ! W /V

/ * _ i@ # B 6 9 3 medfilt2 d ,&
B=medfilt2( a ,[m n] )
" # # : c -E _ : ) -*. B [m n] / # 9 3 *. a !
\ 6$ #: ! " # c -E _ : m-by-n ) -*. # # ; , & c T c -E !
/ 3-by-3 ) -*. +
H ;" # ; ,& + (a*. . 1?" # N + i #" # (! "#i Zd + !
/ (! 1& 7 . 1? [m n]/2 3 #

D& 3. [

/% & I. E 1?" &# E <


/ '(! ' ' b " '( ' ( #M 2< # ! % & B : ; "#i 3 1?" &# E < _ .
& ( / (-. , 7 M N # M b I2 " . # (* Y
Z *D M N # (M b
/% & e f P& # ;;7 7 B 1?

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

D&

A (7'N '& (. Y'0 A '((! ' b ' ^; b ( (D ` ( - % & + E* . 1?


'! ` (' ' ' -' % & + E* (. 3 # 3< ( 6 # ) *. " 5T ! -T
'2 Z' D # / ( ] ^& c E ."#i 3 3 a*. -T " . e ) *Y
Z *D
/ 6 X #
B ' 'E < '@ ‚ w # &$ P B w #9 W $ P B 3 > * " = % & + E* 0 1?B
'T '1?B , " & .# / % (E ( B # w *. " .c -E *! D ,
/ # " . #!# *2 $ ; . 1?/% .

D& 3. [

A '1?" &# E < " . # # " X /% & " -! ] ^& M Y1- ‹ @ + 1?


B ' M # 'N ' >+ ' # B # #i = 1? ! T d^; + # /% & 57 ‡ )5*0 B 1& 7
'j ' '*W# " . 1?Y
Z *D ! . 3 + / " -! ] ^& Ad & A #< b
3< '1;0 1?# A% & % 1S A#i 5T 1?# " -! ] ^& d^; ‡ / M *! A"# *
*-W " ‡ /% & N % j" -! ] ^& @ # A% & # X # ! # : 3 *. % & (
A% '& ' ( A% & 1?+ # _ : # ! #i ) % *-W " A% & % 1S A% & 1? _ : # ! #i
c -'E < !+ + D " 3 ‡ #9 A+ ( /% & N A% j" -! ] ^& @ #
# 10 / # N # 10 B " -! ] ^& #i . ^& ^; # ‡ / ! & A # # W 1?" # #
' '^; '. # ‡ " / # < I. 6 " . 1?c 7 + D " " W .# . N
M ' # ' b 3 (0 # 1?B / < %& + &q Z & 9 ‡ /% & 3 #9
; ' 5! # : 1?" &# E < " .I # )? AI ) X # c -E (4 :# ! ( #
+ ' # /I ' ' D B # 1?" &# E < A" & & " / ((! 1& 7 # ( #M b+
I ( # 24 " .c -E + *" / .c -E ( #M , B B ". A *
/ ! # E < # " 1?3 ( # " D `z " . #

5 P \ C D EC

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

M ' 3' ' (D A ((! #! ( #M ‡ 1?" &# E < " . )5*0 " D
-T ( #3 " . 5W" #" I M 0q : + /I # # ! & 5N " . ( #
/I (!
c -E # > ( #M 3 = ‡ (* > = A c -E ( #M (* > =
QI # + (A

%& B & 3 3 $ a > D B # =3 # ‡ A 2 E5*0 "


Q#<

U P \ C D EC

• ' d'W # '! '((! ' # ! ( #M ‡ U & 1?" &# E < " .I # )? )
'. I ' Z # ! ) A% & + 2 ., " &# E < " %& ( #M 3 M b
3< m ?P 3 ) " &# ( #3 B , " &B # + ( A% & 1?B ,
'., +6 " /I , B c7 # ( #M 3 # # - b X( I V /
/I (! -T • # #3 b". N #i I
Q ^; # ‡ ^; # # M ) *

Q & ". d & " $ a B & B .I # )? 9 (

D& 3. [ ; )?

B - n& A (! Ac & A% A9 # " n54 Q% -P 1


• # 5.`# A &q Z Q 1

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

' ' ' ( 3 (! " " . )5*0 / # # #!+ • # 5.`# 3< V (! )5*0 A3 (!
# (. & ; (4 " . # #!/ 5! , # (! )5*0 " X@q c W " B a.
/% & . ) <

Q D&1 )?

# W & # ) (4 + B " . 1?O P " Z *D (edge detection) 1?" & # E <


/ & edge D #!+ "
/ 3 * # 1?M # N ( #M b w # bM#N E 9 6M b
1& 7 -- , 7 # (! O P # 3< M 2 M b ‡ & ; , 7 #
/ & 3 * #‡ 1; # " . c -E % 1- M b

! A binary T # intensity % 6 B " # "# 1?M 5*0#


/ 3 M#N c ". M#N ". cN @ #
I=rgb2gray(i1);
Bw=edge(I,’sobel’)
" # 3 (0 # intensity " ( B d + (! intensity # # . 1?Edge
# # . 1?d ! .T ! ? 3 *. bw " ( B
/ . # W # ) ".T (! T # (!

Q D& < !;& 8


sobel I # )? `z
canny I # )? `u
Roberts I # )? `{
prewitt I # )? `ˆ
zero-cross I # )? `v

Q sobel < !;&


3 ! : ; 3< # # . 1? ! A (! ‡ 3 + *P & # . 1? +
/ % & max I
Bw= edge(I,’sobel’,thresh)
(! O P + " # &< 3 9 B thresh# ; !

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

thresh + # ; (! I 4 (- thresh > = W ! . 1? *. (edge) d +


/ (! ƒ P # "# ; B #: edge d {[ ]} ? thresh I (E O P #

Bw=edge(I,’sobel’,thresh,direction)
" . 1?d + ! (! O P !% & " # (D A (! O P # % 2T direction syntax + #
/ (! -T # . \ 6$ #: ! / (! -T # . " *0 ;6
‘horizontal’ Q ;6
‘vertical’ Q" *0
Bw=edge(I,’sobel’,…,options)
# I # )? M 5*0 % 0 & ‘nothinning’ # ! " # 3 (0 "# #B d # & + #
‘thinning’ # > = #i 6 " . 1? . 1?3 C 5@ # ! % 50 + Z
/ (! %& # 9 # C " . 1?I # )? AI (! ƒ P #

[Bw,thresh]=edge(I,’sobel’,…)
/ #> &<= threshold # ; # & +
[Bw,thresh,gv,gh]=edge(….)
/ 3 " . )5*0 T # (gv,gh) " *0 ;6 " . 1? # & + #

/ (-. + *. I. 9 prewitt Roberts

: canny < !;&

U 56‡ " # 3 ! I3 > D = 57 " . max " -T # . 1? +


/ 1& 7 (Gaussian)
. 1?c , ;6 ! (! # " W m D " . 1? (! & (Thresholds) &< +
/ ( " W " . 1? c 2< ! T # m D
2 . # ; # # .9 G 6 *! &# m D " . 1?m ! #+
/% &
Bw= edge(I,’canny’,thresh)

#Z &< 3< % (*? + &< 3< % (*? ! (! O P # (thresh) &< # B +


/ (! O P

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

(0.4×thresh) 0 (high threshold) Z &< 3 (0 0+ I (! ƒ P (thresh) 3 (0 # 0B


#: edge d I (E ƒ P thresh " #" 0€ . 6 X # + &< 3 (0
/ (! ƒ P # % (*? .B

[Bw,thresh]=edge(I,’canny’,…)
/ (! O P #+ Z &< 3 9 ! # (*? # B Z # &

N , % 4 2C

'T '! '& d 3 $ * T # !" ^; . + 6 "


Q # 69 # Enter 5! 3< # " O P U B 5! , & X # ^; !
[X,Y] = getpts(GCF);

B d + !A & d + c -E B H )# ;+ D" Z *D Q impixel


Y
+ ! % & c -E 3< # < 91& A9 W" .w # ; 3< T " # 3 (0
Q% & M# N d + & E E / ƒ P # ! , & 9 c -E
Z = imread ('Imag');
P= impixel (Z);

# 'd '+ / 6 X # Y* @ d + & c 1W ! % T


+ ' '/ . # X # " ^; ƒ P " U & 3E * . 3 $ * 7N " #
G AR H )# ; AEnter 5! 3 !ƒ P # :;U B *! !M # N
c -'E '. ') # #3 *D + , & dW # / . %6# T # ^; 3< " .c -E B
'51W 'P % *-'W ' ' ' A Delete Backspace 5! & ! / # <% & #
/
w '# ' H ' B G AR ;A T 3< " # d + & &M# N 5N
/ . $ * # uvv " 0 # ; & w #" N " 0# ; & . A &

A I' '! ƒ 'P # H ; 3< U ! P >H ;=" . c -E " # # 0q : d + Q pixval


%& " # # ^; + ƒ P 3 9 # ^; + 5N 6 @ . x#
/ . x# H ; w # dT # 0q : + (a*. d + / # <

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬
www.newbook.ir

'7 # ‹ " ^; ƒ P o0 ! # #! & & " d + Q imfill


% & ^; 3< " @ ! P " 7 w # ^; 3< w # A ^; 3< " # B 5! O P >segment=
3< w #A '& " ' B ' 3 # &H ;" # 3 ! B 5! d + & S 3 (0 / <#
/ < # > &= w # H ;

BW1 = imread('rc.tif');
BW2 = imfill (BW1);

<JX C ! U - ;\ H - ] ! -,. :

www.MatlabKar.com ‫ ﻣﺮﺟﻊ ﭘﺮوژه ﻫﺎي آﻣﺎده و ﺷﺒﯿﻪ ﺳﺎزي ﺑﺎ ﻣﺘﻠﺐ‬- ‫ﺳﺎﯾﺖ ﻣﺘﻠﺐ ﮐﺎر‬

You might also like