Basic Image Import, Processing, and Export - MATLAB & Simulink - MathWorks India
Basic Image Import, Processing, and Export - MATLAB & Simulink - MathWorks India
http://in.mathworks.com/help/images/image-import-and-export.html#z...
mage into the workspace, adjust the contrast in the image, and then write the adjusted
imread command. The example reads one of the sample images included with the
le named pout.tif , and stores it in an array named I . imread infers from the file that the
le Format (TIFF).
nction. You can also view an image in the Image Viewer app. The imtool function opens
an integrated environment for displaying images and performing some common image
pp provides all the image display capabilities of imshow but also provides access to several
images, such as scroll bars, the Pixel Region tool, Image Information tool, and the
the image data in the workspace, using the whos command. You can also check the
1 of 5
03-Jun-15 3:55 PM
Basic Image Import, Processing, and Export - MATLAB & Simulink - M...
http://in.mathworks.com/help/images/image-import-and-export.html#z...
function returns the image data in the variable I , which is a 291-by-240 element
CONTENTS
Bytes
Class
69840
uint8
Close
Attributes
ensities. The image pout.tif is a somewhat low contrast image. To see the distribution of
gram by calling the imhist function. (Precede the call to imhist with the figure command
e the display of the image I in the current figure window.) Notice how the histogram
image is rather narrow. The range does not cover the potential range of [0, 255], and is
ould result in good contrast.
histeq function. Histogram equalization spreads the intensity values over the full
(The toolbox includes several other functions that perform contrast adjustment, including
active tools such as the Adjust Contrast tool, available in the Image Viewer.)
2 of 5
03-Jun-15 3:55 PM
Basic Image Import, Processing, and Export - MATLAB & Simulink - M...
CONTENTS
http://in.mathworks.com/help/images/image-import-and-export.html#z...
Close
e a histogram of the equalized image I2 . If you compare the two histograms, you can see
3 of 5
03-Jun-15 3:55 PM
Basic Image Import, Processing, and Export - MATLAB & Simulink - M...
CONTENTS
http://in.mathworks.com/help/images/image-import-and-export.html#z...
Close
a Disk File
disk file, using the imwrite function. This example includes the filename extension
function writes the image to a file in Portable Network Graphics (PNG) format, but you
e, using the imfinfo function. The imfinfo function returns information about the image
h, and height.
4 of 5
03-Jun-15 3:55 PM
Basic Image Import, Processing, and Export - MATLAB & Simulink - M...
CONTENTS
http://in.mathworks.com/help/images/image-import-and-export.html#z...
Close
/tmp/Bdoc15a_200152_161220/tpf05ecb51_9f0a_4e...'
23-Feb-2015 09:38:29'
grayscale'
137 80 78 71 13 10 26 10]
5 of 5
03-Jun-15 3:55 PM