OLD | NEW |
| (Empty) |
1 // Copyright 2014 PDFium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com | |
6 | |
7 #ifndef _BC_DETECTOR_H_ | |
8 #define _BC_DETECTOR_H_ | |
9 class CBC_PDF417DetectorResult; | |
10 class CBC_BinaryBitmap; | |
11 class CBC_CommonBitMatrix; | |
12 class CBC_CommonBitArray; | |
13 class CBC_Detector; | |
14 class CBC_Detector : public CFX_Object | |
15 { | |
16 public: | |
17 CBC_Detector(); | |
18 virtual ~CBC_Detector(); | |
19 static CBC_PDF417DetectorResult* detect(CBC_BinaryBitmap* image, FX_INT32 hi
nts, FX_BOOL multiple, FX_INT32 &e); | |
20 static void rotate180(CBC_CommonBitMatrix* bitMatrix); | |
21 static CBC_CommonBitArray* mirror(CBC_CommonBitArray* input, CBC_CommonBitAr
ray* result); | |
22 private: | |
23 static FX_INT32 INDEXES_START_PATTERN[]; | |
24 static FX_INT32 INDEXES_STOP_PATTERN[]; | |
25 static FX_INT32 INTEGER_MATH_SHIFT; | |
26 static FX_INT32 PATTERN_MATCH_RESULT_SCALE_FACTOR; | |
27 static FX_INT32 MAX_AVG_VARIANCE; | |
28 static FX_INT32 MAX_INDIVIDUAL_VARIANCE; | |
29 static FX_INT32 START_PATTERN[]; | |
30 static FX_INT32 STOP_PATTERN[]; | |
31 static FX_INT32 MAX_PIXEL_DRIFT; | |
32 static FX_INT32 MAX_PATTERN_DRIFT; | |
33 static FX_INT32 SKIPPED_ROW_COUNT_MAX; | |
34 static FX_INT32 ROW_STEP; | |
35 static FX_INT32 BARCODE_MIN_HEIGHT; | |
36 static CFX_PtrArray* detect(FX_BOOL multiple, CBC_CommonBitMatrix* bitMatrix
); | |
37 static CFX_PtrArray* findVertices(CBC_CommonBitMatrix* matrix, FX_INT32 star
tRow, FX_INT32 startColumn); | |
38 static void copyToResult(CFX_PtrArray* result, CFX_PtrArray* tmpResult, FX_I
NT32* destinationIndexes, FX_INT32 destinationLength); | |
39 static CFX_PtrArray* findRowsWithPattern(CBC_CommonBitMatrix* matrix, FX_INT
32 height, FX_INT32 width, FX_INT32 startRow, FX_INT32 startColumn, FX_INT32* pa
ttern, FX_INT32 patternLength); | |
40 static CFX_Int32Array* findGuardPattern(CBC_CommonBitMatrix* matrix, FX_INT3
2 column, FX_INT32 row, FX_INT32 width, FX_BOOL whiteFirst, FX_INT32* pattern, F
X_INT32 patternLength, CFX_Int32Array &counters); | |
41 static FX_INT32 patternMatchVariance(CFX_Int32Array &counters, FX_INT32* pat
tern, FX_INT32 maxIndividualVariance); | |
42 }; | |
43 #endif | |
OLD | NEW |