@@ -36,6 +36,8 @@ https://codesandbox.io/s/javascript-barcode-reader-liium
3636- Supports multiple barcode formats
3737- Adaptive thresholding for challenging images
3838- Single-pass mode for faster decoding
39+ - Automatic barcode region detection
40+ - Automatic rotation detection and correction
3941- TypeScript support
4042
4143## Installation
@@ -71,6 +73,8 @@ javascriptBarcodeReader({
7173 options: {
7274 // useAdaptiveThreshold: true // for images with shaded/ gradient portions
7375 // singlePass: true
76+ // detectRotation: true // auto-detect and correct rotation
77+ // locateBarcode: true // auto-locate barcode region
7478 },
7579})
7680 .then ((code ) => {
@@ -94,6 +98,8 @@ javascriptBarcodeReader({
9498 options: {
9599 // useAdaptiveThreshold: true // for images with shaded/ gradient portions
96100 // singlePass: true
101+ // detectRotation: true // auto-detect and correct rotation
102+ // locateBarcode: true // auto-locate barcode region
97103 },
98104})
99105 .then ((code ) => {
@@ -124,11 +130,13 @@ javascriptBarcodeReader({
124130
125131- ` useAdaptiveThreshold ` : Apply adaptive thresholding for images with shading or gradients
126132- ` singlePass ` : Use single-pass decoding for faster processing
133+ - ` detectRotation ` : Automatically detect and correct barcode rotation
134+ - ` locateBarcode ` : Automatically locate barcode region in image
127135
128136## Note
129137
130- - This script does not implement logic to locate/rotate barcode in the given image.
131- - Make sure the barcode image is the only thing in the image. Otherwise this script will most probably fail.
138+ - For best results, ensure barcode is relatively straight in the image
139+ - Works best when barcode occupies most of the image
132140
133141## Contributing
134142
0 commit comments