How to highlight lines on the coin.

1 回表示 (過去 30 日間)
Shubham
Shubham 2024 年 1 月 29 日
コメント済み: Shubham 2024 年 1 月 30 日

Hi, I am having a coin image but I'm unable to highlight the lines or the curves.

採用された回答

Morgan
Morgan 2024 年 1 月 29 日
編集済み: Morgan 2024 年 1 月 29 日
% LOAD IMAGE
B = imread('coin_data.png');
% CONVERT TO GRAY IMAGE
B = im2double(B);
B = rgb2gray(B);
% REMOVE BLACK BOX IN IMAGE
B(B == 0) = 1;
% YOU CAN CLIP B TO GET BETTER EDGES
% HERE BY DOING:
% B = B > lb & B < ub;
% EDGE DETECT
BW = edge(B);
% VIEW IMAGE
imshow(B);
colorbar
% SHOW EDGES
hold on
contour(BW,'-r')
And this is the result I get
  1 件のコメント
Shubham
Shubham 2024 年 1 月 30 日
Thank you

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

その他の回答 (0 件)

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by