Prison::ImageScanner Namespace

namespace Prison::ImageScanner

Scans a still image for barcodes. More...

Header: #include <Prison/ImageScanner>
Since: 6.3

Functions

(since 6.3) Prison::ScanResult scan(const QImage &image, Prison::Format::BarcodeFormats formats = {})

Detailed Description

Function Documentation

[since 6.3] Prison::ScanResult ImageScanner::scan(const QImage &image, Prison::Format::BarcodeFormats formats = {})

Scan image for a barcode.

This method is synchronous and expensive. For use in the main thread running this on a secondary thread is strongly recommended when processing larger images.

QtConcurrent::run([&img]() { return ImageScanner::scan(img); }).then([](const ScanResult &result) {
  ...
});

image The image to scan for barcodes, in any format.

formats The barcode formats to look for. By default all supported formats are searched, limiting this improves performance and can improve result quality.

This function was introduced in 6.3.