curve fitting of an image

조회 수: 25 (최근 30일)
Ali Jarekji
Ali Jarekji 2022년 1월 4일
댓글: DGM 2023년 9월 13일
I have this image which i changed to binary. I want to write a code that draws a fitting curve into the points shown in the figure attached. How can I do that?
  댓글 수: 4
Image Analyst
Image Analyst 2022년 1월 4일
It would be better to attach the original image, not the segmented image. Looks like your segmentation algorithm is not so good. Also post another image where you've painted the curve over the original gray scale image so we can see what you're trying to find.
Finally, say WHY it's the curve that you think you need to find, and if you actually had a list of (x,y) coordinates of the curve, what would you do with that information.
KALYAN ACHARJYA
KALYAN ACHARJYA 2022년 1월 5일

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

답변 (1개)

VINAYAK LUHA
VINAYAK LUHA 2023년 9월 13일
Hi Ali,
I understand that you wish to know about how to fit a curve to the points in a binarized image.
Follow the steps mentioned below in order to achieve that:
  1. Find the connected components in the binarized image using "bwconncomp" function.
  2. Convert the "PixelIdxList" in each found connected component to [x, y] data using the “ind2sub” function.
  3. Fit a polynomial degree curve to the data using the “fit” function.
  4. Display the original image using “imshowfunction.
  5. Plot the fitted curves on top of the image.
Hope this helps.
Regards,
Vinayak Luha
  댓글 수: 1
DGM
DGM 2023년 9월 13일
Can you provide an example applying these steps to the given image?

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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by