ScBarcodeScanner Struct Reference

Public Member Functions

ScBarcodeScannersc_barcode_scanner_new_with_settings (ScRecognitionContext *context, ScBarcodeScannerSettings const *settings)
 
void sc_barcode_scanner_retain (ScBarcodeScanner *scanner)
 
void sc_barcode_scanner_release (ScBarcodeScanner *scanner)
 
ScBarcodeScannerSessionsc_barcode_scanner_get_session (ScBarcodeScanner *scanner)
 
void 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 *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
Examples:
CommandLineBarcodeScannerCameraSample.c, CommandLineBarcodeScannerImageProcessingSample.c, and CommandLineMatrixScanCameraSample.c.

Member Function Documentation

ScBarcodeScanner * sc_barcode_scanner_new_with_settings ( ScRecognitionContext context,
ScBarcodeScannerSettings const *  settings 
)

Create a new barcode scanner instance with the given settings.

Parameters
contextThe recognition context. Must not be null.
settingsThe barcode scanner settings. 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
4.6.0
Examples:
CommandLineBarcodeScannerCameraSample.c, CommandLineBarcodeScannerImageProcessingSample.c, and CommandLineMatrixScanCameraSample.c.
void sc_barcode_scanner_retain ( ScBarcodeScanner 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 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
Examples:
CommandLineBarcodeScannerCameraSample.c, CommandLineBarcodeScannerImageProcessingSample.c, and CommandLineMatrixScanCameraSample.c.
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
Examples:
CommandLineBarcodeScannerCameraSample.c, and CommandLineBarcodeScannerImageProcessingSample.c.
void 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.
Since
4.6.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 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
Examples:
CommandLineBarcodeScannerImageProcessingSample.c.

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