1

It happens to me regularly that I get a low quality raster image of a QR code and I need it in better quality.

This works in principle:

 zbarimg --quiet --raw qr-bad.png | qrencode -t SVG -o qr-good.svg

But sometimes it's important to keep the QR code exactly the same. Is there a way to detect the parameters of the original and keep them the same? I'd like the result to have exactly the same pattern of white and black blocks.

Nobody
  • 510
  • 1
  • 7
  • 18
  • your question may be better suited at a graphics website – jsotola Apr 07 '22 at 00:37
  • @jsotola If this was a graphics question it wouldn't matter if the QR code doesn't consist of exactly the same bits... the problem is I'm dealing with proprietary software and I can't be completely sure it will work if the QR code is different but encodes the same string. And I'd like to take advantage of the redundancies in QR codes while decoding, using the usual photo improvement techniques will not suffice. – Nobody Apr 22 '22 at 15:36
  • this may help ... http://cagewebdev.com/zxing4processing-processing-library/ ..... https://pyimagesearch.com/2018/05/21/an-opencv-barcode-and-qr-code-scanner-with-zbar/ – jsotola Apr 23 '22 at 02:00
  • see `image_to_matrix()` in `decoder.py` at https://github.com/ashishsubedi/custom_2d_barcode .... looks like it generates a 2D array ... the array could then be used to generate a good quality, identical copy – jsotola Apr 23 '22 at 23:35

0 Answers0