Borrar filtros
Borrar filtros

Edge detection only in a region of an image

9 visualizaciones (últimos 30 días)
Efstathios Kontolatis
Efstathios Kontolatis el 12 de En. de 2017
Respondida: Vishal Neelagiri el 17 de En. de 2017
I have an image and I want to make edge detection only on a region of this. In order to do so I have created a complex polygon using roipoly. Does anyone know how to perform edge detection on this region now? Thank you very much in advance

Respuestas (1)

Vishal Neelagiri
Vishal Neelagiri el 17 de En. de 2017
You can use the 'edge' function to detect the edges in an image. You can also use this on the output of the 'roipoly' function. For example:
I = imread('eight.tif');
c = [222 272 300 270 221 194];
r = [21 21 75 121 121 75];
BW = roipoly(I,c,r);
figure, imshow(I)
figure, imshow(BW)
edge(BW)
You can refer to the following documentation links:
https://www.mathworks.com/help/images/ref/roipoly.html#f6-163815
https://www.mathworks.com/help/images/ref/edge.html

Community Treasure Hunt

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

Start Hunting!

Translated by