Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

python qr scanner

    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 :: How to perform topological sort of a group of jobs, in Python? 
Python :: python all but the last element 
Python :: python - convert a list column into miltiple columns 
Python :: set remove in python 
Python :: django template in views.py 
Python :: attributes in python 
Python :: python destructuring 
Python :: Python Switch case statement by Dictionary Mapping 
Python :: plot dataframe 
Python :: list programs in python 
Python :: remove rows from dataframe 
Python :: tensorflow Dense layer activatity leaklyrelu 
Python :: generate coordinates python 
Python :: is there a null data type in python 
Python :: django button 
Python :: order_by django queryset order by ordering 
Python :: how to split a string by space in python 
Python :: import sentence transformers 
Python :: loading bar 
Python :: issubclass python example 
Python :: Excel file format cannot be determined, you must specify an engine manually 
Python :: numpy add 
Python :: define a function in python without arguments 
Python :: python code variable declaration 
Python :: pandas df number of columns 
Python :: print list of list line by line python 
Python :: what is xarray 
Python :: count pairs with given sum python 
Python :: subtract from dataframe 
Python :: idxmax in python 
ADD CONTENT
Topic
Content
Source link
Name
2+4 =