Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

ZXHybridBinarizer.h 1.7KB

1234567891011121314151617181920212223242526272829303132333435363738
  1. /*
  2. * Copyright 2012 ZXing authors
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. #import "ZXGlobalHistogramBinarizer.h"
  17. @class ZXBinarizer, ZXBitMatrix, ZXLuminanceSource;
  18. /**
  19. * This class implements a local thresholding algorithm, which while slower than the
  20. * ZXGlobalHistogramBinarizer, is fairly efficient for what it does. It is designed for
  21. * high frequency images of barcodes with black data on white backgrounds. For this application,
  22. * it does a much better job than a global blackpoint with severe shadows and gradients.
  23. * However it tends to produce artifacts on lower frequency images and is therefore not
  24. * a good general purpose binarizer for uses outside ZXing.
  25. *
  26. * This class extends ZXGlobalHistogramBinarizer, using the older histogram approach for 1D readers,
  27. * and the newer local approach for 2D readers. 1D decoding using a per-row histogram is already
  28. * inherently local, and only fails for horizontal gradients. We can revisit that problem later,
  29. * but for now it was not a win to use local blocks for 1D.
  30. *
  31. * This Binarizer is the default for the unit tests and the recommended class for library users.
  32. */
  33. @interface ZXHybridBinarizer : ZXGlobalHistogramBinarizer
  34. @end