|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectsdt.brc.android.BarcodeReader
public class BarcodeReader
The Barcode engine for reading barcodes from image
Field Summary | |
---|---|
static int |
SDTBARCODE_ALL_1D
All 1-D Barcodes flag (0x0001ffff) combining all 1-D barcode types currently supported by SD-TOOLKIL Barcode SDK 2.1 for Android |
static int |
SDTBARCODE_ALL_2D
All 2-D Barcodes flag (0x000e0000) combining all 1-D barcode types currently supported by SD-TOOLKIL Barcode SDK 2.1 for Android |
static int |
SDTBARCODE_CODABAR
Codabar barcode type flag (0x00000001). |
static int |
SDTBARCODE_CODE11
Code 11 barcode type flag (0x00000020). |
static int |
SDTBARCODE_CODE128
Code 128 barcode type flag (0x00000002). |
static int |
SDTBARCODE_CODE32
Code 32 barcode type flag (0x00000004). |
static int |
SDTBARCODE_CODE39
Code 39 barcode type flag (0x00000008). |
static int |
SDTBARCODE_CODE93
Code 93 barcode type flag (0x00000010). |
static int |
SDTBARCODE_DATAMATRIX
DataMatrix barcode type flag (0x00020000) |
static int |
SDTBARCODE_EAN13
EAN13 barcode type flag (0x00000040). |
static int |
SDTBARCODE_EAN5
EAN5 barcode type flag (0x00000100). |
static int |
SDTBARCODE_EAN8
EAN8 barcode type flag (0x00000080). |
static int |
SDTBARCODE_I2OF5
I2of5 barcode type flag (0x00000200). |
static int |
SDTBARCODE_INTELLIMAIL
Intelligent Mail barcode type flag (0x00010000) |
static int |
SDTBARCODE_PATCH_CODE
Patch code barcode type flag (0x00000400). |
static int |
SDTBARCODE_PDF417
PDF417 barcode type flag (0x00040000) |
static int |
SDTBARCODE_PLUS2
Plus2 barcode type flag (0x00001000). |
static int |
SDTBARCODE_PLUS5
Plus5 barcode type flag (0x00002000). |
static int |
SDTBARCODE_POSTNET
Postnet barcode type flag (0x00000800). |
static int |
SDTBARCODE_QRCODE
QR Code barcode type flag (0x00080000) |
static int |
SDTBARCODE_UNKNOWN
Unknown barcode type flag (0x00000000). |
static int |
SDTBARCODE_UPCA
UPC-A barcode type flag (0x00004000). |
static int |
SDTBARCODE_UPCB
UPC-B barcode type flag (0x00008000). |
static int |
SDTREADDIRECTION_ALL
All supported reading directions flag flag (0x0f). |
static int |
SDTREADDIRECTION_BTT
Right-to-Left barcode reading direction flag (0x08). |
static int |
SDTREADDIRECTION_LTR
Left-to-right barcode reading direction flag (0x01). |
static int |
SDTREADDIRECTION_RTL
Right-to-Left barcode reading direction flag (0x02). |
static int |
SDTREADDIRECTION_TTB
Right-to-Left barcode reading direction flag (0x04). |
Constructor Summary | |
---|---|
BarcodeReader(Context context,
String licenseKey)
Creates a new BarcodeReader object |
Method Summary | |
---|---|
void |
finalize()
|
BarcodeReaderResult |
getResultAt(int pos)
The method returns BarcodeReaderResult object containg information about
successfully recognized barcode in the previous call to
readRGBBuffer(byte[] data, int width, int height, int bpp) . |
int |
getResultsCount()
The method returns count of successfully recognized barcodes in the previous call to readRGBBuffer(byte[] data, int width, int height, int bpp) |
int |
readRGBBuffer(byte[] data,
int width,
int height,
int bpp)
The method reads the image data from RGB image buffer allocated in memory. |
int |
readRGBBufferInt(int[] data,
int width,
int height)
The method reads the image data from RGB 32 image integer buffer allocated in memory. |
void |
setActiveScanRectangle(int left,
int top,
int right,
int bottom)
The method defines the square area within the image where the reader will look for barcodes in next call to readRGBImageBuffer(byte[], int, int, int) . |
void |
setExpectedBarcodesCount(int count)
The method limit the recognition to only one barcode symbol. |
void |
setReadInputDirections(long dwFlags)
The method specifies barcode reading directions the Barcode Reader will use to scan the image in next call to readRGBImageBuffer(byte[], int, int, int) . |
void |
setReadInputTypes(long dwFlags)
The method specifies barcode types the Barcode Reader will look for in next call to readRGBImageBuffer(byte[], int, int, int) . |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static int SDTBARCODE_UNKNOWN
public static int SDTBARCODE_CODABAR
public static int SDTBARCODE_CODE128
public static int SDTBARCODE_CODE32
public static int SDTBARCODE_CODE39
public static int SDTBARCODE_CODE93
public static int SDTBARCODE_CODE11
public static int SDTBARCODE_EAN13
public static int SDTBARCODE_EAN8
public static int SDTBARCODE_EAN5
public static int SDTBARCODE_I2OF5
public static int SDTBARCODE_PATCH_CODE
public static int SDTBARCODE_POSTNET
public static int SDTBARCODE_PLUS2
public static int SDTBARCODE_PLUS5
public static int SDTBARCODE_UPCA
public static int SDTBARCODE_UPCB
public static int SDTBARCODE_INTELLIMAIL
public static int SDTBARCODE_ALL_1D
public static int SDTBARCODE_DATAMATRIX
public static int SDTBARCODE_PDF417
public static int SDTBARCODE_QRCODE
public static int SDTBARCODE_ALL_2D
public static int SDTREADDIRECTION_LTR
public static int SDTREADDIRECTION_RTL
public static int SDTREADDIRECTION_TTB
public static int SDTREADDIRECTION_BTT
public static int SDTREADDIRECTION_ALL
Constructor Detail |
---|
public BarcodeReader(Context context, String licenseKey)
licenseKey
- Developer License KeyMethod Detail |
---|
public void finalize()
finalize
in class Object
public void setExpectedBarcodesCount(int count)
readRGBImageBuffer(byte[], int, int, int)
or readRGBImageBufferInt(int[], int, int, int)
will returns immidiatelly
count
- [in] number of expected barcode symbolspublic void setActiveScanRectangle(int left, int top, int right, int bottom)
readRGBImageBuffer(byte[], int, int, int)
.
If one of boundary values passed to the function exceeds input image size then image
boundary will be used instead.
left
- [in] positive integer value specified left boundary of the scan area in pixelstop
- [in] positive integer value specified top boundary of the scan area in pixelsright
- [in] positive integer value specified right boundary of the scan area in pixelsbottom
- [in] positive integer value specified bottom boundary of the scan area in pixelspublic void setReadInputTypes(long dwFlags)
readRGBImageBuffer(byte[], int, int, int)
. By default the Barcode Reader look for all barcode types.
dwFlags
- [in] Specifies barcode types the Barcode Reader will look for. This parameter can be one or combination
of the following values:
Value | Integer Value | Description |
---|---|---|
SDTBARCODE_CODABAR |
0x00000001 | Codabar barcode |
SDTBARCODE_CODE128 |
0x00000002 | Code 128 barcode |
SDTBARCODE_CODE32 |
0x00000004 | Code 32 (also known as Base 32, Pharma 32/39, and Italian Pharmacode) |
SDTBARCODE_CODE39 |
0x00000008 | Code 39 barcode |
SDTBARCODE_CODE93 |
0x00000010 | Code 93 barcode |
SDTBARCODE_CODE11 |
0x00000020 | Code 11 barcode |
SDTBARCODE_EAN13 |
0x00000040 | EAN13 barcode |
SDTBARCODE_EAN8 |
0x00000080 | EAN8 barcode |
SDTBARCODE_EAN5 |
0x00000100 | EAN5 barcode |
SDTBARCODE_I2OF5 |
0x00000200 | Interleaved 2 of 5 barcode |
SDTBARCODE_PATCH_CODE |
0x00000400 | Patch code barcode |
SDTBARCODE_POSTNET |
0x00000800 | Postnet barcode |
SDTBARCODE_PLUS2 |
0x00001000 | Plus2 (2-digit supplementals assoc. with EAN and UPC) |
SDTBARCODE_PLUS5 |
0x00002000 | Plus5 (5-digit supplementals assoc. with EAN and UPC) |
SDTBARCODE_UPCA |
0x00004000 | UPC-A barcode |
SDTBARCODE_UPCB |
0x00008000 | UPC-B barcode |
SDTBARCODE_INTELLIMAIL |
0x00010000 | Intelligent Mail barcode |
SDTBARCODE_ALL_1D |
0x0001ffff | All above 1-D Barcodes currently supported by SD-TOOLKIT Barcode Reader SDK 2.1 for Android |
SDTBARCODE_DATAMATRIX |
0x00020000 | DataMatrix 2D Barcode |
SDTBARCODE_PDF417 |
0x00040000 | PDF417 2D Barcode |
SDTBARCODE_QRCODE |
0x00080000 | QR Code 2D Barcode |
SDTBARCODE_ALL_2D |
0x000e0000 | All above 2-D Barcodes currently supported by SD-TOOLKIT Barcode Reader SDK 2.1 for Android |
public void setReadInputDirections(long dwFlags)
readRGBImageBuffer(byte[], int, int, int)
. By default the Barcode Reader look in all directions.
dwFlags
- [in] Specifies barcode types the Barcode Reader will look for. This parameter can be one or combination
of the following values:
Value | Integer Value | Description |
---|---|---|
SDTREADDIRECTION_LTR |
0x00000001 | Left-to-Right. Corresponds to normally oriented barcodes. |
SDTREADDIRECTION_RTL |
0x00000002 | Right-to-Left. Corresponds to 180 degrees rotated barcodes. |
SDTREADDIRECTION_TTB |
0x00000004 | Top-to-Bottom. Corresponds to 90 degrees clock-wise rotated barcodes. |
SDTREADDIRECTION_BTT |
0x00000008 | Bottom-to-Top. Corresponds to 90 degrees counter-clock-wise rotated barcodes. |
SDTREADDIRECTION_ALL |
0x00000010 | All possible directions. |
public int readRGBBuffer(byte[] data, int width, int height, int bpp)
getResultAt(int pos)
.
data
- [in] buffer allocated in memory and filled in with RGB or grayscale datawidth
- [in] image width in pixelsheight
- [in] image height in pixelsbpp
- [in] bits per pixels. The following values are supported: 32, 24, 16, 8(grayscale)
public int readRGBBufferInt(int[] data, int width, int height)
getResultAt(int pos)
.
data
- [in] buffer allocated in memory and filled in with RGBwidth
- [in] image width in pixelsheight
- [in] image height in pixels
public int getResultsCount()
readRGBBuffer(byte[] data, int width, int height, int bpp)
public BarcodeReaderResult getResultAt(int pos)
BarcodeReaderResult
object containg information about
successfully recognized barcode in the previous call to
readRGBBuffer(byte[] data, int width, int height, int bpp)
.
The count of recognized and available barcodes can be obtained by call to
getResultsCount()
.
BarcodeReaderResult
object or null.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |