qr2eascii icon indicating copy to clipboard operation
qr2eascii copied to clipboard

use more robust scanner to allow for blurry/crooked qr codes

Open NyllRE opened this issue 3 years ago • 3 comments

the squares in the corners of the qr code are missing a block

this is how it looks:

                ██        ██      ████  ████      ████████                
  ████████████  ████████      ██████    ██      ██████████  ████████████  
  ██        ██  ████  ██  ██    ██    ██          ██  ████  ██        ██  
  ██        ██  ██████    ██    ████      ████    ██    ██  ██        ██  
  ██        ██  ██████        ██  ██    ██          ██  ██  ██        ██  
  ██      ████  ██████        ██  ██    ██          ██  ██  ████      ██        # here
  ████████████  ████  ██  ██    ████  ██  ████          ██  ████████████  
                ██  ██  ██    ██  ██  ██  ██    ██  ██  ██                
██████████████████    ████      ██  ████  ██    ████  ████████████████████
    ██      ██  ████  ████    ████          ██████      ██  ████████████  
████    ████████  ████  ████    ██  ██████  ██        ██████      ██    ██
      ████            ████    ██          ████████    ████        ████    
  ██  ████    ██  ██████████████    ██  ██  ████████  ██  ██  ████    ████
      ████████    ██    ████        ██████  ████████    ██    ████████    
      ████████    ██    ████        ██████  ████████    ██    ████████    
  ██          ████████  ██    ██    ████  ██    ████  ██  ██  ████████████
  ██  ████████  ████████████████            ██████████████  ██    ████████
    ██  ██████████      ██          ████  ██    ██    ██████████████  ██  
  ████  ██████    ██████      ████  ██████  ██████████              ██    
  ██        ████████  ██  ████████  ██      ██    ████  ██        ████    
    ██            ████████            ████  ██        ██      ██████████  
██  ██  ████████    ██    ██    ██    ██  ██    ██  ████████████████      
████  ████████  ████      ██    ██      ██  ████████    ████  ████████████
████  ████████  ████      ██    ██      ██  ████████    ████    ██████████
  ██████    ██████    ████      ██  ████    ██████    ██████        ██  ██
  ██  ██    ██  ██████    ██    ██  ████  ██      ██  ██          ████    
  ██    ██    ██████            ██      ██  ████████████  ██  ██████  ████
    ██  ██        ██████        ██    ██        ██████            ████  ██
██████████████████  ██  ████          ████████████████  ██████          ██
                ████████        ██      ██  ██    ██    ██  ██      ██████
  ████████████  ████████  ████████  ████        ████    ██████        ████
  ██      ████  ██  ████████████    ████  ██    ████              ████  ██      # here
  ██        ██  ██  ████████████    ████  ██    ████              ████  ██
  ██        ██  ██                  ██  ██      ████████████████████      
  ██        ██  ████      ████████  ██  ██      ██        ██      ████    
  ████████████  ██  ██  ██    ██  ██  ██████    ████████████              
                ██    ████          ██          ██          ██      ██████

this is how it should be:

                ██        ██      ████  ████      ████████                
  ████████████  ████████      ██████    ██      ██████████  ████████████  
  ██        ██  ████  ██  ██    ██    ██          ██  ████  ██        ██  
  ██        ██  ██████    ██    ████      ████    ██    ██  ██        ██  
  ██        ██  ██████        ██  ██    ██          ██  ██  ██        ██  
  ██        ██  ██████        ██  ██    ██          ██  ██  ██        ██       # here
  ████████████  ████  ██  ██    ████  ██  ████          ██  ████████████  
                ██  ██  ██    ██  ██  ██  ██    ██  ██  ██                
██████████████████    ████      ██  ████  ██    ████  ████████████████████
    ██      ██  ████  ████    ████          ██████      ██  ████████████  
████    ████████  ████  ████    ██  ██████  ██        ██████      ██    ██
      ████            ████    ██          ████████    ████        ████    
  ██  ████    ██  ██████████████    ██  ██  ████████  ██  ██  ████    ████
      ████████    ██    ████        ██████  ████████    ██    ████████    
      ████████    ██    ████        ██████  ████████    ██    ████████    
  ██          ████████  ██    ██    ████  ██    ████  ██  ██  ████████████
  ██  ████████  ████████████████            ██████████████  ██    ████████
    ██  ██████████      ██          ████  ██    ██    ██████████████  ██  
  ████  ██████    ██████      ████  ██████  ██████████              ██    
  ██        ████████  ██  ████████  ██      ██    ████  ██        ████    
    ██            ████████            ████  ██        ██      ██████████  
██  ██  ████████    ██    ██    ██    ██  ██    ██  ████████████████      
████  ████████  ████      ██    ██      ██  ████████    ████  ████████████
████  ████████  ████      ██    ██      ██  ████████    ████    ██████████
  ██████    ██████    ████      ██  ████    ██████    ██████        ██  ██
  ██  ██    ██  ██████    ██    ██  ████  ██      ██  ██          ████    
  ██    ██    ██████            ██      ██  ████████████  ██  ██████  ████
    ██  ██        ██████        ██    ██        ██████            ████  ██
██████████████████  ██  ████          ████████████████  ██████          ██
                ████████        ██      ██  ██    ██    ██  ██      ██████
  ████████████  ████████  ████████  ████        ████    ██████        ████
  ██        ██  ██  ████████████    ████  ██    ████              ████  ██      # here
  ██        ██  ██  ████████████    ████  ██    ████              ████  ██
  ██        ██  ██                  ██  ██      ████████████████████      
  ██        ██  ████      ████████  ██  ██      ██        ██      ████    
  ████████████  ██  ██  ██    ██  ██  ██████    ████████████              
                ██    ████          ██          ██          ██      ██████

NyllRE avatar Apr 06 '23 04:04 NyllRE

can you provide the prompt and specific input (image or text) where it breaks?

Jojodicus avatar Apr 06 '23 10:04 Jojodicus

qrcode

py converter.py -i qrcode.png --invert

I tried all correction methods

NyllRE avatar Apr 07 '23 18:04 NyllRE

yes, the whole output is broken anyway (can also see that in the timing lines) but as the image is blurry and the conversion being extremely crude, it is expected behavior for now, see Notes when converting images in the README.md could be solved by using an actual qr code scanner, labeled this issue accordingly as a tracker for that

Jojodicus avatar Apr 07 '23 21:04 Jojodicus