How to Remove Blobs from Image using morphological operations
5 views (last 30 days)
Show older comments
I am doing a project for doing a project for digits recognition using morphological image processing. Here I need to remove Blobs of digits like 9 or 6. I got a link of matlab as http://www.mathworks.in/matlabcentral/fileexchange/20114-removing-blobs-from-a-binary-image But the method bwremove not found error occurs. Can any one help me PLZ. I did as
I=imread('I.tif')
I=imcomplement(I)
I2=imfill(I,'holes');
I3=I2-I
I5=I2-I3
I6=imcomplement(I3)
In I5 I tried to get stem by subtracting the blob from filled image. Since I3 is inside of Blobs It gives the origin image. If I could increase size of I3 keeping the dimension same i.e. like adding pixels repeatedly on boundary of I3 until I get it large enough to outer boundary of the Blobs it would be OK. Any proper logic for this PLZ
0 Comments
Answers (3)
Image Analyst
on 15 Nov 2013
It's hard to visualize. Can you attach your image so we can try your code? What criteria are you applying to the blobs to determine if a blob represents a number 6 or number 9? The Euler number? That's what I'd use assuming that the blobs have the holes completely surrounded (no breaks in the circle around them). You can get the Euler number from regionprops().
0 Comments
Kalyanbrat
on 18 Nov 2013
1 Comment
Image Analyst
on 24 Apr 2023
You can tell the difference between a 6 and a 9 just from the centroid. If the centroid of the blob is in the upper half of the bounding box, it's a 9. Otherwise it's a 6 because the centroid is in the lower half of the bounding box.
See Also
Categories
Find more on Read, Write, and Modify Image in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!