How to curve fit an edge on an image

11 vues (au cours des 30 derniers jours)
Shay Lebovitz
Shay Lebovitz le 1 Juil 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 commentaire
darova
darova le 3 Juil 2020
Can you highlight/show edges/lines your want equations for?

Connectez-vous pour commenter.

Réponses (1)

Image Analyst
Image Analyst le 3 Juil 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.

Catégories

En savoir plus sur Images dans Help Center et File Exchange

Produits


Version

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by