Imagemagick,来自QR码图像的清晰噪音

时间:2022-02-22 07:08:35

I have QR-code scanned from document, when I trying do decode it with online decoder, like http://zxing.org/w/decode.jspx or other, they not find QR-code, but when I decode with camera on smartphone, it's decode correct text. I think it's because of small noises in image, how can I clear it with ImageMagick? Imagemagick,来自QR码图像的清晰噪音

我从文档中扫描了QR码,当我尝试使用在线解码器解码时,如http://zxing.org/w/decode.jspx或其他,他们找不到QR码,但当我用相机解码时智能手机,它解码正确的文字。我认为这是因为图像中的噪音很小,我怎样才能用ImageMagick清除它?

There can be another QR-codes.

可以有另一个QR码。

2 个解决方案

#1


You can try a median filter like this, but you would probably be better off extracting the image from the PDF the way Kurt suggested in your previous question in order to retain more quality:

你可以试试像这样的中值滤波器,但你可能最好从你之前的问题中Kurt建议的方式从PDF中提取图像,以保持更高的质量:

convert qr.png -median 3 result.png

Imagemagick,来自QR码图像的清晰噪音

#2


I don't have the Imagemagick command available, but what you usually do to remove noise is to

我没有Imagemagick命令,但你通常采取的措施是去除噪音

  • blur the image by 1 or 2 pixels
  • 将图像模糊1或2像素

  • lighten it up a bit
  • 稍微减轻一点

  • add contrast again
  • 再次增加对比度

Imagemagick should be able to do all this.

Imagemagick应该能够做到这一切。

#1


You can try a median filter like this, but you would probably be better off extracting the image from the PDF the way Kurt suggested in your previous question in order to retain more quality:

你可以试试像这样的中值滤波器,但你可能最好从你之前的问题中Kurt建议的方式从PDF中提取图像,以保持更高的质量:

convert qr.png -median 3 result.png

Imagemagick,来自QR码图像的清晰噪音

#2


I don't have the Imagemagick command available, but what you usually do to remove noise is to

我没有Imagemagick命令,但你通常采取的措施是去除噪音

  • blur the image by 1 or 2 pixels
  • 将图像模糊1或2像素

  • lighten it up a bit
  • 稍微减轻一点

  • add contrast again
  • 再次增加对比度

Imagemagick should be able to do all this.

Imagemagick应该能够做到这一切。