matlab
DESCRIPTION
Image ProcessingTRANSCRIPT
![Page 1: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/1.jpg)
EVID Solutions04/08/23
EVID Solutions and IEEE SPCE-EVID Solutions and IEEE SPCE-SPITSPIT
Presents
![Page 2: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/2.jpg)
Topics CoveredMATLABMATLAB – GUIImage ProcessingSteganographySteganography – GUIEncryptionCompression
![Page 3: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/3.jpg)
Agenda for Day-1MATLABMATLAB – GUIImage ProcessingSteganography – An Introduction
![Page 4: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/4.jpg)
![Page 5: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/5.jpg)
Topics CoveredWhat is MATLAB?MATLAB EnvironmentMatrix ManipulationFunctionsLoopsPlotsBasic IP Commands
![Page 6: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/6.jpg)
What is MATLAB?A research and development tool
Developed by Mathworks Inc.
MATLAB = MATrix LABoratory
Why MATLAB?
![Page 7: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/7.jpg)
MATLAB EnvironmentCommand WindowWorkspaceCommand HistoryM-File Editor
![Page 8: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/8.jpg)
04/08/23
1. Command Window, Workspace
2. Command History
MATLAB Environment
![Page 9: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/9.jpg)
MATRIX Manipulations• Defining an Integer:
• Defining a 2-d column Matrix:
• Defining a 2-d row Matrix:
![Page 10: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/10.jpg)
• Defining a general 2-d Matrix:
• Defining a general 3-d Matrix:
• Defining a blank Matrix:
MATRIX Manipulations
![Page 11: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/11.jpg)
+ Addition
- Subtraction
* Multiplication
/ Division
\ Left division
^ Power
‘ Complex conjugate transpose
( ) Specify evaluation order
Operators - Arithmetic
![Page 12: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/12.jpg)
< Less than
<= Less than or equal to
> Greater than
>= Greater than or equal to
== Equal to
~= Not equal to
Operators – Relational
![Page 13: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/13.jpg)
AND A & B
OR A | B
NOT ~A
XOR xor(A,B)
Operators - Logical
![Page 14: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/14.jpg)
Exercise 1Optimal code for
Taking Input from 1 to 10 Getting square of each integer Summation of all squares Display of final value
![Page 15: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/15.jpg)
• For finding inverse of matrix;x= inv(a);
• For finding the determinant of matrix;x= det(a);
• For finding the transpose of matrix;x= trans(a);
• For Calculating the square root;x= sqrtm(a);
• For calculating the sum of all elements;x= sum(a);
Functions
![Page 16: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/16.jpg)
• To create a matrix with all elements as 1;x= ones(k);
• To create magic square matrix;x= magic(k);
• For finding the size of matrix;x= size(a);
• For finding the number of elements in matrix;
x= numel(a);
• For finding the maximum, minimum value in a matrix;
x= max(a); y=min(a);
Functions
![Page 17: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/17.jpg)
• Main types:
1. for:for i=1:10
//Place your code hereend
2. while:while(1)//Place your code here
end
3. if:if (Condition)//Place your code here
end
Loops in MATLAB
![Page 18: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/18.jpg)
Exercise 2Optimal Code for
Take any two input numbersConvert them into 8-bit binary Concatenate both of them together Form 5-6-5 matrices from the available 16-bit
data
![Page 19: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/19.jpg)
Plots in MATLABCommands covered: plot, xlabel, ylabel,
title grid, axis, stem, subplot xlabel('time (sec)'); ylabel('step
response'); title('My Plot'); Eg:To plot more than one graph on the
screen, use the command subplot(mnp) which partitions the screen into an mxn grid where p determines the position of the particular graph counting the upper left corner as p=1. For example,
subplot(211),semilogx(w,magdb); subplot(212),semilogx(w,phase);
![Page 20: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/20.jpg)
3-d Plots in MATLABx=[0:10]; y=[0:10]; z=x’*y;mesh(x,y,z); title(‘3-D Graph’);
![Page 21: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/21.jpg)
Exercise 3Optimal Code for
Create 5 x 5 matrix in Excel Import the matrix in MATLAB Use masking to remove any value above 100Export the matrix from MATLABRead new image in Excel
![Page 22: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/22.jpg)
Basic IP CommandsTo Read an Image:
imread()
To Display an Image: imshow() imview()
To Write an Image:Imwrite()
![Page 23: Matlab](https://reader033.vdocuments.mx/reader033/viewer/2022061119/546a9b22b4af9f125c8b45d7/html5/thumbnails/23.jpg)