How to curve fit an edge on an image

15 Ansichten (letzte 30 Tage)
Shay Lebovitz
Shay Lebovitz am 1 Jul. 2020
Beantwortet: Image Analyst am 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 Kommentar
darova
darova am 3 Jul. 2020
Can you highlight/show edges/lines your want equations for?

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Image Analyst
Image Analyst am 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.

Kategorien

Mehr zu Images finden Sie in Help Center und File Exchange

Produkte


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by