calculate the eigen values and eigen vectors of an image.

조회 수: 3 (최근 30일)
NARGISH
NARGISH 2014년 4월 17일
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