Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

ZXGlobalHistogramBinarizer.h 1.4KB

12345678910111213141516171819202122232425262728293031323334353637
  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 "ZXBinarizer.h"
  17. @class ZXBitArray, ZXBitMatrix, ZXLuminanceSource;
  18. /**
  19. * This Binarizer implementation uses the old ZXing global histogram approach. It is suitable
  20. * for low-end mobile devices which don't have enough CPU or memory to use a local thresholding
  21. * algorithm. However, because it picks a global black point, it cannot handle difficult shadows
  22. * and gradients.
  23. *
  24. * Faster mobile devices and all desktop applications should probably use ZXHybridBinarizer instead.
  25. */
  26. @interface ZXGlobalHistogramBinarizer : ZXBinarizer
  27. // Applies simple sharpening to the row data to improve performance of the 1D Readers.
  28. - (ZXBitArray *)blackRow:(int)y row:(ZXBitArray *)row error:(NSError **)error;
  29. // Does not sharpen the data, as this call is intended to only be used by 2D Readers.
  30. - (ZXBinarizer *)createBinarizer:(ZXLuminanceSource *)source;
  31. @end