how to make feature vector after edge detection?

1 visualización (últimos 30 días)
MAYA M
MAYA M el 11 de Abr. de 2017
Comentada: Image Analyst el 19 de Abr. de 2017
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 comentarios
MAYA M
MAYA M el 19 de Abr. de 2017
my question is after detecting edge of 10 images. How can we make vector of this edge.
Image Analyst
Image Analyst el 19 de Abr. de 2017
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.

Iniciar sesión para comentar.

Respuestas (0)

Etiquetas

Community Treasure Hunt

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

Start Hunting!

Translated by