Prison::ImageScanner

Prison::ImageScanner Namespace Reference

Functions

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

Detailed Description

Scans a still image for barcodes.

Since
6.3

Function Documentation

◆ scan()

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

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) {
...
});
Result of a barcode scan attempt.
Definition scanresult.h:31
PRISONSCANNER_EXPORT ScanResult scan(const QImage &image, Format::BarcodeFormats formats={})
Scan image for a barcode.
QFuture< T > run(Function function,...)
Parameters
imageThe image to scan for barcodes, in any format.
formatsThe barcode formats to look for. By default all supported formats are searched, limiting this improves performance and can improve result quality.
Since
6.3

Definition at line 102 of file imagescanner.cpp.

This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jul 19 2024 11:54:32 by doxygen 1.11.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.