How to remove large blob area using morph method??
Hi all: Does someone have or know using morph method to remove large blob area??
Hi all: Does someone have or know using morph method to remove large blob area??
Once you know the mask, which is actually a set of 0 - 1 values, you can just multiply each layer of your color RGB image or the grayscale layer with the binary mask, resulting in 0 values for the actual regions you remove. Its plain and simple :)
EXAMPLE
Grayscale image Mat is represented by (random values between 0 & 255). Mask is defined by a set of 0 and 1 values. Result is the image without the blob region.
1 2 3 4 5 x 0 0 0 0 0 = 0 0 0 0 0
2 3 4 5 6 0 0 0 0 0 0 0 0 0 0
3 4 5 6 7 0 1 1 1 0 0 4 5 6 0
5 6 7 8 8 0 1 1 1 0 0 6 7 8 0
1 1 1 1 1 0 0 1 0 0 0 0 1 0 0
Hope this makes it more clear. Be aware to use a dot wise (element wise) multiplication of both matrices!
Then first edit your blob mask with dilation and erode functionality until the desired result.
Asked: 2013-03-22 12:51:19 -0600
Seen: 1,575 times
Last updated: Mar 24 '13
Extracting groups of adjacent non-white pixels
Will Blob Analysis be a built-in feature of OpenCV?
Blob extraction by colour segmentation
Detection of table tennis balls and color correction
Count pixels of a black and white image (OpenCV / C++ )
Single blob, multiple objects (Ideas on how to separate objects)
need to find a way for polyp detection in a 2D image using OpenCV
What do you actually want to accomplish? Remove the image content of a blob area? Or blur the region? Give us some more information please.
Dear StevenPuttemans: I want remove the image content of a blob area.it 's binary operation.