calculate the eigen values and eigen vectors of an image.

3 次查看(过去 30 天)
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.

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Convert Image Type 的更多信息

标签

尚未输入任何标签。

Community Treasure Hunt

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

Start Hunting!

Translated by