I am trying to write a program in python to detect QR code from image.
import cv2 as cv
im = cv.imread('sample1.png')
det = cv.QRCodeDetector()
decodedText, points, _ = det.detectAndDecode(im)
if points is not None:
print(decodedText)
else:
print("QR code not detected")
I have to detect this particular image: QR Image
The problem is that decodedText is empty and nothing is shown and the program doesn't go in else part.
NOTE: The QR code is detected fine from my mobile camera but not through this program.