OpenCV 4.5.3(日本語機械翻訳)
fast_hough_transform.hpp
1 /*M///////////////////////////////////////////////////////////////////////////////////////
2 //
3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
4 //
5 // By downloading, copying, installing or using the software you agree to this license.
6 // If you do not agree to this license, do not download, install,
7 // copy or use the software.
8 //
9 //
10 // License Agreement
11 // For Open Source Computer Vision Library
12 //
13 // Copyright (C) 2015, Smart Engines Ltd, all rights reserved.
14 // Copyright (C) 2015, Institute for Information Transmission Problems of the Russian Academy of Sciences (Kharkevich Institute), all rights reserved.
15 // Copyright (C) 2015, Dmitry Nikolaev, Simon Karpenko, Michail Aliev, Elena Kuznetsova, all rights reserved.
16 // Third party copyrights are property of their respective owners.
17 //
18 // Redistribution and use in source and binary forms, with or without modification,
19 // are permitted provided that the following conditions are met:
20 //
21 // * Redistribution's of source code must retain the above copyright notice,
22 // this list of conditions and the following disclaimer.
23 //
24 // * Redistribution's in binary form must reproduce the above copyright notice,
25 // this list of conditions and the following disclaimer in the documentation
26 // and/or other materials provided with the distribution.
27 //
28 // * The name of the copyright holders may not be used to endorse or promote products
29 // derived from this software without specific prior written permission.
30 //
31 // This software is provided by the copyright holders and contributors "as is" and
32 // any express or implied warranties, including, but not limited to, the implied
33 // warranties of merchantability and fitness for a particular purpose are disclaimed.
34 // In no event shall the Intel Corporation or contributors be liable for any direct,
35 // indirect, incidental, special, exemplary, or consequential damages
36 // (including, but not limited to, procurement of substitute goods or services;
37 // loss of use, data, or profits; or business interruption) however caused
38 // and on any theory of liability, whether in contract, strict liability,
39 // or tort (including negligence or otherwise) arising in any way out of
40 // the use of this software, even if advised of the possibility of such damage.
41 //
42 //M*/
43
44 #ifndef __OPENCV_FAST_HOUGH_TRANSFORM_HPP__
45 #define __OPENCV_FAST_HOUGH_TRANSFORM_HPP__
46 #ifdef __cplusplus
47
48 #include "opencv2/core.hpp"
49
50
51 namespace cv { namespace ximgproc {
52
64 enum AngleRangeOption
65{
66 ARO_0_45 = 0, //< Vertical primarily direction and clockwise angle changes
67 ARO_45_90 = 1, //< Horizontal primarily direction and counterclockwise angle changes
68 ARO_90_135 = 2, //< Horizontal primarily direction and clockwise angle changes
69 ARO_315_0 = 3, //< Vertical primarily direction and counterclockwise angle changes
70 ARO_315_45 = 4, //< Vertical primarily direction
71 ARO_45_135 = 5, //< Horizontal primarily direction
72 ARO_315_135 = 6, //< Full set of directions
73 ARO_CTR_HOR = 7, //< 90 +/- atan(0.5), interval approximately from 64.5 to 116.5 degrees.
74 //< It is used for calculating Fast Hough Transform for images skewed by atan(0.5).
75 ARO_CTR_VER = 8 //< +/- atan(0.5), interval approximately from 333.5(-26.5) to 26.5 degrees
76 //< It is used for calculating Fast Hough Transform for images skewed by atan(0.5).
77};
78
88 enum HoughOp
89{
90 FHT_MIN = 0, //< Binary minimum operation. The constant specifies the binary minimum operation
91 //< @f$ f @f$ that is defined as follows: @f[ f(x, y) = \min(x, y) @f]
92 FHT_MAX = 1, //< Binary maximum operation. The constant specifies the binary maximum operation
93 //< @f$ f @f$ that is defined as follows: @f[ f(x, y) = \max(x, y) @f]
94 FHT_ADD = 2, //< Binary addition operation. The constant specifies the binary addition operation
95 //< @f$ f @f$ that is defined as follows: @f[ f(x, y) = x + y @f]
96 FHT_AVE = 3 //< Binary average operation. The constant specifies the binary average operation
97 //< @f$ f @f$ that is defined as follows: @f[ f(x, y) = \frac{x + y}{2} @f]
98};
99
105 enum HoughDeskewOption
106{
107 HDO_RAW = 0, //< Use raw cyclic image
108 HDO_DESKEW = 1 //< Prepare deskewed image
109};
110
116 typedef enum {
117 RO_STRICT = 0x00,
118 RO_IGNORE_BORDERS = 0x01,
119} RulesOption;
120
133CV_EXPORTS_W void FastHoughTransform( InputArray src,
134 OutputArray dst,
135 int dstMatDepth,
136 int angleRange = ARO_315_135,
137 int op = FHT_ADD,
138 int makeSkew = HDO_DESKEW );
139
155CV_EXPORTS_W Vec4i HoughPoint2Line(const Point &houghPoint,
156 InputArray srcImgInfo,
157 int angleRange = ARO_315_135,
158 int makeSkew = HDO_DESKEW,
159 int rules = RO_IGNORE_BORDERS );
160
161} }// namespace cv::ximgproc
162
163 #endif //__cplusplus
164 #endif //__OPENCV_FAST_HOUGH_TRANSFORM_HPP__
cv
"black box" representation of the file storage associated with a file on disk.
Definition: aruco.hpp:75