How to Remove Blobs from Image using morphological operations

조회 수: 4 (최근 30일)
Kalyanbrat
Kalyanbrat 2013년 11월 15일
댓글: Image Analyst 2023년 4월 24일
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

답변 (3개)

Image Analyst
Image Analyst 2013년 11월 15일
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().

Kalyanbrat
Kalyanbrat 2013년 11월 18일
Thank You for your answer. Here is my image. I need to remove the round blob so that I can get only the stem. From the position of the stem I can determine that it is 9. Since 6 and 9 both contains blob, mere knowing that a blob presents we can not say it is 9 or 6. we need stem position. So first I want to remove blob. I do not know How Euler number is use to determine a Blob. I am a novice to mat lab.
  댓글 수: 1
Image Analyst
Image Analyst 2023년 4월 24일
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.

댓글을 달려면 로그인하십시오.


Kalyanbrat
Kalyanbrat 2013년 11월 18일

카테고리

Help CenterFile Exchange에서 Read, Write, and Modify Image에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by