calculate the eigen values and eigen vectors of an image.

3 visualizaciones (últimos 30 días)
NARGISH
NARGISH el 17 de Abr. de 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.

Respuestas (0)

Categorías

Más información sobre Convert Image Type en Help Center y File Exchange.

Etiquetas

Aún no se han introducido etiquetas.

Community Treasure Hunt

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

Start Hunting!

Translated by