You are on page 1of 11

SYSTEM CONFIGURATION

HARDWARE REQUIREMENTS

CPU type : Intel Pentium 4


Clock speed : 3.0 GHz
RAM size : 512 MB
Hard disk capacity : 40 GB
Monitor type : 15 Inch Color Monitor
Keyboard type : Internet Keyboard
CD -drive type : 52xmax

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

FRONT END - MATLAB

Introduction

MATLAB is a high-performance language for technical computing integrates


computation, visualization, and programming in an easy-to-use environment where problems and
solutions are expressed in familiar mathematical notation. It is a prototyping environment,
meaning it focuses on the ease of development with language flexibility, interactive debugging,
and other conveniences lacking in performance-oriented languages like C and FORTRAN. While
Matlab may not be as fast as C, there are ways to bring it closer. We want to spend less time total
from developing, debugging, running, and until obtaining results.
It’s a numerical computing environment and applicable in matrix manipulations, plotting
of functions and data and also to implement image processing. Mainly used to interface with
Program’s written in other languages like C, C++ etc….
Adopted by control design Engineers. Now it is applicable in linear algebra & numerical
analysis. Using matlab, you can solve technical computing problems faster than with traditional
c, c++etc…. Development environment for managing code, files and data. Mathematical
functions like statistics, Fourier analysis, optimization and numerical integration.

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.

Its features a family of add-on application-specific solutions called toolboxes. Very


important to most users of MATLAB, toolboxes allow you to learn and apply specialized
technology. Toolboxes are comprehensive collections of MATLAB functions (M-files) that
extend the MATLAB environment to solve particular classes of problems. You can add on
toolboxes for signal processing, control systems, neural networks, fuzzy logic, wavelets,
simulation, and many other areas.

The MATLAB System

The MATLAB system consists of these main parts:

(1) Desktop Tools and Development Environment

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.

(2) Mathematical Function Library

This library is a vast collection of computational algorithms ranging from elementary


functions, like sum, sine, cosine, and complex arithmetic, to more sophisticated functions like

The Language

The MATLAB language is a high-level matrix/array language with control flow


statements, functions, data structures, input/output, and object-oriented programming features. It
allows both "programming in the small" to rapidly create quick programs you do not intend to
reuse. You can also do "programming in the large" to create complex application programs
intended for reuse.
(1) Graphics

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.

(2) External Interfaces

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.

(3) Array Preallocation

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.

(4) JIT Acceleration


Matlab 6.5 (R13) and later feature the Just-In-Time (JIT) Accelerator for improving the
speed of M-functions, particularly with loops. By knowing a few things about the accelerator,
you can improve its performance.
The JIT Accelerator is enabled by default. To disable it, type \feature accel off" in the
console, and \feature accel on" to enable it again. As of Matlab R2008b, only a subset of the
Matlab language is supported for acceleration. Upon encountering an unsupported feature,
acceleration processing falls back to non-accelerated evaluation. Acceleration is most effective
when significant contiguous portions of code are supported.
 Data types: Code must use supported data types for acceleration: double (both real and
complex), logical, char, int8 {32, uint8 {32. Some struct, cell, classdef, and function
handle usage is supported. Sparse arrays are not accelerated.
 Array shapes: Array shapes of any size with 3 or fewer dimensions are supported.
Changing the shape or data type of an array interrupts acceleration. A few limited
situations with 4D arrays are accelerated.
 Function calls: Calls to built-in functions and M-functions are accelerated. Calling MEX
functions and Java interrupts acceleration. (See also page 14 on in lining simple
functions.)
 Conditionals and loops: The conditional statements if, else if, and simple switch
statements are supported if the conditional expression evaluates to a scalar. Loops of the
form for k=a:b, for k=a:b:c, and while loops are accelerated if all code within the loop is
supported.

(5) In-Place Computation

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.

(6) Multithreaded Computation

Matlab 7.4 (R2007a) introduced multithreaded computation for multicore and


multiprocessor computers. Multithreaded computation accelerates some per-element functions
when applied to large arrays (for example,^, sin, exp) and certain linear algebra functions in the
BLAS library. To enable it, select File! Preferences! General! Multithreading and select \Enable
multithreaded computation." Further control over parallel computation is possible with the
Parallel Computing Toolbox. Using par for and spmd

4.1.4 Working formats in Matlab

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.

Intensity image (gray scale image)

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

In some applications we want to study a sequence of images. This is very common in


biological and medical imaging where you might study a sequence of slices of a cell. For these
cases, the multiframe format is a convenient way of working with a sequence of images. In case
you choose to work with biological imaging later on in this course, you may use this format.
Fundamentals

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.

Displaying an image given on matrix form

Operation: Matlab command:

Display an image represented as the matrix X. imagesc(X)

Adjust the brightness. s is a parameter such that


brighten(s)
-1<s<0 gives a darker image, 0<s<1 gives a brighter image.

Change the colors to gray. colormap(gray)

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)

Operation: Matlab command:

Display an image represented as the matrix X. imshow(X)

Zoom in (using the left and right mouse button). zoom on

Turn off the zoom function. zoom off

Image formats supported by Matlab

The following image formats are supported by Matlab:

 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.

Loading and saving variables in 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.

You might also like