QRCodeDetection

class QRCodeDetectionPrediction(box, info)

A single prediction from QRCodeDetection.

Parameters
  • box (ndarray) – The vertices of the detected QR Code.

  • info (str) – The decoded QR Code information

property box

The bounding box around the detected QR Code.

Return type

ndarray

property info

The extracted QR code information

Return type

str

class QRCodeDetectionResults(predictions, image)

All the results of QR code detection from QRCodeDetection.

Parameters
  • predictions (List[QRCodeDetectionPrediction]) – The boxes, type and info for each prediction(detection).

  • image (Optional[ndarray]) – The image that the detection was performed on.

property predictions

The list of predictions.

Return type

List[QRCodeDetectionPrediction]

property image

The image the results were processed on.

Return type

Optional[ndarray]

markup_image()

Draw detected QR Code boxes on the image.

Return type

Optional[ndarray]

class QRCodeDetection

Locate, detect and decode the QR Code(s) within an image.

Typical usage:

qrcode_detector = edgeiq.QRCodeDetection()

<get image>
results = qrcode_detector.localize_decode(image)
image = results.markup_image()

for prediction in results.predictions:
    text.append(prediction.info)
localize_decode(image)

Localizes and decodes QR Codes in an image.

Parameters

image (ndarray) – The image to analyze in BGR format.

Return type

QRCodeDetectionResults

publish_analytics(results, tag=None)

Publish QR Code Detection results to the alwaysAI Analytics Service

Parameters
  • results (QRCodeDetectionResults) – The results to publish.

  • tag (Optional[Any]) – Additional information to assist in querying and visualizations.

Raises

ConnectionBlockedError when using connection to the alwaysAI Device Agent and resources are at capacity,

Raises

PacketRateError when publish rate exceeds current limit,

Raises

PacketSizeError when packet size exceeds current limit. Packet publish size and rate limits will be provided in the error message.