4.0

4.0 | 1 rating Rate this file 11 downloads (last 30 days) File Size: 2.17 KB File ID: #20114

Removing blob(s) from a binary image

by Mathijs van Vulpen

 

29 May 2008 (Updated 03 Jun 2008)

No BSD License  

'bwremove' removes the blob(s) in the seed image that is overlapped by the blob(s) in the mask image

Download Now | Watch this File

File Information
Description

BWREMOVE Removes objects in binary image.
BW3 = BWREMOVE(BW1,BW2) returns a binary image BW3 where the objects from the mask image that overlap the seed image are removed. Both the seed BW1 and the mask BW2 images can have multiple blobs.

[BW3, BW4] = BWREMOVE(BW1,BW2) returns the binary image BW4 which contains the removed blob(s).

Class Support
-------------
The input images BW1 and BW2 can be logical or any numeric type and must be 2-D and nonsparse. The output images BW3 and BW4 are logical.

Example
-------
BW1 = imread('text.png');
BW2 = zeros(size(BW1));
BW2(34,126) = 1;
BW3 = bwremove(BW1,BW2);
figure, imshow(BW1)
figure, imshow(BW3)

Required Products Image Processing Toolbox
MATLAB release MATLAB 7.3 (R2006b)
Tags for This File  
Everyone's Tags
Tags I've Applied
Add New Tags Please login to tag files.
Comments and Ratings (1)
22 Sep 2009 Mathijs van Vulpen  
Please login to add a comment or rating.
Updates
03 Jun 2008

minor bugfix.

Tag Activity for this File
Tag Applied By Date/Time
morphology Mathijs van Vulpen 22 Oct 2008 10:04:09
segmentation Mathijs van Vulpen 22 Oct 2008 10:04:09
remove blob binary image mask seed Mathijs van Vulpen 22 Oct 2008 10:04:09
self_rating Matt Fig 26 Sep 2009 18:05:07

Contact us at files@mathworks.com