文档介绍:第二章第二章 FundamentalsFundamentals
ReferenceReference fromfrom
Digital Image Processing
Using MATLAB
Rafael C. Gonzalez
Richard E. Woods
Steven L. Eddins
Digital Image Processing Using MATLAB
• The MATLAB Desktop
– Workspace
– Command history
– Command Window
– Figure Window
– Current Directory
First Steps for Using MATLAB
For beginners, first Steps and some
notations should be mastered:
– Set Path
– Getting Help
–Prompt >>
– Semicolon ( ; )
– Single quotes ( ‘)
Coordinate Conventions
• In many image processing books, image has M
rows and N columns. the image origin is defined
to be at (x, y) = (0, 0) and end at (M-1, N-1)
• Instead of using (x, y), the image processing
toolbox uses the notation (r, c) to indicate rows
and columns.
• The origin of the coordinate system is at (r, c) =
(1,1); thus, r ranges from 1 to M, and c from 1 to
N, in integer increments.
Coordinate Conventions
0 1 2 N-1 1 2 3 N
0 y 1 c
1 2
2 3
M-1 M
x r
in many image processing books in the Image Processing Toolbox
Reading Images
>> f = imread ( ' ') ;
>> size ( f )
ans =
362 500 3
>> [m, n, k] = size ( f );
>> imshow (f, [low, high])
>> imshow (f, [])
>> pixval
Writing Images
>> imwrite (f, ' ' );
>> s = imfinfo ( ' ')
s = Filename: ''
FileSize: 39640
Format: 'jpg'
Width: 500
Height: 362
BitDepth: 24
ColorType: 'truecolor'
Compute pression Ratio
>> **
>> ans =
Data Classes
double int16
uint8 [0,255] int32
uint16 single 4 bytes
uint32 char one byte
int8 [-128,127]
logical one byte