如何删除二进制图像噪声在opencv?

问题描述:

在将图像转换为二进制图像(黑白)后,如果有任何噪音,
i可以移除不需要的噪音

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

黑色区域内的一些白噪声如何使用opencv清除噪声

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

您可以使用 Erode 实现和扩展

之后的图片cvErode(in,eroded,NULL,4)
cvDilate(eroded,dilated,NULL,4)

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


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