How can we remove undesired onject from image?

For example ın this roentgen image how can we remove that's red object?

 Accepted Answer

Is it in the same place every time? If not, try using imfindcircles() then masking it out. Why does it matter if it's there though?

6 Comments

No ıt depends on the image that was taken somebody(like doctor) so it isnt in the same place every time.
I wanna ask something more there if the object is different size and shape like the new attached file.
I have to crop file? If yes how can ı do this automatically different types of images?
So this one looks different. Did you try my suggestion yet? I didn't get an answer to my question about why you need to get rid of it. If imfindcircles is not to your liking, then you can try another approach of thresholding and getting the area and perimeter and computing the circularity of all objects and deleting round objects, as shown in my Image Segmentation Tutorial. http://www.mathworks.com/matlabcentral/fileexchange/?term=authorid%3A31862
The circle isnt in the same place everytime. I can remove circle with your suggestion. but how can I remove the other types of shapes or text maybe automatically?
Just threshold and if you can assume that the largest blob is the body part that you want, then remove the others. See my demo that lets you extract the largest blob in an image.
ok then ı can remove blobs. For remove other types how can ı decide about the threshold value
Just pick something really low, like just barely above the highest background gray level, like 10 or 30 or whatever. Just some gray level that doesn't select any of the black background.

Sign in to comment.

More Answers (0)

Asked:

ali
on 24 Nov 2014

Commented:

on 25 Nov 2014

Community Treasure Hunt

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

Start Hunting!