MATLAB Answers

How to curve fit an edge on an image

17 views (last 30 days)
Shay Lebovitz
Shay Lebovitz on 1 Jul 2020
Answered: Image Analyst on 3 Jul 2020
I am working on a project that requires me to curve-fit the outline of an image. This needs to be done for thousands of images, so the process can't be manual at all. All the images look like the one below. I would like to find equations of the edges of the leaf at large, and also the interference fringes. So far, I have binarized the image and done a canny edge detection method. From there, I was able to locate all the edge pixels and display them on a graph (see https://www.mathworks.com/matlabcentral/answers/140830-calculate-equation-of-a-curve-from-an-image). However, this method just fits all the edge points to one equation, which isn't what I want. Would there be any way to fit each edge to an equation separately, but also automatically? Thanks for your help!

  1 Comment

darova
darova on 3 Jul 2020
Can you highlight/show edges/lines your want equations for?

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 3 Jul 2020
There is no point in doing a Canny edge detection after you have binarized the image. Just binarize and scan your image from top to bottom finding the first and last pixel that are white. Then there may be some outliers so you can try isoutlier() or rmoutliers() to handles those.

  0 Comments

Sign in to comment.


Translated by