Fit curve, eliminating the outliers

조회 수: 6 (최근 30일)
prashanth A
prashanth A 2017년 12월 14일
편집: prashanth A 2017년 12월 14일
I am trying to implement a segmentation algorithm on a digital image. One of my code finds the edge pixels from the portion of the object. I want to fit a curve to these set of edge points. I thought of using non-linear curve fitting for the same. But the set of coordinates thus found are having many outliers, which are not true edge pixels. How do I eliminate these points and fit the curve for the remaining true edge points only?
The above figure is a scatter plot of the pixels. As can be seen, above 210 on x-axis, there is a lot of noise, or non-edge pixels. How do I fit a curve for only the 0 to 210 portion? This range may vary from image to image, and hence can't be hard coded.
Any suggestions, and inputs are welcome.
Thank you

답변 (1개)

Image Analyst
Image Analyst 2017년 12월 14일
편집: Image Analyst 2017년 12월 14일
How did you actually get these (x,y) locations from the edges in the image? Did you use the edge() function? Or something else?
Do you want an analytical equation for a curve? If so, what is the model? Quadratic, exponential decay? Something else? Or do you want a smoothed numerical array, like maybe just smooth it a bit with smooth() or sgolayfilt() or something?
Have you tried to use movstd() to identify when the "curve" starts to go crazy? If you can't, then post your data in a .mat file and I'll do it. Post 2 or 3 data sets so I can see how well it works with different images.
See this link so you can provide information that allows us to give you a useful answer.
  댓글 수: 1
prashanth A
prashanth A 2017년 12월 14일
편집: prashanth A 2017년 12월 14일
- The image is shown below, a chest x-ray, to find the rib border - I have used edge() - .mat file is attached with the data

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

카테고리

Help CenterFile Exchange에서 Get Started with Curve Fitting Toolbox에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by