How to curve fit an edge on an image

조회 수: 11 (최근 30일)
Shay Lebovitz
Shay Lebovitz 2020년 7월 1일
답변: Image Analyst 2020년 7월 3일
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
darova
darova 2020년 7월 3일
Can you highlight/show edges/lines your want equations for?

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2020년 7월 3일
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.

카테고리

Help CenterFile Exchange에서 Images에 대해 자세히 알아보기

제품


릴리스

R2020a

Community Treasure Hunt

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

Start Hunting!

Translated by