Reputation: 95
I have a image which looks like this:
The (blue) background have the value zero, the the (red) ring has a "large" value (compared to the rest of the image). I want to plot only the orange part of the sample. However, due to the finite resolution of the image the edges still appear as show here:
As you can see specially the white regions (yes there are a few) above are hard to see due to all the noise from edges.
Is there a good algorithm (preferable in matlab) which can help me clean up these images?
Upvotes: 1
Views: 1066
Reputation: 1150
Find the binary mask for the ring
Dilate the mask a bit using imdilate
and strel
Use the inverted mask to 'and out' the ring and the region around it
Upvotes: 3