How to identify and remove unwanted components in a binary image?

1 view (last 30 days)
Hi
I have a task at hand which is to remove stray background pixels from my dataset. They are binary images of characters. I have attached an image for reference. I need to remove obvious stray components in the image.
A way to do it is to identify all the connected components in the image and draw bounding boxes around them and compare which ones do not overlap with any other then remove those components.
I have no idea how to implement this idea using matlab, so please guide me with the steps and functions to use. I am really new to this but I'm just starting this project and hope to pick up this software and language in due time.
Thank you very much in advance!

Answers (1)

Image Analyst
Image Analyst on 18 Dec 2012
There was a thread on that a few months ago that Matt and I contributed to. Oh yeah - they were yours, on Oct. 10 and Nov. 2. Are you still working on that? Why didn't those solve it (I noticed that you never marked them as Answered)? What is different about this question, such that you needed to start a new thread instead of following up on your old question?
  1 Comment
Muffin
Muffin on 20 Dec 2012
Hi, yes I am still working on this. I just thought phrasing the question in a different way would help since the old one could not solve my problem. There was an invalid assumption in one of the answers so I could't solve it. I have commented on that.

Sign in to comment.

Categories

Find more on Programming in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!