Fit curve, eliminating the outliers

5 次查看(过去 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