@ericblade/quagga2 1.13.0 → 1.14.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +15 -2
- package/dist/quagga.js +182 -83
- package/dist/quagga.min.js +4 -4
- package/docs/reference/configuration.md +63 -0
- package/lib/quagga.js +175 -74
- package/package.json +3 -2
- package/type-definitions/quagga.d.ts +6 -0
package/README.md
CHANGED
|
@@ -716,13 +716,14 @@ It controls the behavior of the localization-process and needs to be adjusted
|
|
|
716
716
|
for each specific use-case. The default settings are simply a combination of
|
|
717
717
|
values which worked best during development.
|
|
718
718
|
|
|
719
|
-
|
|
720
|
-
`
|
|
719
|
+
The `halfSample`, `patchSize`, and `thresholding` properties control localization;
|
|
720
|
+
the `debug` options are only needed for development and debugging.
|
|
721
721
|
|
|
722
722
|
```javascript
|
|
723
723
|
{
|
|
724
724
|
halfSample: true,
|
|
725
725
|
patchSize: "medium", // x-small, small, medium, large, x-large
|
|
726
|
+
thresholding: "global", // global, patch
|
|
726
727
|
debug: {
|
|
727
728
|
showCanvas: false,
|
|
728
729
|
showPatches: false,
|
|
@@ -759,6 +760,18 @@ from the camera lens (lack of auto-focus, or small barcodes) then it's advised
|
|
|
759
760
|
to set the size to `small` or even `x-small`. For the latter it's also
|
|
760
761
|
recommended to crank up the resolution in order to find a barcode.
|
|
761
762
|
|
|
763
|
+
The `thresholding` property selects one binarization threshold for the whole
|
|
764
|
+
image (`global`) or one per patch (`patch`). `patch` helps when large uniform
|
|
765
|
+
areas, such as a white background, take up much of the image. It changes the
|
|
766
|
+
locator's binary image; the decoder still samples the grayscale input and
|
|
767
|
+
binarizes its scanlines separately. Patch mode can also lose reads or produce
|
|
768
|
+
additional incorrect results, so compare both modes on representative inputs
|
|
769
|
+
before enabling it. The default remains `global`.
|
|
770
|
+
|
|
771
|
+
See the [configuration reference](docs/reference/configuration.md#locator-thresholding)
|
|
772
|
+
for details and the [thresholding comparison](docs/examples/locator_thresholding.html)
|
|
773
|
+
for a visual comparison using the white-border regression fixtures.
|
|
774
|
+
|
|
762
775
|
## Examples
|
|
763
776
|
|
|
764
777
|
The following example takes an image `src` as input and prints the result on the
|