diff --git a/builder/test/test_qr.py b/builder/test/test_qr.py index 4120ceb7..438e18ac 100644 --- a/builder/test/test_qr.py +++ b/builder/test/test_qr.py @@ -17,7 +17,7 @@ def image_callback(data): cv_image = bridge.imgmsg_to_cv2(data, 'bgr8') # OpenCV image barcodes = pyzbar.decode(cv_image) for barcode in barcodes: - b_data = barcode.data.encode("utf-8") + b_data = barcode.data.decode("utf-8") b_type = barcode.type (x, y, w, h) = barcode.rect xc = x + w/2 diff --git a/docs/en/camera.md b/docs/en/camera.md index 337e724e..5dfe34fa 100644 --- a/docs/en/camera.md +++ b/docs/en/camera.md @@ -133,7 +133,7 @@ def image_callback(data): cv_image = bridge.imgmsg_to_cv2(data, 'bgr8') # OpenCV image barcodes = pyzbar.decode(cv_image) for barcode in barcodes: - b_data = barcode.data.encode("utf-8") + b_data = barcode.data.decode("utf-8") b_type = barcode.type (x, y, w, h) = barcode.rect xc = x + w/2 diff --git a/docs/ru/camera.md b/docs/ru/camera.md index 68441775..522f89ba 100644 --- a/docs/ru/camera.md +++ b/docs/ru/camera.md @@ -135,7 +135,7 @@ def image_callback(data): cv_image = bridge.imgmsg_to_cv2(data, 'bgr8') # OpenCV image barcodes = pyzbar.decode(cv_image) for barcode in barcodes: - b_data = barcode.data.encode("utf-8") + b_data = barcode.data.decode("utf-8") b_type = barcode.type (x, y, w, h) = barcode.rect xc = x + w/2