Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how remove binary image noise in opencv?

Tags:

c++

opencv

after convert image to binary image (black and white ) if there is any noise how can i remove that unwanted noise

you can see below image have some white noise inside the black area how can i remove noise using opencv

http://img857.imageshack.us/img857/999/blacknoise.jpg

like image 234
user1190910 Avatar asked Feb 05 '12 17:02

user1190910


1 Answers

You can achieve it with Erode and Dilate.

Your image after cvErode( in, eroded, NULL, 4): eroded

And after cvDilate( eroded, dilated, NULL, 4): dilated

like image 167
Piotr Praszmo Avatar answered Oct 11 '22 15:10

Piotr Praszmo