Atalasoft MobileImage API Reference
Instance Methods | Properties | List of all members
kfxKBRBarcodeReader Class Reference

The barcode recognition engine. More...

#import <kfxKBRBarcodeReader.h>

Inheritance diagram for kfxKBRBarcodeReader:

Instance Methods

(int) - readBarcodes:
 Scans a kfxKEDImage for barcodes when called. More...
 

Properties

id< kfxKBRDelegatedelegate
 A delegate to receive messages from the control. More...
 
NSArray * symbologies
 The set of symbologies currently being searched for. More...
 
KBRSearchDirections searchDirection
 The set of directions currently being searched for barcodes. More...
 
int maxBarcodes
 The maximum number of barcode results to search for. More...
 

Detailed Description

The barcode recognition engine.

Create an instance of this class to perform barcode recognition on a standalone image. The engine can be configured to search for a specific subset of barcode symbologies, barcodes oriented in particular directions, and a maximum number of barcodes to return. For best performance, each of these criteria should be restricted as much as possible.

Any barcode results found will be populated in a property on the input kfxKEDImage object, and the engine will fire an event through the engine's delegate when recognition is completed or fails.

Method Documentation

- (int) readBarcodes: (kfxKEDImage *)  image

Scans a kfxKEDImage for barcodes when called.

Pass in a kfxKEDImage to have the barcode reader search for barcodes.

This method is asynchronous, and will return when the recognition process is started. Results and status codes will be returned through an event in the reader's delegate. Any located barcodes will be automatically populated into the imageBarCodes property of the image object that was initially supplied to this method.

This feature requires a valid SDK license. For feature-based SDK licenses, the Barcode Capture feature must be enabled.

Parameters
imageThe image to search for barcodes.
Return values
KMC_SUCCESSRecognition was started without error.
KMC_BC_BUSYThe engine hasn't finished its previous readBarcodes operation.
KMC_BC_NO_DIRECTIONSNo directions were specified in the searchDirection property.
KMC_BC_NO_SYMBOLOGIESNo symbologies were specified in the symbologies property.
KMC_ED_NOIMAGEThe supplied image was nil or invalid.
KMC_BC_IMAGE_BUFFEREDThe supplied image has a FILE_BUFFERED representation, which is not supported.
KMC_ED_FILEPATHThe supplied image has a FILE representation for an invalid path.
KMC_ED_NONEXISTENT_FILEThe supplied image has a FILE representation and doesn't exist at the specified path.
KMC_BC_INVALID_IMAGEThe supplied image was invalid.
KMC_UT_LICENSE_BARCODE_CAPTUREThe SDK is not licensed for this feature.

Property Documentation

- (id<kfxKBRDelegate>) delegate
readwriteatomicassign

A delegate to receive messages from the control.

A property to get or set the delegate that will be notified of progress events and barcode results. You must set this delegate to a valid handler in order to receive results.

// The class manipulating the kfxKBRBarcodeReader object implements the kfxKBRDelegate protocol.
barcodeReader.delegate = self;
- (int) maxBarcodes
readwritenonatomicassign

The maximum number of barcode results to search for.

Set this value to the maximum number of barcodes you expect to find in the target image.

Searching for more barcodes than exist in a document will cause the reader to fully exhaust its search space, resulting in slower recognition times.

- (KBRSearchDirections) searchDirection
readwritenonatomicassign

The set of directions currently being searched for barcodes.

Searching multiple directions slows down the speed of barcode recognition. If you expect barcodes to only be oriented in certain directions, you should specify only those directions. By default, all directions will be searched.

Multiple directions can be combined using the bitwise-or operator. The direction KBR_ALL is the same as specifying the combination of all other directions.

It is an error to search for barcodes with no directions selected.

// Find barcodes that read from left to right across the image.
barcodeReader.searchDirection = KBR_LEFT_RIGHT;
// Find barcodes that read left to right or top to bottom.
barcodeReader.searchDirection = KBR_LEFT_RIGHT | KBR_TOP_DOWN;
// Find barcodes with a horizontal direction.
barcodeReader.searchDirection = KBR_LEFT_RIGHT | KBR_RIGHT_LEFT;
See also
KBRSearchDirections for all supported values.
- (NSArray*) symbologies
readwritenonatomicstrong

The set of symbologies currently being searched for.

Each symbology represents a class of barcodes, like UPC or PDF417. A class may match multiple subtypes, such as UPC-A and UPC-E within the UPC symbology.

Searching for multiple symbologies slows down the speed of barcode recognition. You should only specify the symbologies that you are interested in reading. The set of selected symbologies is empty by default.

It is an error to search for barcodes with no symbologies selected.

barcodeReader.symbologies = @[@(kfxKBRCode39), @(kfxKBRPdf417)];
See also
KBRSymbologies for all supported values.

The documentation for this class was generated from the following file:
Untitled Document © 2016 Atalasoft, Inc., 116 Pleasant St, Suite 321, Easthampton, MA 01027, U.S.A. All rights reserved. Use is subject to license terms.