MATLAB >> removing large objects from a binary image

by Robert Maidhof » Sat, 19 Apr 2008 04:44:02 GMT

All, I'm wondering if anyone knows of a function or method
to remove large objects from a binary image...what I want
is something similar to bwareaopen, which removes images
will less than a specified number of pixels, but in reverse.

Thanks in advance for any help

MATLAB >> removing large objects from a binary image

by roberson » Sat, 19 Apr 2008 04:55:47 GMT


In article <fub16i$jag$ XXXX@XXXXX.COM >,


If you bwareaopen and subtract the result of that from the original
image, the result should be just the small objects.
--
"And that's the way it is." -- Walter Cronkite

MATLAB >> removing large objects from a binary image

by Daphne » Sun, 20 Apr 2008 14:25:05 GMT


If nothing else I think you could subtract the bwareaopen
from the original image and get only the larger ones...

Daphne



<fub16i$jaf$ XXXX@XXXXX.COM >...
method
want
reverse.

MATLAB >> removing large objects from a binary image

by ImageAnalyst » Mon, 21 Apr 2008 04:06:48 GMT


-------------------------------------------------------------------------------------------
Robert:
Do you want to actually erase them from the image and then get a new
image, or do you just want to do some stats on the small objects. Why
not just bwlabel() the image and then run regionprops on it? Then
just loop though the measurements object returned by regionprops
considering the small objects and ignoring the large objects?
Optionally, if you want to erase them from the image, then you could
use the IdxPixelList to zero out those objects that are in the "too
large" category. This could be faster than trying to "open" the image
to get rid of the small objects and then using the resulting opened
image to subtract from the original binary image.
Regards,
ImageAnalyst

MATLAB >> removing large objects from a binary image

by David Elsdoerfer » Sun, 15 Aug 2010 22:37:03 GMT


Hey thank you all for your Help. I finally managed to read the Braille with my algorithm. My Next Task is to detect from a video wether there is a Medicament Box in the picture or not then taking a shot of the Box and analyze it like I did with the single Picture. I just don't know how to tell matlab to analyze a live video an then take a frame out of it automatically. I would be very pleased by any help and suggestions.

MATLAB >> removing large objects from a binary image

by SURYA » Wed, 23 Feb 2011 23:24:04 GMT

sir can u explain the command which can use to delete the big area....i want like this...
delete { pixel>100 and pixel <20}
leave other pixel which between 20 to 100...can i get this...hw...

MATLAB >> removing large objects from a binary image

by ImageAnalyst » Thu, 24 Feb 2011 00:02:02 GMT


------------------------------------------------------------------
Use bwareaopen() once for each size to cull the blobs of certain
sizes. Then use regular logical operations on the results. Write
back if you can't figure it out.

MATLAB >> removing large objects from a binary image

by SURYA » Thu, 24 Feb 2011 21:29:05 GMT

sir can u tell wat command is used for view profile histogram...i want see vertical histogram and horizontal histogram of image...it have to show intensity vs image (vertical / horizontal) pixels saiz...

here i upload the image how it should look, if didn't understand wat i mean...tq...

http://www.uploadhouse.com/viewfile.php?id=8199284

MATLAB >> removing large objects from a binary image

by ImageAnalyst » Thu, 24 Feb 2011 23:14:29 GMT


-------------------------------------------------------------------------------------------------------------------
You don't call those "histograms." Just because they're bar charts,
like histograms often use, does not mean that they are histograms. In
fact, they are totally different. To get the vertical and horizontal
intensity profiles:
verticalProfile = sum(imageArray, 2); % Sum along columns
horizontalProfile = sum(imageArray, 1); % Sum along rows

MATLAB >> removing large objects from a binary image

by SURYA » Fri, 25 Feb 2011 01:14:05 GMT

thank you sir i get u...i got my horizontal profile and vertical profile
my image = 269 X 639 pixels

the result like this....
horizontal profile

0 - 262 pixels = 68595 (white)
263 - 395 pixels = 42300 (image wanted)
395- 480 pixels = 20000 (not black pixels)
481 - 639 pixels = 68595 (white)

sir, i want cut the image pixel which contain intensity > 424000 and intensity < 20000,
so i just want image pixels which the intensity between (20000 to 42400) like tat...
sir can help to tell, wat command i have to use to do it...tq...

MATLAB >> removing large objects from a binary image

by ImageAnalyst » Fri, 25 Feb 2011 06:16:06 GMT


---------------------------------------------------------------------------------------
columnsToKeep= horizontalProfile > 20000 & horizontalProfile < 42400
subImage = grayImage(:, columnsToKeep);

MATLAB >> removing large objects from a binary image

by SURYA » Thu, 14 Apr 2011 11:59:23 GMT

sir u got any other method then this, because the the improfile value so different for different images..so i cnt use the improfile method to remove the black edges.... my project is automatic project, which will capture images n process for different images...plz help sir...im in last stage to finish my project...tq

MATLAB >> removing large objects from a binary image

by ImageAnalyst » Thu, 14 Apr 2011 18:18:04 GMT


-----------------------------------------------
No. You basically need to process your profile to get it to a point
where you can then threshold it. You probably have to use some
algorithm to decide on the threshold rather than using a fixed one.

MATLAB >> removing large objects from a binary image

by SURYA » Fri, 15 Apr 2011 01:54:08 GMT

Sir can suggest any algorithm...bcz i dun know how to do it...

there also i use other method to remove black edges..example code as below..but i get error...what is the problem...
maskedImage2 = bwareaopen(maskedImage,50);
maskedImage2 = maskedImage - maskedImage2;
maskedImage = maskedImage2;

MATLAB >> removing large objects from a binary image

by ImageAnalyst » Fri, 15 Apr 2011 07:17:40 GMT


----------------------------------------------------------------------------------------
I've read back over your postings in this thread and I can't really
figure out what you want. You posted an image and then somehow had
code (which you didn't post) to pick out individual words. But then
you say that you can't do it because you don't know how to threshold
profiles. So I told you and then you start talking about black
edges. I don't know what those are. I don't see any black edge
around your image. I don't see any edge image, like if you had used
the edge() function. Are the "black edges" the individual letters and
numbers on the gray background? And then you start talking about
small blob removal and masking the image. It's getting very
confusing. Please post your code, starting with you reading in your
test image, and comment everything that you want to do, even if it's
just the comment alone and you don't know what MATLAB code to put down
to do that operation.

Similar Threads

1. How to remove small objects from binary images - MATLAB

2. Remove small objects from binary image without erode.

Is there a function that removes objects binary image based only on their pixel area?

I want to maintain lines, so erode or close is out of the question. Planning on using region props and check each area region, but that seems slow and inefficient...

Tks

3. Finding Larger Blob in a Binary Image - MATLAB

4. removing an object from an image

As above, is there code about that, for example, removes a sheep from
a field and replaces it with the grass around it.

IE compares pixels with others and replaces them to create desired
effect.

cheers

Nick

5. help me to remove unwanted object from image - MATLAB

6. Removing Unwanted objects from a image

Hi,

Can anyone point me in the right direction to some tutorials,
examples or programs where unwanted objects are removed from a
image?. Is this kind of thing has already been carried out?

Regards
Peter

7. Convexity or concavity of binary image object - MATLAB

8. Determining Curvature of Objects in a Binary Image

I have a binary image with objects of various shapes in it. Now I
need to seperate the nearly straight objects from other objects. Any
ideas?

I've been thinking of goodness of fit test. Any suggestions?

Thanks,
Nevine