How to highlight lines on the coin.
2 次查看(过去 30 天)
显示 更早的评论
采纳的回答
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
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!