3.1.4. COMMANDS USED.
MATLAB has so many commands, but we need this:
0. Imread(): this command is used for reading an
image. Within the parentheses, you type the name of an image file you wish to
read. Put the filename within the single quotes.
1. Imshow(): this command is used to display an
image represented as the matrix.
2. rgb2gray(): this command is used to
convert between RGB format to intensity (grayscale) format.
3. figure: this command can be used to create a
new current figure for the display. 4. Imdilate: this command
is used to dilate the image.
5. figure(n): will check whether the figure n
exists, if it switches the focus to it, otherwise a new window is created.
6. Double: convert a matrix to the
double-precision floating- point format.
7. Imagesc ( ): t his command is used to display
an image
8. Edge: is command used to create the binary
gradient mask.
9. save x and load x: these commands are used
to load and save variables in MATLAB. Once you have read a file, you probably
convert it into an intensity image (a matrix) and work with this matrix; this
matrix is represented by the variable x.
3.1.5. SYMBOLES USED.
1. ASTERISK (*): An asterisk in a
filename specification is used as a wildcard specified.
2. COLON (:) the colon operator
generates a sequence of numbers that you can use in creating or indexing into
arrays.
3. COMMA (,): comma is used to
separate the following types of elements
4. DOT (.): the single dot operator
has the following different uses in MATLAB.
5. DOT-DOT (..):two dots in sequence
refer to the parent of the current directory.
6. EXCLAMATION POINT (!): The
exclamation point precedes operating system commands that you want to execute
from within MATLAB.
7. PARENTHESES ( ): Parentheses are
used mostly for indexing into elements of an array or for specifying arguments
passed to a called function.
8. PERCENT (%): The percent sign
is most commonly used to indicate no executable text within the body of a
program. This text is normally used to include comments in your code. Some
functions also interpret the percent sign as a conversion specifier.
9. SEMICOLON (;): The semicolon
can be used to construct arrays, suppress output from a MATLAB command, or to
separate commands entered on the same line. Bt the way, semicolon prevents
showing the result of the program line in workspace. This is handily especially
with image.
10. SINGLE QUOTES (' '): Single
quotes are the constructor symbol for MATLAB character arrays.
11. SPACE CHARACTER: The space
character serves a purpose similar to the comma in that it can be used to
separate row elements in an array constructor, or the values returned by a
function.
12. SLASH AND BACKSLASH / \: the slash (/) and backslash (\)
characters separate the elements of a path or directory string. On
Windows-based systems, both slash and backslash have the same effect. On
UNIX-based systems, you must use slash only.
On a Windows system, you can use either backslash or slash:
dir([matlabroot '\toolbox\matlab\elmat\shiftdim.m'])
dir([matlabroot '/toolbox/matlab/elmat/shiftdim.m'])
On a UNIX system, use only the forward slash:
dir([matlabroot '/toolbox/matlab/elmat/shiftdim.m'])
13. SQUARE BLACKETS [ ]: Square
brackets are used in array construction and concatenation, and also in
declaring and capturing values returned by a function.
14. CURLY BRACES { }: Use curly
braces to construct or get the contents of cell arrays,
|