ZXing .Hybrid Binarizer Unit
*************************************************************************** Delphi Sample Projects Copyright 1995-2024 Patrick Prémartin under AGPL 3.0 license. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. *************************************************************************** Set of projects demonstrating the features of the Delphi development environment, its libraries and its programming language. Some of the projects have been presented at conferences, on training courses or online coding sessions. The programs are up to date with the Community Edition and the commercial version of Delphi or RAD Studio. *************************************************************************** Author(s) : Patrick PREMARTIN Site : https://samples.developpeur-pascal.fr Project site : https://github.com/DeveloppeurPascal/Delphi-samples *************************************************************************** File last update : 2025-02-08T19:46:48.606+01:00 Signature : ba893f68969b6f60204496289116f8f6c0db48a0 ***************************************************************************
Name | Description | |
---|---|---|
![]() | THybridBinarizer |
Name | Description | |
---|---|---|
![]() | TArrayIntOfInt | This class implements a local thresholding algorithm, which while slower than the GlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for high frequency images of barcodes with black data on white backgrounds. For this application, it does a much better job than a global blackpoint with severe shadows and gradients. However it tends to produce artifacts on lower frequency images and is therefore not a good general purpose binarizer for uses outside ZXing. This class extends GlobalHistogramBinarizer, using the older histogram approach for 1D readers, and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already inherently local, and only fails for horizontal gradients. We can revisit that problem later, but for now it was not a win to use local blocks for 1D. This Binarizer is the default for the unit tests and the recommended class for library users. |