Class BarcodeRecognizer
java.lang.Object
com.microblink.photopay.entities.Entity<T>
com.microblink.photopay.entities.recognizers.Recognizer<BarcodeRecognizer.Result>
com.microblink.photopay.entities.recognizers.blinkbarcode.barcode.BarcodeRecognizer
- All Implemented Interfaces:
android.os.Parcelable,JsonizableEntity
Recognizer that can perform recognition of any supported barcode type.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Create a copy of the entity.voidconsumeResultFrom(Entity other) Consume result from other entity.protected voiddeserializeNativeSettings(byte[] serializedSettings) booleanAllow enabling the autodetection of image scale when scanning barcodes.booleanAllow scanning PDF417 barcodes which don't have quiet zone surrounding it (e.g.booleanEnables scanning of barcodes with inverse intensity values (e.g.booleanEnable decoding of non-standard PDF417 barcodes, but without guarantee that all data will be read.booleanEnable slower, but more thorough scanning, thus giving higher possibility of successful scan.protected byte[]voidsetAutoScaleDetection(boolean autoScaleDetection) Allow enabling the autodetection of image scale when scanning barcodes.voidsetNullQuietZoneAllowed(boolean nullQuietZoneAllowed) Allow scanning PDF417 barcodes which don't have quiet zone surrounding it (e.g.voidsetReadCode39AsExtendedData(boolean readCode39AsExtendedData) Enable reading code39 barcode contents as extended data.voidsetScanCode128(boolean scanCode128) Should Code128 barcode be scanned.voidsetScanCode39(boolean scanCode39) Should Code39 barcode be scanned.voidsetScanEan13(boolean scanEan13) Should EAN13 barcode be scanned.voidsetScanEan8(boolean scanEan8) Should EAN8 barcode be scanned.voidsetScanInverse(boolean scanInverse) Enables scanning of barcodes with inverse intensity values (e.g.voidsetScanItf(boolean scanItf) Should ITF barcode be scanned.voidsetScanPdf417(boolean scanPdf417) Should PDF417 2D barcode be scanned.voidsetScanQrCode(boolean scanQrCode) Should QR code be scanned.voidsetScanUncertain(boolean scanUncertain) Enable decoding of non-standard PDF417 barcodes, but without guarantee that all data will be read.voidsetScanUpca(boolean scanUpca) Should UPCA barcode be scanned.voidsetScanUpce(boolean scanUpce) Should UPCE barcode be scanned.voidsetSlowerThoroughScan(boolean slowerThoroughScan) Enable slower, but more thorough scanning, thus giving higher possibility of successful scan.booleanEnable reading code39 barcode contents as extended data.booleanShould Code128 barcode be scanned.booleanShould Code39 barcode be scanned.booleanShould EAN13 barcode be scanned.booleanShould EAN8 barcode be scanned.booleanShould ITF barcode be scanned.booleanShould PDF417 2D barcode be scanned.booleanShould QR code be scanned.booleanShould UPCA barcode be scanned.booleanShould UPCE barcode be scanned.protected voidterminateNative(long nativeContext) Methods inherited from class com.microblink.photopay.entities.recognizers.Recognizer
getName, isExcludedFromPing, requiresAutofocus, requiresLandscapeMode, signedJsonNativeGet, toSignedJsonMethods inherited from class com.microblink.photopay.entities.Entity
describeContents, finalize, getNativeContext, getResult, nativeGetNativeResultContext, readFromParcel, writeToParcel
-
Field Details
-
CREATOR
-
-
Constructor Details
-
BarcodeRecognizer
public BarcodeRecognizer()
-
-
Method Details
-
setScanCode128
public void setScanCode128(boolean scanCode128) Should Code128 barcode be scanned. By default, this is set to 'false' -
shouldScanCode128
public boolean shouldScanCode128()Should Code128 barcode be scanned. By default, this is set to 'false' -
setScanCode39
public void setScanCode39(boolean scanCode39) Should Code39 barcode be scanned. By default, this is set to 'false' -
shouldScanCode39
public boolean shouldScanCode39()Should Code39 barcode be scanned. By default, this is set to 'false' -
setSlowerThoroughScan
public void setSlowerThoroughScan(boolean slowerThoroughScan) Enable slower, but more thorough scanning, thus giving higher possibility of successful scan. By default, this is set to 'true' NOTE: this option has no effect on PDF417 barcode scanning -
isSlowerThoroughScan
public boolean isSlowerThoroughScan()Enable slower, but more thorough scanning, thus giving higher possibility of successful scan. By default, this is set to 'true' NOTE: this option has no effect on PDF417 barcode scanning -
setScanEan8
public void setScanEan8(boolean scanEan8) Should EAN8 barcode be scanned. By default, this is set to 'false' -
shouldScanEan8
public boolean shouldScanEan8()Should EAN8 barcode be scanned. By default, this is set to 'false' -
setScanEan13
public void setScanEan13(boolean scanEan13) Should EAN13 barcode be scanned. By default, this is set to 'false' -
shouldScanEan13
public boolean shouldScanEan13()Should EAN13 barcode be scanned. By default, this is set to 'false' -
setScanPdf417
public void setScanPdf417(boolean scanPdf417) Should PDF417 2D barcode be scanned. By default, this is set to 'false' -
shouldScanPdf417
public boolean shouldScanPdf417()Should PDF417 2D barcode be scanned. By default, this is set to 'false' -
setScanInverse
public void setScanInverse(boolean scanInverse) Enables scanning of barcodes with inverse intensity values (e.g. white barcode on black background) By default, this is set to 'false' -
isScanInverse
public boolean isScanInverse()Enables scanning of barcodes with inverse intensity values (e.g. white barcode on black background) By default, this is set to 'false' -
setScanUncertain
public void setScanUncertain(boolean scanUncertain) Enable decoding of non-standard PDF417 barcodes, but without guarantee that all data will be read. This option should be enabled for PDF417 barcode that has missing rows (i.e. not whole barcode is printed) By default, this is set to 'true' -
isScanUncertain
public boolean isScanUncertain()Enable decoding of non-standard PDF417 barcodes, but without guarantee that all data will be read. This option should be enabled for PDF417 barcode that has missing rows (i.e. not whole barcode is printed) By default, this is set to 'true' -
setScanUpce
public void setScanUpce(boolean scanUpce) Should UPCE barcode be scanned. By default, this is set to 'false' -
shouldScanUpce
public boolean shouldScanUpce()Should UPCE barcode be scanned. By default, this is set to 'false' -
setReadCode39AsExtendedData
public void setReadCode39AsExtendedData(boolean readCode39AsExtendedData) Enable reading code39 barcode contents as extended data. For more information about code39 extended data (a.k.a. full ASCII mode), see https://en.wikipedia.org/wiki/Code_39#Full_ASCII_Code_39 By default, this is set to 'false' -
shouldReadCode39AsExtendedData
public boolean shouldReadCode39AsExtendedData()Enable reading code39 barcode contents as extended data. For more information about code39 extended data (a.k.a. full ASCII mode), see https://en.wikipedia.org/wiki/Code_39#Full_ASCII_Code_39 By default, this is set to 'false' -
setNullQuietZoneAllowed
public void setNullQuietZoneAllowed(boolean nullQuietZoneAllowed) Allow scanning PDF417 barcodes which don't have quiet zone surrounding it (e.g. text concatenated with barcode). This option can significantly increase recognition time. By default, this is set to 'false' -
isNullQuietZoneAllowed
public boolean isNullQuietZoneAllowed()Allow scanning PDF417 barcodes which don't have quiet zone surrounding it (e.g. text concatenated with barcode). This option can significantly increase recognition time. By default, this is set to 'false' -
setScanItf
public void setScanItf(boolean scanItf) Should ITF barcode be scanned. By default, this is set to 'false' -
shouldScanItf
public boolean shouldScanItf()Should ITF barcode be scanned. By default, this is set to 'false' -
setScanQrCode
public void setScanQrCode(boolean scanQrCode) Should QR code be scanned. By default, this is set to 'false' -
shouldScanQrCode
public boolean shouldScanQrCode()Should QR code be scanned. By default, this is set to 'false' -
setScanUpca
public void setScanUpca(boolean scanUpca) Should UPCA barcode be scanned. By default, this is set to 'false' -
shouldScanUpca
public boolean shouldScanUpca()Should UPCA barcode be scanned. By default, this is set to 'false' -
setAutoScaleDetection
public void setAutoScaleDetection(boolean autoScaleDetection) Allow enabling the autodetection of image scale when scanning barcodes. If set to true, prior reading barcode, image scale will be corrected. This enabled correct reading of barcodes on high resolution images but slows down the recognition process. By default, this is set to 'true' NOTE: This setting is applied only for Code39 and Code128 barcode scanning. -
isAutoScaleDetection
public boolean isAutoScaleDetection()Allow enabling the autodetection of image scale when scanning barcodes. If set to true, prior reading barcode, image scale will be corrected. This enabled correct reading of barcodes on high resolution images but slows down the recognition process. By default, this is set to 'true' NOTE: This setting is applied only for Code39 and Code128 barcode scanning. -
terminateNative
protected void terminateNative(long nativeContext) - Specified by:
terminateNativein classEntity<BarcodeRecognizer.Result>
-
serializeNativeSettings
@Nullable protected byte[] serializeNativeSettings()- Specified by:
serializeNativeSettingsin classEntity<BarcodeRecognizer.Result>
-
deserializeNativeSettings
protected void deserializeNativeSettings(@NonNull byte[] serializedSettings) - Specified by:
deserializeNativeSettingsin classEntity<BarcodeRecognizer.Result>
-
clone
Description copied from class:EntityCreate a copy of the entity. This is required if properties of the entity must be modified while background thread performs processing. In order to avoid race conditions, changing properties is not allowed while entity is used in background processing. However, you are able to make a copy of the entity, change properties of it and then update theRecognizerRunnerVieworRecognizerRunnerwith the updated entity hierarchy.- Specified by:
clonein classRecognizer<BarcodeRecognizer.Result>- Returns:
- a copy of the entity
-
consumeResultFrom
Description copied from class:EntityConsume result from other entity. The result from other will be put instead current result of this entity. This method is used insideBaseIntentTransferable.loadFromIntent(Intent)and similar methods to replace the result content of the saved entities with results that have arrived overIntent- Specified by:
consumeResultFromin classEntity<BarcodeRecognizer.Result>- Parameters:
other- Entity from which result should be consumed.
-