How to use the edge function to extract a curve from the photo, and then draw this curve on the coordinate system, and finally smooth the curve.

8 views (last 30 days)
How to use the edge function to extract a curve from the photo, and then draw this curve on the coordinate system, and finally smooth the curve.I am very grateful to everyone for helping me solve this problem.
  4 Comments

Sign in to comment.

Accepted Answer

KALYAN ACHARJYA
KALYAN ACHARJYA on 18 Nov 2020
Edited: KALYAN ACHARJYA on 18 Nov 2020
data=imbinarize(imread('image.jpeg'));
result=edge(data);
figure,imshow(result);
[r,c]=find(result==1);
figure,plot(c,r,'.');
  9 Comments
Wesley
Wesley on 19 Nov 2020
I found the source of the problem. The reason is that the MATLAB software draws the line with the point in the upper left corner as the origin, so we see the image in the opposite direction to the original image.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!