How to detect the edge in following image?

3 ビュー (過去 30 日間)
Glypton
Glypton 2022 年 6 月 27 日
コメント済み: Image Analyst 2022 年 7 月 4 日
How would I detect the edge drew in the picture below ? First I tried to remove noises using the median filter on the image. Then I averaged the values from row 220 to 225 to remove the artifact in the middle of the image. Then, I tried to use the edge function but it does not work. I am just not able to detect the edge I drew in the attached image. How would one do this? Also attached to this post is the first and second half of the image shown in the picture. I would appreciate any help!
What I have tried so far:
load("image.mat", "image");
for r = 220:225
for c = 1:14824
image(r,c) = (image(219,c) + image(226,c))/2;
end
end
filteredImage = medfilt2(image(:, 1:14824), [6,6]);
imagesc(filteredImage);
colormap("gray");
BW = edge(filteredImage, "sobel",[]);
BW = bwareaopen(BW, 20, 4);
regionOfInterest = BW(200:350, :);
[rows, columns] = find(regionOfInterest);
[C, ia] = unique(columns);
rows = rows(ia) + 200;
e = fit(C,rows, "linearinterp");
hold on;
plot(e, C, rows);
and the result
  9 件のコメント
Glypton
Glypton 2022 年 7 月 4 日
@Image Analyst could you tell my why you used 3 and 7 for sigma here
edgeImage = imgaussfilt(grayImage, 3) - imgaussfilt(grayImage, 7);
How did you get these values?
Image Analyst
Image Analyst 2022 年 7 月 4 日
Trial and error. Or you could put into a nested for loop to try all combinations and see which works best.

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

回答 (0 件)

カテゴリ

Help Center および File ExchangeImage Segmentation and Analysis についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by