Removing noise boundaries from segmented binary image that is not part of a curve?

1 visualizzazione (ultimi 30 giorni)
I am trying to detect a curve in a image. This curve is broken up in many places. After some segmentation and thresholding my final binary image still has some noise. I will eventually be connecting all the different boundaries but then the noise is also counted as a boundary and that should not be part of the final connected curve. Is there any other function that will analyze boundaries and see if they are part of a curve or just noise??? The noise boundaries are different sizes, different entropies, different perimeters... so I can't just filter by property.
I have so many different images so Im not looking for a specific solution to one picture. I am just wondering what the best way to remove noise in binary images would be. That's why I haven't attached a picture. I have already tried fitting but that does not seem like a good solution. Maybe if somehow the boundary will be in the curve if it is between the coordinates of the previous boundary and the next??? Maybe some sort of pattern recognition?
  2 Commenti
Image Analyst
Image Analyst il 22 Ago 2017
I don't have the Crystal Ball Toolbox yet, so you'll have to show me your image, like people usually do when asking for image analysis advice. There are a variety of ways to detect outliers or noise.
awezmm
awezmm il 23 Ago 2017
Modificato: Image Analyst il 23 Ago 2017
I'm not a usual person...
I found this thread:
My data is very close to the one in the question. I basically take the xy coordinates of my mask and plot them. However, one major difference is that sometimes my final image that I want will be a curved line.
But I still think RANSAC is the best way to go forward. How do i use RANSAC on my data though??? Is there a file exchange or can I just manually put in some commands??? I'm completely new to RANSAC so I'm still trying to figure it out. If you still need a picture of some data for reference maybe I can attach it. But I'm more interested in how I could directly apply RANSAC to my data.
The MATLAB reference page for RANSAC does not show how to apply it to data.

Accedi per commentare.

Risposte (1)

Image Analyst
Image Analyst il 23 Ago 2017
Try using a Savitzky-Golay filter to smooth the outline. Use a big enough window and low enough order such that the outliers don't affect the curve that much. Then compute distance from actual to fitted, which will be the residuals. Find the histogram of the distances and see what might be a distance that indicates outliers. Then remove those outliers from the data and re-run the Savitzky-Golay filter again with only the good data.

Community Treasure Hunt

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

Start Hunting!

Translated by