Filter löschen
Filter löschen

Fit curve, eliminating the outliers

1 Ansicht (letzte 30 Tage)
prashanth A
prashanth A am 14 Dez. 2017
Bearbeitet: prashanth A am 14 Dez. 2017
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

Antworten (1)

Image Analyst
Image Analyst am 14 Dez. 2017
Bearbeitet: Image Analyst am 14 Dez. 2017
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 Kommentar
prashanth A
prashanth A am 14 Dez. 2017
Bearbeitet: prashanth A am 14 Dez. 2017
- 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

Melden Sie sich an, um zu kommentieren.

Community Treasure Hunt

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

Start Hunting!

Translated by