OLD | NEW |
1 // Copyright 2014 PDFium Authors. All rights reserved. | 1 // Copyright 2014 PDFium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com |
6 | 6 |
7 #ifndef XFA_FXBARCODE_PDF417_BC_PDF417DETECTOR_H_ | 7 #ifndef XFA_FXBARCODE_PDF417_BC_PDF417DETECTOR_H_ |
8 #define XFA_FXBARCODE_PDF417_BC_PDF417DETECTOR_H_ | 8 #define XFA_FXBARCODE_PDF417_BC_PDF417DETECTOR_H_ |
9 | 9 |
10 #include "xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.h" | 10 #include "xfa/fxbarcode/pdf417/BC_PDF417DetectorResult.h" |
11 | 11 |
12 class CBC_BinaryBitmap; | 12 class CBC_BinaryBitmap; |
13 class CBC_CommonBitMatrix; | 13 class CBC_CommonBitMatrix; |
14 class CBC_CommonBitArray; | 14 class CBC_CommonBitArray; |
15 | 15 |
16 class CBC_Detector { | 16 class CBC_Detector { |
17 public: | 17 public: |
18 CBC_Detector(); | 18 CBC_Detector(); |
19 virtual ~CBC_Detector(); | 19 virtual ~CBC_Detector(); |
| 20 |
20 static CBC_PDF417DetectorResult* detect(CBC_BinaryBitmap* image, | 21 static CBC_PDF417DetectorResult* detect(CBC_BinaryBitmap* image, |
21 int32_t hints, | 22 int32_t hints, |
22 FX_BOOL multiple, | 23 FX_BOOL multiple, |
23 int32_t& e); | 24 int32_t& e); |
24 static void rotate180(CBC_CommonBitMatrix* bitMatrix); | 25 static void rotate180(CBC_CommonBitMatrix* bitMatrix); |
25 static CBC_CommonBitArray* mirror(CBC_CommonBitArray* input, | 26 static CBC_CommonBitArray* mirror(CBC_CommonBitArray* input, |
26 CBC_CommonBitArray* result); | 27 CBC_CommonBitArray* result); |
27 | 28 |
28 private: | 29 private: |
29 static int32_t INDEXES_START_PATTERN[]; | 30 static int32_t INDEXES_START_PATTERN[]; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 FX_BOOL whiteFirst, | 63 FX_BOOL whiteFirst, |
63 int32_t* pattern, | 64 int32_t* pattern, |
64 int32_t patternLength, | 65 int32_t patternLength, |
65 CFX_Int32Array& counters); | 66 CFX_Int32Array& counters); |
66 static int32_t patternMatchVariance(CFX_Int32Array& counters, | 67 static int32_t patternMatchVariance(CFX_Int32Array& counters, |
67 int32_t* pattern, | 68 int32_t* pattern, |
68 int32_t maxIndividualVariance); | 69 int32_t maxIndividualVariance); |
69 }; | 70 }; |
70 | 71 |
71 #endif // XFA_FXBARCODE_PDF417_BC_PDF417DETECTOR_H_ | 72 #endif // XFA_FXBARCODE_PDF417_BC_PDF417DETECTOR_H_ |
OLD | NEW |