Thresholding and removed unwanted region
2 views (last 30 days)
Show older comments
Hi guys.
I have problem for my project. Here is the picture of my image. I want to choose shape on object 1 and object 2 and remove the others. I already tried using threshold like Otsu's method. Then i successfully get the object 1 and 2. However,I also get the rectangle shape of light blue. How can I remove region object 3 and 4? Do i need to pre processing again?
Thanks in advance.
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/146691/image.jpeg)
0 Comments
Answers (1)
Image Analyst
on 5 Jan 2015
There are so many ways to do this, like you could label the binary image and use ismember() to extract only the 2 objects you want based on their centroid location or label number. You could also just set your binary image to zero in the quadrants that you know you don't want. If we tell you something that will work with this image you'll probably says "Well it doesn't work for this other image!" so tell us in advance what your actual images look like, not this simplified synthetic image.
0 Comments
See Also
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!