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.void
consumeResultFrom
(Entity other) Consume result from other entity.protected void
deserializeNativeSettings
(byte[] serializedSettings) boolean
Allow enabling the autodetection of image scale when scanning barcodes.boolean
Allow scanning PDF417 barcodes which don't have quiet zone surrounding it (e.g.boolean
Enables scanning of barcodes with inverse intensity values (e.g.boolean
Enable decoding of non-standard PDF417 barcodes, but without guarantee that all data will be read.boolean
Enable slower, but more thorough scanning, thus giving higher possibility of successful scan.protected byte[]
void
setAutoScaleDetection
(boolean autoScaleDetection) Allow enabling the autodetection of image scale when scanning barcodes.void
setNullQuietZoneAllowed
(boolean nullQuietZoneAllowed) Allow scanning PDF417 barcodes which don't have quiet zone surrounding it (e.g.void
setReadCode39AsExtendedData
(boolean readCode39AsExtendedData) Enable reading code39 barcode contents as extended data.void
setScanCode128
(boolean scanCode128) Should Code128 barcode be scanned.void
setScanCode39
(boolean scanCode39) Should Code39 barcode be scanned.void
setScanEan13
(boolean scanEan13) Should EAN13 barcode be scanned.void
setScanEan8
(boolean scanEan8) Should EAN8 barcode be scanned.void
setScanInverse
(boolean scanInverse) Enables scanning of barcodes with inverse intensity values (e.g.void
setScanItf
(boolean scanItf) Should ITF barcode be scanned.void
setScanPdf417
(boolean scanPdf417) Should PDF417 2D barcode be scanned.void
setScanQrCode
(boolean scanQrCode) Should QR code be scanned.void
setScanUncertain
(boolean scanUncertain) Enable decoding of non-standard PDF417 barcodes, but without guarantee that all data will be read.void
setScanUpca
(boolean scanUpca) Should UPCA barcode be scanned.void
setScanUpce
(boolean scanUpce) Should UPCE barcode be scanned.void
setSlowerThoroughScan
(boolean slowerThoroughScan) Enable slower, but more thorough scanning, thus giving higher possibility of successful scan.boolean
Enable reading code39 barcode contents as extended data.boolean
Should Code128 barcode be scanned.boolean
Should Code39 barcode be scanned.boolean
Should EAN13 barcode be scanned.boolean
Should EAN8 barcode be scanned.boolean
Should ITF barcode be scanned.boolean
Should PDF417 2D barcode be scanned.boolean
Should QR code be scanned.boolean
Should UPCA barcode be scanned.boolean
Should UPCE barcode be scanned.protected void
terminateNative
(long nativeContext) Methods inherited from class com.microblink.photopay.entities.recognizers.Recognizer
getName, isExcludedFromPing, requiresAutofocus, requiresLandscapeMode, signedJsonNativeGet, toSignedJson
Methods 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:
terminateNative
in classEntity<BarcodeRecognizer.Result>
-
serializeNativeSettings
@Nullable protected byte[] serializeNativeSettings()- Specified by:
serializeNativeSettings
in classEntity<BarcodeRecognizer.Result>
-
deserializeNativeSettings
protected void deserializeNativeSettings(@NonNull byte[] serializedSettings) - Specified by:
deserializeNativeSettings
in classEntity<BarcodeRecognizer.Result>
-
clone
Description copied from class:Entity
Create 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 theRecognizerRunnerView
orRecognizerRunner
with the updated entity hierarchy.- Specified by:
clone
in classRecognizer<BarcodeRecognizer.Result>
- Returns:
- a copy of the entity
-
consumeResultFrom
Description copied from class:Entity
Consume 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:
consumeResultFrom
in classEntity<BarcodeRecognizer.Result>
- Parameters:
other
- Entity from which result should be consumed.
-