ScBarcodeScanner Struct Reference

Public Member Functions

ScBarcodeScannersc_barcode_scanner_new (ScRecognitionContext *context)
 
void sc_barcode_scanner_retain (ScBarcodeScanner const *scanner)
 
void sc_barcode_scanner_release (ScBarcodeScanner const *scanner)
 
ScBarcodeScannerSessionsc_barcode_scanner_get_session (ScBarcodeScanner *scanner)
 
ScContextStatus sc_barcode_scanner_apply_settings (ScBarcodeScanner *scanner, ScBarcodeScannerSettings const *settings)
 
ScBool sc_barcode_scanner_is_setup_complete (ScBarcodeScanner const *scanner)
 
ScBool sc_barcode_scanner_wait_for_setup_completed (ScBarcodeScanner const *scanner)
 

Detailed Description

Scans barcodes in images.

The barcode scanner is the main interface for decoding barcodes in images. After constructing a barcode scanner, barcodes are decoded when a frame is processed with sc_recognition_context_process_frame().

Barcode scanner results (decoded and localized barcodes) are available in the "scan session" that can be retrieved by calling sc_barcode_scanner_get_session().

Since
4.6.0

Member Function Documentation

ScBarcodeScanner * sc_barcode_scanner_new ( ScRecognitionContext context)

Create a new barcode scanner instance without any symbologies enabled. It has to be initialized with sc_barcode_scanner_apply_settings.

Parameters
contextThe recognition context. Must not be null.
Returns
a new barcode scanner instance. After use, the instance must be freed with sc_barcode_scanner_release(). NULL is returned, if there is already another barcode scanner associated with this context.
Since
8.0.0
void sc_barcode_scanner_retain ( ScBarcodeScanner const *  scanner)

Increase reference count of barcode scanner object by one.

Parameters
scannerThe barcode scanner object. Must not be null.
Since
4.6.0
void sc_barcode_scanner_release ( ScBarcodeScanner const *  scanner)

Decrease reference count of barcode scanner by one.

When the reference count drops to zero, the barcode scanner is deallocated.

Parameters
scannerThe barcode scanner to release. May be null.
Since
4.6.0
ScBarcodeScannerSession * sc_barcode_scanner_get_session ( ScBarcodeScanner scanner)

Get the current scanning session.

The scanning session contains the current state of the barcode decoding process, such as the codes that were decoded in the last frame.

Parameters
scannerThe barcode scanner object. Must not be null
Returns
The session object. The session object is owned by the barcode scanner and is freed automatically when the barcode scanner is released. The returned session object is guaranteed to be non-null.
Since
4.6.0
ScContextStatus sc_barcode_scanner_apply_settings ( ScBarcodeScanner scanner,
ScBarcodeScannerSettings const *  settings 
)

Apply new settings.

Parameters
scannerThe barcode scanner object. Must not be null.
settingsThe barcode scanner settings object. Must not be null.
Returns
Status information with error message details. After use, this must be freed with sc_context_status_free().
Since
8.0.0
ScBool sc_barcode_scanner_is_setup_complete ( ScBarcodeScanner const *  scanner)

Checks whether the barcode scanner has completed initialization.

Parameters
scannerThe barcode scanner object. Must not be null.
Returns
True if setup has completed, false otherwise.
Since
4.6.0
ScBool sc_barcode_scanner_wait_for_setup_completed ( ScBarcodeScanner const *  scanner)

Block execution until the barcode scanner has completed setup.

Parameters
scannerThe barcode scanner object. Must not be null.
Returns
True
Since
4.6.0

The documentation for this struct was generated from the following file: