A Tutorial of MATLAB For Digital Image Processing
A Tutorial of MATLAB For Digital Image Processing
DigitalImageProcessing
Agenda
Basicmatrixmanipulation
Basicimageprocessingfunctions
Anexample
BasicMatrixManipulation
MATLAB standsforMATrix
LABoratory
Path
Createanewmatrix:
A=[123;456;789]
B=[1:5;2:6]
C=10:3.5:15
zeros(),ones(),rand(),randn()
B=[12;34]
C=[BB+B;B+4;B/3]
A(2,3)
R1=A(1,:)
C2=A(:,2)
S1=A(1:2:end,2:2:end)
L=A(:)
A(5)
Deletingrowsandcolumns
Indexingamatrix:
Matrixconcatenation
Max()andmin()
C(:,2)=[]
C(3,:)=[]
C(1:2:end,2:2:end)=[]
C(1:3:end,:)=[]
Max(C)
Max(max(C))
[V,R]=max(C)
[V,R]=max(C(:))
Size(),length(),numel(),ndims(),
class(),whos
Fliplr()flipud()
BasicImageProcessingFunctions
ImageI/O
Imread()
imwrite()
imshow()
imagesc()
ImageFormatConversion
rgb2gray()
im2double()
im2uint8()
Anexample
Loadacolorimage
Converttograyscaleimage
AddGaussiannoise
Lowpassfiltering
Saveresultimage