0% found this document useful (0 votes)
3 views13 pages

DSP Matlab Lecture # 01

MATLAB is a programming platform designed for engineers and scientists to analyze and design systems using a matrix-based language. It provides tools for image processing, allowing users to perform various operations on images, including reading, saving, and converting them. MATLAB supports both script and function files for executing commands and is widely used in fields such as signal processing, control systems, and computational biology.

Uploaded by

hmussawar477
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views13 pages

DSP Matlab Lecture # 01

MATLAB is a programming platform designed for engineers and scientists to analyze and design systems using a matrix-based language. It provides tools for image processing, allowing users to perform various operations on images, including reading, saving, and converting them. MATLAB supports both script and function files for executing commands and is widely used in fields such as signal processing, control systems, and computational biology.

Uploaded by

hmussawar477
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 13

MATLAB

INTRODUCTIONS
D I G I TA L S I G N A L P R O C E S S I N G
WHAT IS MATLAB ?

MATLAB is a programming platform designed


specifically for engineers and scientists to
analyze and design systems and products
that transform our world. The heart of
MATLAB is the MATLAB language, a matrix-
based language allowing the most natural
expression of computational mathematics.
WHAT IS IMAGE IN MATLAB?

MATLAB images are arrays of numeric data on


which you can perform analysis. For more
information, see Working with Images in MATLAB
Graphics.
MATLAB is a good interactive tool in image
processing and it has a wide area of application
and specification. MATLAB provide a platform
in which we can easily implement the
algorithm that will perform the desired
operation. MATLAB has several tools that are used
to enhance the image according to our desired.
MATLAB - COMMANDS

MATLAB is an interactive program for numerical computation and


data visualization. You can enter a command by typing it at the
MATLAB prompt
'>>' on the Command Window.
In this section, we will provide lists of commonly used general
MATLAB commands.
• Commands for Managing a Session
• MATLAB provides various commands for managing a session. The
following table provides all such commands −
THE M FILES

MATLAB allows writing two kinds of program files −


• Scripts − script files are program files with .m
extension. In these files, you write series of
commands, which you want to execute together.
Scripts do not accept inputs and do not return
any outputs. They operate on data in the
workspace.
• Functions − functions files are also program files
with .m extension. Functions can accept inputs
and return outputs.
USES OF MATLAB

• MATLAB is widely used as a computational tool in


science and engineering encompassing the fields
of physics, chemistry, math and all engineering
streams. It is used in a range of applications
including −
• Signal Processing and Communications
• Image and Video Processing
• Control Systems
• Test and Measurement
• Computational Finance
• Computational Biology
VARIABLES

• Variables require no declaration


• Creation by initialization (x=10;)
All variables are treated as matrices
• Calculations are much faster
• Advantages – Fast implementation and debugging
Powerful image processing toolbox
CONTINUE..

Defining variables
int a; >>a=1;

a=1; >>b=2+4;
double b;
b=2+4; Matlab
C/C++

Variables are created


when they are used

All variables are created as matrices with “some” type (unless


specified)
IMAGE I/O/DISPLAY

% Read image (support bmp, jpg,JPEG, png, ppm,


etc)
I = imread('lena.jpg');
% Save image
imwrite(I, 'lena_out.jpg');
% Display image
imshow(I);
% Alternatives to imshow
image(I);
IMAGE CONVERSIONS

% Type conversion
I1 = im2double(I);
% Convert from RGB to grayscale
I3 = rgb2gray(I);
IMAGE OPERATIONS

% Resize image as 60% smaller


Ires = imresize(I, 0.6);
EXAMPLES OF MATLAB PLOTS
COMMANDS

Imread ();
Imwrite ();
Imshow ();
Imadd ();
Rgb2gray ();
% Alternatives to show
image(I);

You might also like