Documente Academic
Documente Profesional
Documente Cultură
Chapter 2
Fundamentals
Reading Images
>> imread(filename)
>>f=imread(chest-xray.tif);
>>size(f)
>>[M, N]=size(f);
Displaying Images
Images are displayed on MATLAB desktop using
function imshow, which has the basic syntax:
>>imshow(f,G)
where f is an image array, and G is the number of
intensity level used to display it. If G is omitted, it
defaults to 256 levels.
The syntax form of interest here is
>>pixval
Which shows the cursor on the last image displayed
Writing Images
Where filename is the complete file name of the image stored in disk. For example,
>>imfinfo bubbles25.jpg
ans =
Filename: 'bubbles25.jpg'
FileModDate: '13-Oct-2008 22:22:23'
FileSize: 13354
Format: 'jpg'
FormatVersion: ''
Width: 720
Height: 688
BitDepth: 8
ColorType: 'grayscale'
FormatSignature: ''
Comment: {}
Chapter 2: Fundamentals