7 lines
208 B
Plaintext
7 lines
208 B
Plaintext
def qr_detection(data):
|
|
cv_image = bridge.imgmsg_to_cv2(data, 'bgr8')
|
|
barcodes = pyzbar.decode(cv_image)
|
|
|
|
if barcodes:
|
|
qr_data = barcodes[0].data.decode('utf-8')
|
|
return qr_data |