Sale!

# CSE 5524 Homework Assignment #4 solved

Original price was: \$35.00.Current price is: \$30.00.

Category:

## Description

1) Write a function to compute the 7 similitude moment shape descriptors. Test and
compare results on the rectangle box images ‘boxIm[1-4].bmp’ on the website. How
do they change across the box images? Please make sure your function will work with
non-binary (grayscale) imagery (you will need this for later assignments), i.e., do not
use Matlab’s regionprops function for the mean or area in your calculations. [4 pts]
Nvals = similitudeMoments(boxIm1);
2) Using the datafile (eigdata.txt) provided on the WWW site, perform the following
MATLAB commands [1 pt]:
clear; close all;
X = eigdata;
subplot(2,1,1);
plot(X(:,1),X(:,2),’b.’);
axis(‘equal’);
%% mean-subtract data
m = mean(X);
Y = X – ones(size(X,1),1)*m;
subplot(2,1,2);
plot(Y(:,1),Y(:,2),’r.’);
axis(‘equal’);
[ NEXT PAGE ]
3) Compute the eigenvalues (V) and eigenvectors (U) of the data (stored in Y) using the
function eig() in Matlab (recall that you use either the covariance matrix or the
inverse-covariance matrix of the data – see class notes). Plot the mean-subtracted
data Y and the 2-D Gaussian ellipse axes for given the eigenvectors in U (you can use
the plot command in Matlab for this). Use the eigenvalues in V to give the
appropriate 3σ (standard deviation – not variance!) length to each axis (did you
compute the eigenvalues from the covariance or inverse covariance of Y? The
eigenvalues will be related but different! See class notes). [4 pts]
[Note: it would also be nice to draw the 3σ ellipse around Y if you can – Google
‘matlab ellipse.m’ for some code if you are interested.]
4) Rotate Y using the eigenvectors to make the data uncorrelated (i.e., project data Y
onto the eigenvectors – see class slides). Plot the results. [2 pts]
5) Turn in all code, printouts of images, and discussion of results. Make a script to do