1 /*M///////////////////////////////////////////////////////////////////////////////////////
\r
3 // IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
\r
5 // By downloading, copying, installing or using the software you agree to this license.
\r
6 // If you do not agree to this license, do not download, install,
\r
7 // copy or use the software.
\r
10 // License Agreement
\r
11 // For Open Source Computer Vision Library
\r
13 // Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
\r
14 // Copyright (C) 2009, Willow Garage Inc., all rights reserved.
\r
15 // Third party copyrights are property of their respective owners.
\r
17 // Redistribution and use in source and binary forms, with or without modification,
\r
18 // are permitted provided that the following conditions are met:
\r
20 // * Redistribution's of source code must retain the above copyright notice,
\r
21 // this list of conditions and the following disclaimer.
\r
23 // * Redistribution's in binary form must reproduce the above copyright notice,
\r
24 // this list of conditions and the following disclaimer in the documentation
\r
25 // and/or other materials provided with the distribution.
\r
27 // * The name of the copyright holders may not be used to endorse or promote products
\r
28 // derived from this software without specific prior written permission.
\r
30 // This software is provided by the copyright holders and contributors "as is" and
\r
31 // any express or implied warranties, including, but not limited to, the implied
\r
32 // warranties of merchantability and fitness for a particular purpose are disclaimed.
\r
33 // In no event shall the Intel Corporation or contributors be liable for any direct,
\r
34 // indirect, incidental, special, exemplary, or consequential damages
\r
35 // (including, but not limited to, procurement of substitute goods or services;
\r
36 // loss of use, data, or profits; or business interruption) however caused
\r
37 // and on any theory of liability, whether in contract, strict liability,
\r
38 // or tort (including negligence or otherwise) arising in any way out of
\r
39 // the use of this software, even if advised of the possibility of such damage.
\r
43 #ifndef _CV_INTERNAL_H_
\r
44 #define _CV_INTERNAL_H_
\r
46 #if defined _MSC_VER && _MSC_VER >= 1200
\r
47 /* disable warnings related to inline functions */
\r
48 #pragma warning( disable: 4251 4711 4710 4514 )
\r
69 #undef _CV_ALWAYS_PROFILE_
\r
70 #define _CV_ALWAYS_NO_PROFILE_
\r
76 CV_INLINE IppiSize ippiSize(int width, int height)
\r
78 IppiSize size = { width, height };
\r
84 extern const uchar icvSaturate8u_cv[];
\r
85 #define CV_FAST_CAST_8U(t) (assert(-256 <= (t) || (t) <= 512), icvSaturate8u_cv[(t)+256])
\r
86 #define CV_CALC_MIN_8U(a,b) (a) -= CV_FAST_CAST_8U((a) - (b))
\r
87 #define CV_CALC_MAX_8U(a,b) (a) += CV_FAST_CAST_8U((b) - (a))
\r
90 extern const float icv8x32fTab_cv[];
\r
91 #define CV_8TO32F(x) icv8x32fTab_cv[(x)+256]
\r
93 // (-128.f)^2 ... (255.f)^2
\r
94 extern const float icv8x32fSqrTab[];
\r
95 #define CV_8TO32F_SQR(x) icv8x32fSqrTab[(x)+128]
\r
100 enum { INTER_BITS=5, INTER_BITS2=INTER_BITS*2,
\r
101 INTER_TAB_SIZE=(1<<INTER_BITS),
\r
102 INTER_TAB_SIZE2=INTER_TAB_SIZE*INTER_TAB_SIZE };
\r
104 static inline Point normalizeAnchor( Point anchor, Size ksize )
\r
106 if( anchor == Point(-1,-1) )
\r
107 anchor = Point(ksize.width/2, ksize.height/2);
\r
109 CV_Assert( anchor.inside(Rect(0, 0, ksize.width, ksize.height)) );
\r
113 void preprocess2DKernel( const Mat& kernel, vector<Point>& coords, vector<uchar>& coeffs );
\r
114 void crossCorr( const Mat& src, const Mat& templ, Mat& dst,
\r
115 Point anchor=Point(0,0), double delta=0,
\r
116 int borderType=BORDER_REFLECT_101 );
\r
120 typedef struct CvPyramid
\r
132 #define IPPI_CALL(func) CV_Assert((func) >= 0)
\r
135 #include "_cvmatrix.h"
\r
136 #include "_cvgeom.h"
\r
137 #include "_cvimgproc.h"
\r
139 #endif /*_CV_INTERNAL_H_*/
\r