calculate the eigen values and eigen vectors of an image.

3 vues (au cours des 30 derniers jours)
NARGISH
NARGISH le 17 Avr 2014
hi, this is my code for: -converting the rgb image to hsv image -obtain the blob -obtain the eigen values
clear all;
i=imread('A.jpg');
x =imresize(i,[100 100]);
j=rgb2hsv(x);
s=j(:,:,2);
sthres=s>0.2;
sthres=imfill(sthres,'holes');
%figure(1), imshow(sthres);
CC=bwconncomp(sthres);
numPixels = cellfun(@numel,CC.PixelIdxList);
[biggest,idx] = max(numPixels);
sthres(CC.PixelIdxList{idx}) = 1;
%figure(1), imshow(sthres);
M=mean2(sthres);
C=(sthres-M)*(sthres-M)';
lamda=eig(C);
[V,D] = eig(C);
i m not sure if my code is correct. Could someone please tell me how to obtain the eigen vectors. V,D,W]=eig(__) is showing error. please let me know if my code is wrong.

Réponses (0)

Catégories

En savoir plus sur Convert Image Type dans Help Center et File Exchange

Tags

Aucun tag saisi pour le moment.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by