フィルターのクリア

perform edge detection on ROI

7 ビュー (過去 30 日間)
Manuel Fuelling
Manuel Fuelling 2018 年 5 月 22 日
編集済み: Manuel Fuelling 2018 年 5 月 22 日
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.

回答 (0 件)

Community Treasure Hunt

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

Start Hunting!

Translated by