ImageMagick 去除背景噪音

标签 imagemagick ocr

为了更好地为 OCR 过程做好准备,我想去除图像(通常是扫描图像)上的背景噪音。

这是例子:

enter image description here

magick.exe 命令是否有任何方法可以消除像这样的图像中的噪声?如果是这样,请举个例子。

已更新

我在 Windows 10 上使用 ImageMagick-7.0.7-Q16

最佳答案

在 ImageMagick 中使用 -connected-components 来降低噪声。 (Unix 语法)

convert \
3foBc.png -threshold 60% \
-define connected-components:verbose=true \
-define connected-components:area-threshold=5 \
-define connected-components:mean-color=true \
-connected-components 8 \
out.png

enter image description here

关于ImageMagick 去除背景噪音,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/47989687/

相关文章:

image-processing - 以编程方式将扫描图像划分为单独的图像

shell - 在 shell 脚本中合成两个图像

java - ImageMagick 命令缓慢问题

Imagemagick/将单色tiff文件转换为单色png文件

c++ - 自动对比度和亮度(用于 OCR)

python - PyTesseract - 将 OCR 限制为一组字符

opencv - Tesseract提取的文本不清楚

javascript - 将 PDF 转换为 PNG Node.JS

imagemagick - 在 ImageMagick 命令行中将 RGB 转换为灰度

web-applications - 如何扫描到 Web 应用程序