Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

qr code detector

    import cv2
    decoder = cv2.QRCodeDetector()
    data, points, _ = decoder.detectAndDecode(img) # size 250 * 250 np.array
    qr_code = data
    print('Decoded data: ' + data)
    if points is not None:
        print('Decoded data: ' + data)
    
        points = points[0]
        for i in range(len(points)):
            pt1 = [int(val) for val in points[i]]
            pt2 = [int(val) for val in points[(i + 1) % 4]]
            cv2.line(img, pt1, pt2, color=(255, 0, 0), thickness=3)
    
        cv2.imshow('Detected QR code', img)
Comment

PREVIOUS NEXT
Code Example
Python :: qr code scanner using opencv 
Python :: search in django 
Python :: tuple and for loop 
Python :: division in python 
Python :: pandas get rows which are NOT in other dataframe 
Python :: How to add all the numbers of a list using python? 
Python :: double for loop in list comprehension 
Python :: python get all combinations of n numbers 
Python :: from a list of lists - find all length of list 
Python :: padnas check if string is in list of strings 
Python :: python split string by specific word 
Python :: python pyttsx3 
Python :: Data Structure tree in python 
Python :: python order number list 
Python :: python call function that need args with decorator 
Python :: pandas get row if difference previous 
Python :: remove whitespace method 
Python :: sorted multiple keys python 
Python :: replace nan in pandas column with mode and printing it 
Python :: python increment by 1 
Python :: python strip function 
Python :: tensorflow data augmentation 
Python :: how to sort numpy array 
Python :: how to add element to list python 
Python :: run ansible playbook python 
Python :: google youtuve api python 
Python :: django password hashers 
Python :: polls/models.py 
Python :: python string: .upper() 
Python :: função map python 
ADD CONTENT
Topic
Content
Source link
Name
7+1 =