Borrar filtros
Borrar filtros

perform edge detection on ROI

7 visualizaciones (últimos 30 días)
Manuel Fuelling
Manuel Fuelling el 22 de Mayo de 2018
Editada: Manuel Fuelling el 22 de Mayo de 2018
I use the eight image from matlab (see attachment) and i have the following code:
FullImage = imread('eight.tif');
roi_col = [50 50 250 250];
roi_row = [200 50 50 200];
ROI_help1 = roipoly(FullImage,roi_col,roi_row);
roi_col = [100 70 200 200];
roi_row = [180 100 70 180];
ROI_help2 = roipoly(FullImage,roi_col,roi_row);
ROI=logical(ROI_help2-ROI_help1);
YourFilter = @(x) edge(FullImage,'Canny',0.1);
J = roifilt2(FullImage,ROI,YourFilter);
figure, imshow(FullImage)
overlay=imoverlay(FullImage,J,'red');
hold on;
imshow(overlay);
This gives me this
I only want the canny algorithm to perform on the circle, where you can see the coins. The inner and outer area (completly in red) shouldnt be affacted and should display the regular image.

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by