Furthermore, MATLAB is a modern
programming language environment: it has sophisticated data structures,
contains built-in editing and debugging tools, and supports object-oriented
programming.
These
factors make MATLAB an excellent tool for teaching and research. MATLAB has
many advantages compared to conventional computer languages (e.g., C, FORTRAN)
for solving technical problems. MATLABis an interactive system whose basic
data element is an array that does not require dimensioning.
The
software package has been commercially available since 1984 and is now
considered as a standard tool at most universities and industries worldwide. It
has powerful built-in routines that enable a very wide variety of computations.
It also has easy to use graphics commands that make the
visualization of results immediately available.
Specific applications are collected in packages
referred to as toolbox. There are toolboxes for signal processing, symbolic
computation, control theory, simulation, optimiza- tion, and several other
fields of applied science and engineering. I
For an introduction on Matlab we strongly recommend
the student to read the system’s on-line help, particularly the sections MATLAB and subsections Development Environment, Mathematics, Programming and Data Types, and for information about Matlab’s
graphical resources, the student should read the subsections Graphics, 3-D Visualization and Creating
Graphical User Interfaces.
- For
an introduction on Matlab’s image processing functions we recommend the
exercises on this list as well as the reading of the section Image Processing Toolbox and of the
subsections Getting Started, Introduction and Displaying and Printing Images of
the on-line help.
Basic
command:
imread
Read image from
graphics file
A =
imread(filename, fmt)
[X,
map] = imread(...)
[...]
= imread(filename)
[...] = imread(URL,...)
[...] = imread(...,Param1,Val1,Param2,Val2...)
The
return value A is an array containing the
image data. If the file contains a grayscale image, A is
an M-by-N array. If the file contains a truecolor image, A is
an M-by-N-by-3 array. For TIFF files containing color images that use the CMYK
color space, A is an M-by-N-by-4 array. See TIFF in the Format-Specific
Information section for more information.
Imshow:-
Display image
Syntax
- imshow(I)
- imshow(I,RI)
- imshow(X,map)
- imshow(X,RX,map)
- imshow(filename)
- imshow(___,Name,Value...)
- imshow(gpuarrayIM,___)
- imshow(I,[low high])
- himage = imshow(__)
imshow(I,RI) displays the image
I with associated 2-D spatial
referencing object
RI.
imshow(I) displays the image
I in a Handle Graphics
®
figure, where
I is a grayscale, RGB (truecolor), or binary image.
For binary images,
imshow displays pixels with the value
0 (zero) as black and
1 as white.
imshow(X,RX,map) displays the indexed image X with associated 2-D spatial
referencing object RX and colormap MAP.