how to make feature vector after edge detection?

1 回表示 (過去 30 日間)
MAYA M
MAYA M 2017 年 4 月 11 日
コメント済み: Image Analyst 2017 年 4 月 19 日
A=imread('218.jpg');
% HSV=rgb2hsv(A);% I=uint8(I);
% figure,imshow(HSV);title('Filtered Image');
%
% imshow(HSV);
HSV=zeros(size(A));
F1=[-1 -1 -1;0 0 0; 1 1 1];
F2=[-1 0 1;-1 0 1; -1 0 1];
A=double(A);
% Gx=[-1+0+1]-[-1+0+1];
% Gy=[-1+0+1]-[-1+0+1];
for i=1:size(A,1)-2
for j=1:size(A,2)-2
%Gradient operations
Gx=sum(sum(F1.*A(i:i+2,j:j+2)));
Gy=sum(sum(F2.*A(i:i+2,j:j+2)));
%Magnitude of vector
HSV(i+1,j+1)=sqrt(Gx.^2+Gy.^2);
end
end
%Define a threshold value
Thresh=210;
B=max(HSV,Thresh);
B(B==round(Thresh))=0;
figure,imshow(B);title('Edge detected Image');
  3 件のコメント
MAYA M
MAYA M 2017 年 4 月 19 日
my question is after detecting edge of 10 images. How can we make vector of this edge.
Image Analyst
Image Analyst 2017 年 4 月 19 日
Why? And it's easy to take the coordinates of an edge as a list of (x,y) coordinates if that's what you want using the find() function.

サインインしてコメントする。

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by