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_WHITERECTANLEDETECTOR_H_ | |
8 #define _BC_WHITERECTANLEDETECTOR_H_ | |
9 class CBC_CommonBitMatrix; | |
10 class CBC_ResultPoint; | |
11 class CBC_WhiteRectangleDetector; | |
12 class CBC_WhiteRectangleDetector : public CFX_Object | |
13 { | |
14 public: | |
15 CBC_WhiteRectangleDetector(CBC_CommonBitMatrix *image); | |
16 CBC_WhiteRectangleDetector(CBC_CommonBitMatrix *image, FX_INT32 initSize, FX
_INT32 x, FX_INT32 y); | |
17 virtual ~CBC_WhiteRectangleDetector(); | |
18 CFX_PtrArray *Detect(FX_INT32 &e); | |
19 virtual void Init(FX_INT32 &e); | |
20 private: | |
21 FX_INT32 Round(float d); | |
22 CBC_ResultPoint *GetBlackPointOnSegment(FX_FLOAT aX, FX_FLOAT aY, FX_FLOAT b
X, FX_FLOAT bY); | |
23 FX_INT32 DistanceL2(FX_FLOAT aX, FX_FLOAT aY, FX_FLOAT bX, FX_FLOAT bY); | |
24 CFX_PtrArray *CenterEdges(CBC_ResultPoint *y, CBC_ResultPoint *z, | |
25 CBC_ResultPoint *x, CBC_ResultPoint *t); | |
26 FX_BOOL ContainsBlackPoint(FX_INT32 a, FX_INT32 b, FX_INT32 fixed, FX_BOOL h
orizontal); | |
27 const static FX_INT32 INIT_SIZE; | |
28 const static FX_INT32 CORR; | |
29 | |
30 CBC_CommonBitMatrix *m_image; | |
31 FX_INT32 m_height; | |
32 FX_INT32 m_width; | |
33 FX_INT32 m_leftInit; | |
34 FX_INT32 m_rightInit; | |
35 FX_INT32 m_downInit; | |
36 FX_INT32 m_upInit; | |
37 }; | |
38 #endif | |
OLD | NEW |