.


:




:

































 

 

 

 


, MATLAB. - .

 

MATLAB . , , .

Image Processing Toolbox (IPT) MATLAB ( - -), MATLAB .

() MATLAB imread :

imread(filename).

filename , ( ). ,

>> f=imread(chestxray.jpg);

JPEG chestxray f. , () filename. MATLAB . , MATLAB () . (>>) , MATLAB.

, imread imwrite, MATLAB 6.5.

TIFF JPEG GIF BMP PNG XWD Tagget Image File Format Joint Photographic Experts Group Graphics Interchange Format Windows Bitmap Portable Network Graphics X Window Dump .tif,.tiff .jpg,.jpeg .gif .bmp .png .xwd

, filename . , , MATLAB. filename. ,

>> f=imread(D:\myimage\chestxray.jpg);

myimage D:,

>> f=imread(.\myimage\chestxray.jpg);

myimage . MATLAB .

size(f) , .. :

>> size(f)

ans =

1024 1024

,

>> [M,N]=size(f);

M , N .

whos . ,

>> whos f

:

Name Size Bytes Class
f 1024x1024   uint8 array
Grand total is 1048576 elements using 1048576 bytes

unit8 MATLAB.

 

imshow, :

imshow(fg,G);

f , G , . G , 256 .

imshow(f,[low high])

, low , high - . , .

imshow(f, [ ])

low f, high .

1. .

bird.bmp, imshow:

>> f=imread('D:\Document\bird.bmp');

>> whos f

Name Size Bytes Class
f 512x512   uint8 array
Grand total is 262144 elements using 262144 bytes

>> imshow(f, [ ])

, , .

, , .

imshow, MATLAB . , figure.

>> imshow(f), figure, imshow(g)

. ,

>> imshow(g, [ ])

 

imwrite, :

imwrite(f, filename)

filename , MATLAB (. . 1). . , f TIFF patient:

>> imwrite(f, patient , tif )

, ,

>> imwrite(f, patient.tif )

filename , imwrite . imwrite , .

 

 

, , . . 1 , MATLAB. MATLAB double.

 

1. . , ,

double , , 10308 10308 (8 ).
uint8 [0,255] (1 ).
uintl6 [0,65535] (2 ).
uint32 [0,4294967295] (4 ).
int8 [128,127] (1 ).
intl6 [32768, 32767] (2 ).
int32 [-2147483648, 2147483647] (4 ).
single , , 1038 1038 (4 ).
char ( ) (2 ).
logical 0 1 (1 ).

 

IPT :

( );

;

;

RGB.

, , . RGB

, . uint8 uintl6, , , [0,255] [0,65535]. double, . , double [0,1].

MATLAB . , 0 1. 0 1 , , uint8, . logical. , 0 1,

= logical().

, 0 1, logical 1, 0. .

, , islogical:

islogical(C).

, 1, - 0.



<== | ==>
 |
:


: 2017-03-11; !; : 2559 |


:

:

.
==> ...

1297 - | 1282 -


© 2015-2024 lektsii.org - -

: 0.016 .