我需要知道如何使用 Matlab 清除图像中的噪声。
让我们看这个例子:
如您所见,数字看起来不是很清楚。
那么如何清除噪声和不是数字的像素,以便更容易识别。
谢谢。
最佳答案
让我们在 Mathematica 中逐步完成:
(*first separate the image in HSB channels*)
i1 = ColorSeparate[ColorNegate@yourColorImage, "HSB"]
(*Let's keep the B Channel*)
i2 = i1[[3]]
(*And Binarize it *)
i3 = Binarize[i2, 0.92]
(*Perform a Thinning to get the skeleton*)
i4 = Thinning[i3]
(*Now we cut those hairs*)
i5 = Pruning[i4, 10]
(*Remove the small lines*)
i6 = DeleteSmallComponents[i5, 30]
(*And finally dilate*)
i7 = Dilation[i6, 3]
(*Now we can perform an OCR*)
TextRecognize@i7
-->"93 269 23"
完成!
关于matlab - 清除图像中的噪声,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5312514/