title: QR Code Detection from Pyzbar with Camera Image
body: <p>I am having trouble detecting QR code using Pyzbar. Under perfection condition, I am able to detect the QR code using the original png image. However, when I do video capture from a camera, and then save that frame as in image, pyzbar fails to detect the QR code.</p>
  
  <p>For example, this works</p>
  
  <p><a href="https://i.stack.imgur.com/CxQD9.png" rel="noreferrer"><img src="https://i.stack.imgur.com/CxQD9.png" alt="enter image description here"></a></p>
  
  <pre><code>[Decoded(data=b'GOAL', type='QRCODE', rect=Rect(left=16, top=16, width=168, height=168))]
  </code></pre>
  
  <p>But the following does not even after I manually cropped the surroundings to only show the QR code.</p>
  
  <p><a href="https://i.stack.imgur.com/pjrSM.png" rel="noreferrer"><img src="https://i.stack.imgur.com/pjrSM.png" alt="enter image description here"></a></p>
  
  <pre><code>[]
  </code></pre>
  
  <p>For both of the images, I am using</p>
  
  <pre><code>decode(image, scan_locations=True)
  </code></pre>
  
  <p>I am wondering what do I need to do in order for pyzbar to decode my QR code image?</p>