qrio
¶
qrio
module.
Provides the QRDecoder
object.
Available on these boards
- class qrio.PixelPolicy¶
- EVERY_BYTE :PixelPolicy¶
The input buffer to
QRDecoder.decode
consists of greyscale values in every byte
- EVEN_BYTES :PixelPolicy¶
The input buffer to
QRDecoder.decode
consists of greyscale values in positions 0, 2, …, and ignored bytes in positions 1, 3, …. This can decode directly from YUV images where the even bytes hold the Y (luminance) data.
- ODD_BYTES :PixelPolicy¶
The input buffer to
QRDecoder.decode
consists of greyscale values in positions 1, 3, …, and ignored bytes in positions 0, 2, …. This can decode directly from YUV images where the odd bytes hold the Y (luminance) data
- class qrio.QRDecoder(width: int, height: int)¶
Construct a QRDecoder object
- Paramètres:
- width :int¶
The width of image the decoder expects
- height :int¶
The height of image the decoder expects
- decode(buffer: _typing.ReadableBuffer, pixel_policy: PixelPolicy = PixelPolicy.EVERY_BYTE) List[QRInfo] ¶
Decode zero or more QR codes from the given image. The size of the buffer must be at least
length``×``width
bytes forEVERY_BYTE
, and 2×``length``×``width`` bytes forEVEN_BYTES
orODD_BYTES
.