Professional Documents
Culture Documents
HARDWARE REQUIREMENTS
SOFTWARE REQUIREMENTS
O p e r a t i n g S ys t e m : W i n d o w s X P
Front End : Mat lab
SOFTWARE DESCRIPTION
Introduction
It is an interactive system whose basic data element is an array that does not require
dimensioning. It allows you to solve many technical computing problems, especially those with
matrix and vector formulations, in a fraction of the time it would take to write a program in a
scalar no interactive language such as C or FORTRAN.
The name MATLAB stands for matrix laboratory. MATLAB was originally written to
provide easy access to matrix software developed by the LINPACK and EISPACK projects.
Today, MATLAB engines incorporate the LAPACK and BLAS libraries, embedding the state of
the art in software for matrix computation.
It has evolved over a period of years with input from many users. In university
environments, it is the standard instructional tool for introductory and advanced courses in
mathematics, engineering, and science. In industry, MATLAB is the tool of choice for high-
productivity research, development, and analysis.
This part of MATLAB is the set of tools and facilities that help you use and become more
productive with MATLAB functions and files. Many of these tools are graphical user interfaces.
It includes: the MATLAB desktop and Command Window, an editor and debugger, a code
analyzer, browsers for viewing help, the workspace, and files, and other tools.
The Language
MATLAB has extensive facilities for displaying vectors and matrices as graphs, as well
as annotating and printing these graphs. It includes high-level functions for two-dimensional and
three-dimensional data visualization, image processing, animation, and presentation graphics. It
also includes low-level functions that allow you to fully customize the appearance of graphics as
well as to build complete graphical user interfaces on your MATLAB applications.
The external interfaces library allows you to write C and Fortran programs that interact
with MATLAB. It includes facilities for calling routines from MATLAB (dynamic linking), for
calling MATLAB as a computational engine, and for reading and writing MAT-files.
Matlab's matrix variables have the ability to dynamically augment rows and columns.
For example,
>> a = 2
a=
2
>> a(2,6) = 1
a=
200000
000001
Matlab automatically resizes the matrix. Internally, the matrix data memory must be
reallocated with larger size. If a matrix is resized repeatedly like within a loop this overhead can
be significant. To avoid frequent reallocations, preallocate the matrix with the zeros command.
Introduced in Matlab 7.3 (R2006b), the element-wise operators (+, .*, etc.) and some other
functions can be computed in-place. That is, a computation like
x = 5*sqrt(x.ˆ2 + 1);
is handled internally without needing temporary storage for accumulating the result. An M-
function can also be computed in-place if its output argument matches one of the input
arguments.
x = myfun(x);
function x = myfun(x)
x = 5*sqrt(x.ˆ2 + 1);
return;
To enable in-place computation, the in-place operation must be within an M-function (and for an
in- place function, the function itself must be called within an M-function). Currently, there is no
support for in-place computation with MEX-functions.
If an image is stored as a JPEG-image on your disc we first read it into Matlab. However,
in order to start working with an image, for example perform a wavelet transform on the image,
we must convert it into a different format. This section explains four common formats.
This is the equivalent to a “gray scale image” and this is the image we will mostly work
with in this course. It represents an image as a matrix where every element has a value
corresponding to how bright/dark the pixel at the corresponding position should be colored.
There are two ways to represent the number that represents the brightness of the pixel: The
double class (or data type). This assigns a floating number (“a number with decimals”) between
0 and 1 to each pixel. The value 0 corresponds to black and the value 1 corresponds to white.
The other class is called uint8 which assigns an integer between 0 and 255 to represent the
brightness of a pixel. The value 0 corresponds to black and 255 to white. The class uint8 only
requires roughly 1/8 of the storage compared to the class double. On the other hand, many
mathematical functions can only be applied to the double class. We will see later how to convert
between double and uint8.
Binary image
This image format also stores an image as a matrix but can only color a pixel black or
white (and nothing in between). It assigns a 0 for black and a 1 for white.
Indexed image
This is a practical way of representing color images. (In this course we will mostly work
with gray scale images but once you have learned how to work with a gray scale image you will
also know the principle how to work with color images.) An indexed image stores an image as
two matrices. The first matrix has the same size as the image and one number for each pixel. The
second matrix is called the color map and its size may be different from the image. The numbers
in the first matrix is an instruction of what number to use in the color map matrix.
RGB image
This is another format for color images. It represents an image with three matrices of
sizes matching the image format. Each matrix corresponds to one of the colors red, green or blue
and gives an instruction of how much of each of these colors a certain pixel should use.
Multiframe image
A digital image is composed of pixels which can be thought of as small dots on the
screen. A digital image is an instruction of how to color each pixel. We will see in detail later on
how this is done in practice. A typical size of an image is 512-by-512 pixels. Later on in the
course you will see that it is convenient to let the dimensions of the image to be a power of 2. For
example, 29=512. In the general case we say that an image is of size m-by-n if it is composed of
m pixels in the vertical direction and n pixels in the horizontal direction.
Let us say that we have an image on the format 512-by-1024 pixels. This means that the
data for the image must contain information about 524288 pixels, which requires a lot of
memory! Hence, compressing images is essential for efficient image processing. You will later
on see how Fourier analysis and Wavelet analysis can help us to compress an image
significantly. There are also a few “computer scientific” tricks (for example entropy coding) to
reduce the amount of data required to store an image.
There are many different data types, or classes, that you can work with in the MATLAB
software. You can build matrices and arrays of floating-point and integer data, characters and
strings, and logical true and false states. Function handles connect your code with any MATLAB
function regardless of the current scope. Structures and cell arrays, provide a way to store
dissimilar types of data in the same array. There are 15 fundamental classes in MATLAB. Each
of these classes is in the form of a matrix or array. With the exception of function handles, this
matrix or array is a minimum of 0-by-0 in size and can grow to an n-dimensional array of any
size. A function handle is always scalar (1-by-1).
Numeric classes in the MATLAB software include signed and unsigned integers, and
single- and double-precision floating-point numbers. By default, MATLAB stores all numeric
values as double-precision floating point. (You cannot change the default type and precision.)
You can choose to store any number, or array of numbers, as integers or as single-precision.
Integer and single-precision arrays offer more memory-efficient storage than double-precision.
All numeric types support basic array operations, such as subscripting, reshaping, and
mathematical operations.
How to display an image in Matlab
Here are a couple of basic Matlab commands (do not require any tool box) for displaying an
image.
Sometimes your image may not be displayed in gray scale even though you might have
converted it into a gray scale image. You can then use the command colormap(gray) to “force”
Matlab to use a gray scale when displaying an image.
If you are using Matlab with an Image processing tool box installed, I recommend you to use the
command imshow to display an image.
Displaying an image given on matrix form (with image processing tool box)
BMP
HDF
JPEG
PCX
TIFF
XWB
Most images you find on the Internet are JPEG-images which is the name for one of the
most widely used compression standards for images. If you have stored an image you can usually
see from the suffix what format it is stored in. For example, an image named myimage.jpg is
stored in the JPEG format and we will see later on that we can load an image of this format into
Matlab.
This section explains how 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. Once
you are done you may want to save the matrix representing the image in order to continue to
work with this matrix at another time. This is easily done using the commands save and load.
Note that save and load are commonly used Matlab commands, and works independently of what
tool boxes that are installed.
DESING ENGINEERING
GENERAL
Design Engineering deals with the various UML [Unified Modeling language diagrams
for the implementation of project. Design is a meaningful engineering representation of a thing
that is to be built. Software design is a process through which the requirements are translated into
representation of the software. Design is the place where quality is rendered in software
engineering. Design is the means to accurately translate customer requirements into finished
product.
The next responsibility of many design engineers is prototyping. A model of the product
is created and reviewed. Prototypes are either functional or non-functional. Functional "alpha"
prototypes are used for testing and the non-functional are used for form and fit checking. Virtual
prototyping software like Ansys or Comsol may also be used. This stage is where design flaws
are found and corrected, and tooling, manufacturing fixtures, and packaging are developed.