@ericblade/quagga2 1.12.1 → 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 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
- Only two properties are relevant for the use in Quagga (`halfSample` and
720
- `patchSize`) whereas the rest is only needed for development and debugging.
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