Ask Your Question
0

How to remove large blob area using morph method??

asked 2013-03-22 12:51:19 -0600

wuling gravatar image

Hi all: Does someone have or know using morph method to remove large blob area??

edit retag flag offensive close merge delete

Comments

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.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-03-22 13:43:33 -0600 )edit

Dear StevenPuttemans: I want remove the image content of a blob area.it 's binary operation.

wuling gravatar imagewuling ( 2013-03-22 23:08:41 -0600 )edit

1 answer

Sort by ยป oldest newest most voted
1

answered 2013-03-24 16:10:20 -0600

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!

edit flag offensive delete link more

Comments

Dear StevenPuttemans: if i have a lot of blobs in a picture. This way also remove somes blobs whish is area is small.Right???

wuling gravatar imagewuling ( 2013-03-26 08:42:49 -0600 )edit

Then first edit your blob mask with dilation and erode functionality until the desired result.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-03-26 09:28:53 -0600 )edit

Question Tools

Stats

Asked: 2013-03-22 12:51:19 -0600

Seen: 1,575 times

Last updated: Mar 24 '13