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_QRDETECTOR_H_ | |
8 #define _BC_QRDETECTOR_H_ | |
9 class CBC_ResultPoint; | |
10 class CBC_CommonBitMatrix; | |
11 class CBC_QRDetectorResult; | |
12 class CBC_QRFinderPatternInfo; | |
13 class CBC_QRAlignmentPattern; | |
14 class CBC_QRFinderPatternFinder; | |
15 class CBC_QRCoderVersion; | |
16 class CBC_QRGridSampler; | |
17 class CBC_QRAlignmentPatternFinder; | |
18 class CBC_QRAlignmentPattern; | |
19 class CBC_QRDetector; | |
20 class CBC_QRDetector | |
21 { | |
22 private: | |
23 CBC_CommonBitMatrix *m_image; | |
24 public: | |
25 CBC_QRDetector(CBC_CommonBitMatrix *image); | |
26 virtual ~CBC_QRDetector(); | |
27 | |
28 CBC_CommonBitMatrix* GetImage(); | |
29 CBC_QRDetectorResult* Detect(FX_INT32 hints, FX_INT32 &e); | |
30 CBC_QRDetectorResult* ProcessFinderPatternInfo(CBC_QRFinderPatternInfo *info
, FX_INT32 &e); | |
31 FX_FLOAT CalculateModuleSize(CBC_ResultPoint *topLeft, CBC_ResultPoint *topR
ight, CBC_ResultPoint *bottomLeft); | |
32 FX_FLOAT CalculateModuleSizeOneWay(CBC_ResultPoint *pattern, CBC_ResultPoint
*otherPattern); | |
33 FX_FLOAT SizeOfBlackWhiteBlackRunBothWays(FX_INT32 fromX, FX_INT32 fromY, FX
_INT32 toX, FX_INT32 toY); | |
34 FX_FLOAT SizeOfBlackWhiteBlackRun(FX_INT32 fromX, FX_INT32 fromY, FX_INT32 t
oX, FX_INT32 toY); | |
35 CBC_QRAlignmentPattern* FindAlignmentInRegion(FX_FLOAT overallEstModuleSize,
FX_INT32 estAlignmentX, FX_INT32 estAlignmentY, FX_FLOAT allowanceFactor, FX_IN
T32 &e); | |
36 static FX_INT32 Round(FX_FLOAT d); | |
37 static FX_INT32 ComputeDimension(CBC_ResultPoint *topLeft, CBC_ResultPoint *
topRight, CBC_ResultPoint *bottomLeft, FX_FLOAT moduleSize, FX_INT32 &e); | |
38 static CBC_CommonBitMatrix* SampleGrid(CBC_CommonBitMatrix *image, CBC_Resul
tPoint *topLeft, CBC_ResultPoint *topRight, | |
39 CBC_ResultPoint *bottomLeft, CBC_Resu
ltPoint* alignmentPattern, FX_INT32 dimension, FX_INT32 &e); | |
40 }; | |
41 #endif | |
OLD | NEW |