Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
89356ff1
O
Opencv
项目概览
Greenplum
/
Opencv
11 个月 前同步成功
通知
7
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
Opencv
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
89356ff1
编写于
3月 14, 2013
作者:
A
Andrey Kamaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Move non-CV functionality from core.hpp to separate utility.hpp header
上级
1ad7af3c
变更
90
隐藏空白更改
内联
并排
Showing
90 changed file
with
709 addition
and
621 deletion
+709
-621
apps/sft/include/sft/common.hpp
apps/sft/include/sft/common.hpp
+1
-0
include/opencv/cv.h
include/opencv/cv.h
+1
-0
modules/calib3d/src/precomp.hpp
modules/calib3d/src/precomp.hpp
+4
-1
modules/calib3d/test/test_precomp.hpp
modules/calib3d/test/test_precomp.hpp
+1
-1
modules/contrib/src/detection_based_tracker.cpp
modules/contrib/src/detection_based_tracker.cpp
+1
-0
modules/contrib/src/precomp.hpp
modules/contrib/src/precomp.hpp
+2
-0
modules/core/include/opencv2/core.hpp
modules/core/include/opencv2/core.hpp
+1
-296
modules/core/include/opencv2/core/core_c.h
modules/core/include/opencv2/core/core_c.h
+0
-12
modules/core/include/opencv2/core/cvdef.h
modules/core/include/opencv2/core/cvdef.h
+15
-2
modules/core/include/opencv2/core/mat.hpp
modules/core/include/opencv2/core/mat.hpp
+0
-5
modules/core/include/opencv2/core/operations.hpp
modules/core/include/opencv2/core/operations.hpp
+0
-108
modules/core/include/opencv2/core/utility.hpp
modules/core/include/opencv2/core/utility.hpp
+459
-0
modules/core/src/precomp.hpp
modules/core/src/precomp.hpp
+1
-0
modules/core/test/test_precomp.hpp
modules/core/test/test_precomp.hpp
+1
-1
modules/features2d/src/precomp.hpp
modules/features2d/src/precomp.hpp
+2
-0
modules/flann/src/precomp.hpp
modules/flann/src/precomp.hpp
+1
-0
modules/flann/test/test_precomp.hpp
modules/flann/test/test_precomp.hpp
+0
-1
modules/highgui/src/precomp.hpp
modules/highgui/src/precomp.hpp
+2
-0
modules/highgui/test/test_precomp.hpp
modules/highgui/test/test_precomp.hpp
+1
-1
modules/imgproc/src/precomp.hpp
modules/imgproc/src/precomp.hpp
+2
-0
modules/imgproc/test/test_precomp.hpp
modules/imgproc/test/test_precomp.hpp
+1
-1
modules/java/generator/config/core.filelist
modules/java/generator/config/core.filelist
+1
-0
modules/java/generator/src/cpp/common.h
modules/java/generator/src/cpp/common.h
+2
-0
modules/java/generator/src/cpp/core_manual.cpp
modules/java/generator/src/cpp/core_manual.cpp
+2
-0
modules/legacy/src/precomp.hpp
modules/legacy/src/precomp.hpp
+3
-4
modules/legacy/test/test_precomp.hpp
modules/legacy/test/test_precomp.hpp
+1
-1
modules/ml/src/precomp.hpp
modules/ml/src/precomp.hpp
+1
-0
modules/ml/test/test_precomp.hpp
modules/ml/test/test_precomp.hpp
+2
-2
modules/nonfree/src/precomp.hpp
modules/nonfree/src/precomp.hpp
+2
-0
modules/nonfree/test/test_precomp.hpp
modules/nonfree/test/test_precomp.hpp
+1
-1
modules/objdetect/src/precomp.hpp
modules/objdetect/src/precomp.hpp
+2
-0
modules/ocl/perf/precomp.hpp
modules/ocl/perf/precomp.hpp
+1
-3
modules/ocl/src/precomp.hpp
modules/ocl/src/precomp.hpp
+1
-0
modules/ocl/test/precomp.hpp
modules/ocl/test/precomp.hpp
+2
-4
modules/photo/test/test_precomp.hpp
modules/photo/test/test_precomp.hpp
+1
-1
modules/python/CMakeLists.txt
modules/python/CMakeLists.txt
+1
-0
modules/python/src2/cv2.cpp
modules/python/src2/cv2.cpp
+1
-0
modules/ts/include/opencv2/ts.hpp
modules/ts/include/opencv2/ts.hpp
+1
-16
modules/ts/src/precomp.hpp
modules/ts/src/precomp.hpp
+4
-1
modules/ts/src/ts.cpp
modules/ts/src/ts.cpp
+0
-16
modules/video/perf/perf_precomp.hpp
modules/video/perf/perf_precomp.hpp
+1
-1
modules/video/src/precomp.hpp
modules/video/src/precomp.hpp
+3
-2
modules/video/test/test_precomp.hpp
modules/video/test/test_precomp.hpp
+1
-1
samples/c/bgfg_codebook.cpp
samples/c/bgfg_codebook.cpp
+4
-3
samples/c/find_obj_ferns.cpp
samples/c/find_obj_ferns.cpp
+6
-6
samples/c/mser_sample.cpp
samples/c/mser_sample.cpp
+4
-3
samples/cpp/bgfg_gmg.cpp
samples/cpp/bgfg_gmg.cpp
+1
-0
samples/cpp/bgfg_segm.cpp
samples/cpp/bgfg_segm.cpp
+4
-3
samples/cpp/brief_match_test.cpp
samples/cpp/brief_match_test.cpp
+6
-5
samples/cpp/build3dmodel.cpp
samples/cpp/build3dmodel.cpp
+6
-5
samples/cpp/calibration.cpp
samples/cpp/calibration.cpp
+5
-4
samples/cpp/camshiftdemo.cpp
samples/cpp/camshiftdemo.cpp
+3
-2
samples/cpp/chamfer.cpp
samples/cpp/chamfer.cpp
+4
-3
samples/cpp/connected_components.cpp
samples/cpp/connected_components.cpp
+3
-2
samples/cpp/demhist.cpp
samples/cpp/demhist.cpp
+3
-2
samples/cpp/detection_based_tracker_sample.cpp
samples/cpp/detection_based_tracker_sample.cpp
+5
-4
samples/cpp/detector_descriptor_matcher_evaluation.cpp
samples/cpp/detector_descriptor_matcher_evaluation.cpp
+4
-3
samples/cpp/dft.cpp
samples/cpp/dft.cpp
+4
-3
samples/cpp/distrans.cpp
samples/cpp/distrans.cpp
+3
-2
samples/cpp/edge.cpp
samples/cpp/edge.cpp
+3
-2
samples/cpp/facerec_demo.cpp
samples/cpp/facerec_demo.cpp
+4
-3
samples/cpp/freak_demo.cpp
samples/cpp/freak_demo.cpp
+6
-5
samples/cpp/image_alignment.cpp
samples/cpp/image_alignment.cpp
+4
-4
samples/cpp/linemod.cpp
samples/cpp/linemod.cpp
+5
-4
samples/cpp/opencv_version.cpp
samples/cpp/opencv_version.cpp
+1
-1
samples/cpp/peopledetect.cpp
samples/cpp/peopledetect.cpp
+1
-0
samples/cpp/select3dobj.cpp
samples/cpp/select3dobj.cpp
+5
-4
samples/cpp/simpleflow_demo.cpp
samples/cpp/simpleflow_demo.cpp
+3
-2
samples/cpp/stereo_match.cpp
samples/cpp/stereo_match.cpp
+1
-0
samples/cpp/stitching_detailed.cpp
samples/cpp/stitching_detailed.cpp
+2
-1
samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp
...al_code/calib3d/camera_calibration/camera_calibration.cpp
+5
-4
samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp
...orial_code/core/how_to_scan_images/how_to_scan_images.cpp
+3
-2
samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp
...ial_code/core/mat_mask_operations/mat_mask_operations.cpp
+4
-3
samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity.cpp
..._code/gpu/gpu-basics-similarity/gpu-basics-similarity.cpp
+5
-4
samples/cpp/tvl1_optical_flow.cpp
samples/cpp/tvl1_optical_flow.cpp
+3
-2
samples/cpp/videostab.cpp
samples/cpp/videostab.cpp
+1
-0
samples/cpp/watershed.cpp
samples/cpp/watershed.cpp
+3
-2
samples/gpu/bgfg_segm.cpp
samples/gpu/bgfg_segm.cpp
+4
-3
samples/gpu/brox_optical_flow.cpp
samples/gpu/brox_optical_flow.cpp
+4
-4
samples/gpu/farneback_optical_flow.cpp
samples/gpu/farneback_optical_flow.cpp
+5
-4
samples/gpu/generalized_hough.cpp
samples/gpu/generalized_hough.cpp
+6
-5
samples/gpu/hog.cpp
samples/gpu/hog.cpp
+3
-2
samples/gpu/houghlines.cpp
samples/gpu/houghlines.cpp
+5
-4
samples/gpu/optical_flow.cpp
samples/gpu/optical_flow.cpp
+4
-3
samples/gpu/performance/performance.h
samples/gpu/performance/performance.h
+2
-2
samples/gpu/pyrlk_optical_flow.cpp
samples/gpu/pyrlk_optical_flow.cpp
+6
-6
samples/gpu/softcascade.cpp
samples/gpu/softcascade.cpp
+1
-0
samples/gpu/stereo_match.cpp
samples/gpu/stereo_match.cpp
+3
-2
samples/ocl/hog.cpp
samples/ocl/hog.cpp
+3
-2
samples/ocl/performance.cpp
samples/ocl/performance.cpp
+9
-9
未找到文件。
apps/sft/include/sft/common.hpp
浏览文件 @
89356ff1
...
...
@@ -44,6 +44,7 @@
#define __SFT_COMMON_HPP__
#include <opencv2/core.hpp>
#include <opencv2/core/utility.hpp>
#include <opencv2/softcascade.hpp>
namespace
cv
{
using
namespace
softcascade
;}
...
...
include/opencv/cv.h
浏览文件 @
89356ff1
...
...
@@ -62,6 +62,7 @@
#include "opencv2/core/core_c.h"
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/imgproc.hpp"
#include "opencv2/video.hpp"
...
...
modules/calib3d/src/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -49,8 +49,11 @@
#include "opencv2/calib3d.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/internal.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/internal.hpp"
#include <vector>
#ifdef HAVE_TEGRA_OPTIMIZATION
...
...
modules/calib3d/test/test_precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -9,12 +9,12 @@
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
#include <iostream>
#include "opencv2/ts.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/calib3d.hpp"
#include "opencv2/highgui.hpp"
#include <iostream>
namespace
cvtest
{
...
...
modules/contrib/src/detection_based_tracker.cpp
浏览文件 @
89356ff1
#if defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(ANDROID)
#include "opencv2/contrib/detection_based_tracker.hpp"
#include "opencv2/core/utility.hpp"
#include <pthread.h>
...
...
modules/contrib/src/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -52,6 +52,8 @@
#include "opencv2/objdetect.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/internal.hpp"
namespace
cv
...
...
modules/core/include/opencv2/core.hpp
浏览文件 @
89356ff1
...
...
@@ -101,13 +101,6 @@ template<typename _Tp> class CV_EXPORTS MatIterator_;
template
<
typename
_Tp
>
class
CV_EXPORTS
MatConstIterator_
;
template
<
typename
_Tp
>
class
CV_EXPORTS
MatCommaInitializer_
;
template
<
typename
_Tp
,
size_t
fixed_size
=
1024
/
sizeof
(
_Tp
)
+
8
>
class
CV_EXPORTS
AutoBuffer
;
CV_EXPORTS
std
::
string
format
(
const
char
*
fmt
,
...
);
CV_EXPORTS
std
::
string
tempfile
(
const
char
*
suffix
CV_DEFAULT
(
0
));
CV_EXPORTS
void
glob
(
std
::
string
pattern
,
std
::
vector
<
std
::
string
>&
result
,
bool
recursive
=
false
);
// matrix decomposition types
enum
{
DECOMP_LU
=
0
,
DECOMP_SVD
=
1
,
DECOMP_EIG
=
2
,
DECOMP_CHOLESKY
=
3
,
DECOMP_QR
=
4
,
DECOMP_NORMAL
=
16
};
enum
{
NORM_INF
=
1
,
NORM_L1
=
2
,
NORM_L2
=
4
,
NORM_L2SQR
=
5
,
NORM_HAMMING
=
6
,
NORM_HAMMING2
=
7
,
NORM_TYPE_MASK
=
7
,
NORM_RELATIVE
=
8
,
NORM_MINMAX
=
32
};
...
...
@@ -162,34 +155,6 @@ public:
*/
CV_EXPORTS
void
error
(
const
Exception
&
exc
);
//! Sets/resets the break-on-error mode.
/*!
When the break-on-error mode is set, the default error handler
issues a hardware exception, which can make debugging more convenient.
\return the previous state
*/
CV_EXPORTS
bool
setBreakOnError
(
bool
flag
);
typedef
int
(
CV_CDECL
*
ErrorCallback
)(
int
status
,
const
char
*
func_name
,
const
char
*
err_msg
,
const
char
*
file_name
,
int
line
,
void
*
userdata
);
//! Sets the new error handler and the optional user data.
/*!
The function sets the new error handler, called from cv::error().
\param errCallback the new error handler. If NULL, the default error handler is used.
\param userdata the optional user data pointer, passed to the callback.
\param prevUserdata the optional output parameter where the previous user data pointer is stored
\return the previous error handler
*/
CV_EXPORTS
ErrorCallback
redirectError
(
ErrorCallback
errCallback
,
void
*
userdata
=
0
,
void
**
prevUserdata
=
0
);
#ifdef __GNUC__
#define CV_Error( code, msg ) cv::error( cv::Exception(code, msg, __func__, __FILE__, __LINE__) )
#define CV_Error_( code, args ) cv::error( cv::Exception(code, cv::format args, __func__, __FILE__, __LINE__) )
...
...
@@ -206,70 +171,6 @@ CV_EXPORTS ErrorCallback redirectError( ErrorCallback errCallback,
#define CV_DbgAssert(expr)
#endif
CV_EXPORTS
void
setNumThreads
(
int
nthreads
);
CV_EXPORTS
int
getNumThreads
();
CV_EXPORTS
int
getThreadNum
();
CV_EXPORTS_W
const
std
::
string
&
getBuildInformation
();
//! Returns the number of ticks.
/*!
The function returns the number of ticks since the certain event (e.g. when the machine was turned on).
It can be used to initialize cv::RNG or to measure a function execution time by reading the tick count
before and after the function call. The granularity of ticks depends on the hardware and OS used. Use
cv::getTickFrequency() to convert ticks to seconds.
*/
CV_EXPORTS_W
int64
getTickCount
();
/*!
Returns the number of ticks per seconds.
The function returns the number of ticks (as returned by cv::getTickCount()) per second.
The following code computes the execution time in milliseconds:
\code
double exec_time = (double)getTickCount();
// do something ...
exec_time = ((double)getTickCount() - exec_time)*1000./getTickFrequency();
\endcode
*/
CV_EXPORTS_W
double
getTickFrequency
();
/*!
Returns the number of CPU ticks.
On platforms where the feature is available, the function returns the number of CPU ticks
since the certain event (normally, the system power-on moment). Using this function
one can accurately measure the execution time of very small code fragments,
for which cv::getTickCount() granularity is not enough.
*/
CV_EXPORTS_W
int64
getCPUTickCount
();
/*!
Returns SSE etc. support status
The function returns true if certain hardware features are available.
Currently, the following features are recognized:
- CV_CPU_MMX - MMX
- CV_CPU_SSE - SSE
- CV_CPU_SSE2 - SSE 2
- CV_CPU_SSE3 - SSE 3
- CV_CPU_SSSE3 - SSSE 3
- CV_CPU_SSE4_1 - SSE 4.1
- CV_CPU_SSE4_2 - SSE 4.2
- CV_CPU_POPCNT - POPCOUNT
- CV_CPU_AVX - AVX
\note {Note that the function output is not static. Once you called cv::useOptimized(false),
most of the hardware acceleration is disabled and thus the function will returns false,
until you call cv::useOptimized(true)}
*/
CV_EXPORTS_W
bool
checkHardwareSupport
(
int
feature
);
//! returns the number of CPUs (including hyper-threading)
CV_EXPORTS_W
int
getNumberOfCPUs
();
/*!
Allocates memory buffer
...
...
@@ -300,45 +201,6 @@ template<typename _Tp> static inline void deallocate(_Tp* ptr, size_t)
delete
[]
ptr
;
}
/*!
Aligns pointer by the certain number of bytes
This small inline function aligns the pointer by the certian number of bytes by shifting
it forward by 0 or a positive offset.
*/
template
<
typename
_Tp
>
static
inline
_Tp
*
alignPtr
(
_Tp
*
ptr
,
int
n
=
(
int
)
sizeof
(
_Tp
))
{
return
(
_Tp
*
)(((
size_t
)
ptr
+
n
-
1
)
&
-
n
);
}
/*!
Aligns buffer size by the certain number of bytes
This small inline function aligns a buffer size by the certian number of bytes by enlarging it.
*/
static
inline
size_t
alignSize
(
size_t
sz
,
int
n
)
{
return
(
sz
+
n
-
1
)
&
-
n
;
}
/*!
Turns on/off available optimization
The function turns on or off the optimized code in OpenCV. Some optimization can not be enabled
or disabled, but, for example, most of SSE code in OpenCV can be temporarily turned on or off this way.
\note{Since optimization may imply using special data structures, it may be unsafe
to call this function anywhere in the code. Instead, call it somewhere at the top level.}
*/
CV_EXPORTS_W
void
setUseOptimized
(
bool
onoff
);
/*!
Returns the current optimization status
The function returns the current optimization status, which is controlled by cv::setUseOptimized().
*/
CV_EXPORTS_W
bool
useOptimized
();
/*!
The STL-compilant memory Allocator based on cv::fastMalloc() and cv::fastFree()
*/
...
...
@@ -1421,8 +1283,6 @@ CV_EXPORTS OutputArray noArray();
enum
{
MAGIC_MASK
=
0xFFFF0000
,
TYPE_MASK
=
0x00000FFF
,
DEPTH_MASK
=
7
};
static
inline
size_t
getElemSize
(
int
type
)
{
return
CV_ELEM_SIZE
(
type
);
}
/*!
Custom array allocator
...
...
@@ -2084,10 +1944,6 @@ CV_EXPORTS BinaryFunc getCopyMaskFunc(size_t esz);
//! swaps two matrices
CV_EXPORTS
void
swap
(
Mat
&
a
,
Mat
&
b
);
//! converts array (CvMat or IplImage) to cv::Mat
CV_EXPORTS
Mat
cvarrToMat
(
const
CvArr
*
arr
,
bool
copyData
=
false
,
bool
allowND
=
true
,
int
coiMode
=
0
,
AutoBuffer
<
double
>*
buf
=
0
);
//! extracts Channel of Interest from CvMat or IplImage and makes cv::Mat out of it.
CV_EXPORTS
void
extractImageCOI
(
const
CvArr
*
arr
,
OutputArray
coiimg
,
int
coi
=-
1
);
//! inserts single-channel cv::Mat into a multi-channel CvMat or IplImage
...
...
@@ -3088,73 +2944,6 @@ public:
Vec
<
_Tp
,
m
>
operator
*
()
const
;
};
/*!
Automatically Allocated Buffer Class
The class is used for temporary buffers in functions and methods.
If a temporary buffer is usually small (a few K's of memory),
but its size depends on the parameters, it makes sense to create a small
fixed-size array on stack and use it if it's large enough. If the required buffer size
is larger than the fixed size, another buffer of sufficient size is allocated dynamically
and released after the processing. Therefore, in typical cases, when the buffer size is small,
there is no overhead associated with malloc()/free().
At the same time, there is no limit on the size of processed data.
This is what AutoBuffer does. The template takes 2 parameters - type of the buffer elements and
the number of stack-allocated elements. Here is how the class is used:
\code
void my_func(const cv::Mat& m)
{
cv::AutoBuffer<float> buf; // create automatic buffer containing 1000 floats
buf.allocate(m.rows); // if m.rows <= 1000, the pre-allocated buffer is used,
// otherwise the buffer of "m.rows" floats will be allocated
// dynamically and deallocated in cv::AutoBuffer destructor
...
}
\endcode
*/
template
<
typename
_Tp
,
size_t
fixed_size
>
class
CV_EXPORTS
AutoBuffer
{
public:
typedef
_Tp
value_type
;
//! the default contructor
AutoBuffer
();
//! constructor taking the real buffer size
AutoBuffer
(
size_t
_size
);
//! the copy constructor
AutoBuffer
(
const
AutoBuffer
<
_Tp
,
fixed_size
>&
buf
);
//! the assignment operator
AutoBuffer
<
_Tp
,
fixed_size
>&
operator
=
(
const
AutoBuffer
<
_Tp
,
fixed_size
>&
buf
);
//! destructor. calls deallocate()
~
AutoBuffer
();
//! allocates the new buffer of size _size. if the _size is small enough, stack-allocated buffer is used
void
allocate
(
size_t
_size
);
//! deallocates the buffer if it was dynamically allocated
void
deallocate
();
//! resizes the buffer and preserves the content
void
resize
(
size_t
_size
);
//! returns the current buffer size
size_t
size
()
const
;
//! returns pointer to the real buffer, stack-allocated or head-allocated
operator
_Tp
*
();
//! returns read-only pointer to the real buffer, stack-allocated or head-allocated
operator
const
_Tp
*
()
const
;
protected:
//! pointer to the real buffer, can point to buf if the buffer is small enough
_Tp
*
ptr
;
//! size of the real buffer
size_t
sz
;
//! pre-allocated buffer
_Tp
buf
[
fixed_size
];
};
/////////////////////////// multi-dimensional dense matrix //////////////////////////
/*!
...
...
@@ -4628,91 +4417,7 @@ template<> struct ParamType<uchar>
enum
{
type
=
Param
::
UCHAR
};
};
// The CommandLineParser class is designed for command line arguments parsing
class
CV_EXPORTS
CommandLineParser
{
public:
CommandLineParser
(
int
argc
,
const
char
*
const
argv
[],
const
std
::
string
&
keys
);
CommandLineParser
(
const
CommandLineParser
&
parser
);
CommandLineParser
&
operator
=
(
const
CommandLineParser
&
parser
);
std
::
string
getPathToApplication
()
const
;
template
<
typename
T
>
T
get
(
const
std
::
string
&
name
,
bool
space_delete
=
true
)
const
{
T
val
=
T
();
getByName
(
name
,
space_delete
,
ParamType
<
T
>::
type
,
(
void
*
)
&
val
);
return
val
;
}
template
<
typename
T
>
T
get
(
int
index
,
bool
space_delete
=
true
)
const
{
T
val
=
T
();
getByIndex
(
index
,
space_delete
,
ParamType
<
T
>::
type
,
(
void
*
)
&
val
);
return
val
;
}
bool
has
(
const
std
::
string
&
name
)
const
;
bool
check
()
const
;
void
about
(
const
std
::
string
&
message
);
void
printMessage
()
const
;
void
printErrors
()
const
;
protected:
void
getByName
(
const
std
::
string
&
name
,
bool
space_delete
,
int
type
,
void
*
dst
)
const
;
void
getByIndex
(
int
index
,
bool
space_delete
,
int
type
,
void
*
dst
)
const
;
struct
Impl
;
Impl
*
impl
;
};
/////////////////////////////// Parallel Primitives //////////////////////////////////
// a base body class
class
CV_EXPORTS
ParallelLoopBody
{
public:
virtual
~
ParallelLoopBody
();
virtual
void
operator
()
(
const
Range
&
range
)
const
=
0
;
};
CV_EXPORTS
void
parallel_for_
(
const
Range
&
range
,
const
ParallelLoopBody
&
body
,
double
nstripes
=-
1.
);
/////////////////////////// Synchronization Primitives ///////////////////////////////
class
CV_EXPORTS
Mutex
{
public:
Mutex
();
~
Mutex
();
Mutex
(
const
Mutex
&
m
);
Mutex
&
operator
=
(
const
Mutex
&
m
);
void
lock
();
bool
trylock
();
void
unlock
();
struct
Impl
;
protected:
Impl
*
impl
;
};
class
CV_EXPORTS
AutoLock
{
public:
AutoLock
(
Mutex
&
m
)
:
mutex
(
&
m
)
{
mutex
->
lock
();
}
~
AutoLock
()
{
mutex
->
unlock
();
}
protected:
Mutex
*
mutex
;
};
}
}
//namespace cv
#endif // __cplusplus
...
...
modules/core/include/opencv2/core/core_c.h
浏览文件 @
89356ff1
...
...
@@ -1696,18 +1696,6 @@ CVAPI(double) cvGetTickFrequency( void );
/*********************************** CPU capabilities ***********************************/
#define CV_CPU_NONE 0
#define CV_CPU_MMX 1
#define CV_CPU_SSE 2
#define CV_CPU_SSE2 3
#define CV_CPU_SSE3 4
#define CV_CPU_SSSE3 5
#define CV_CPU_SSE4_1 6
#define CV_CPU_SSE4_2 7
#define CV_CPU_POPCNT 8
#define CV_CPU_AVX 10
#define CV_HARDWARE_MAX_FEATURE 255
CVAPI
(
int
)
cvCheckHardwareSupport
(
int
feature
);
/*********************************** Multi-Threading ************************************/
...
...
modules/core/include/opencv2/core/cvdef.h
浏览文件 @
89356ff1
...
...
@@ -97,7 +97,20 @@
# endif
#endif
/* intrinsics support */
/* CPU features and intrinsics support */
#define CV_CPU_NONE 0
#define CV_CPU_MMX 1
#define CV_CPU_SSE 2
#define CV_CPU_SSE2 3
#define CV_CPU_SSE3 4
#define CV_CPU_SSSE3 5
#define CV_CPU_SSE4_1 6
#define CV_CPU_SSE4_2 7
#define CV_CPU_POPCNT 8
#define CV_CPU_AVX 10
#define CV_CPU_NEON 11
#define CV_HARDWARE_MAX_FEATURE 255
#if defined __SSE2__ || defined _M_X64 || (defined _M_IX86_FP && _M_IX86_FP >= 2)
# include "emmintrin.h"
# define CV_SSE 1
...
...
@@ -421,4 +434,4 @@ CV_INLINE int cvIsInf( double value )
CV_INLINE
CV_XADD
(
int
*
addr
,
int
delta
)
{
int
tmp
=
*
addr
;
*
addr
+=
delta
;
return
tmp
;
}
#endif
#endif // __OPENCV_CORE_CVDEF_H__
\ No newline at end of file
#endif // __OPENCV_CORE_CVDEF_H__
modules/core/include/opencv2/core/mat.hpp
浏览文件 @
89356ff1
...
...
@@ -748,11 +748,6 @@ inline Mat::MStep& Mat::MStep::operator = (size_t s)
return
*
this
;
}
static
inline
Mat
cvarrToMatND
(
const
CvArr
*
arr
,
bool
copyData
=
false
,
int
coiMode
=
0
)
{
return
cvarrToMat
(
arr
,
copyData
,
true
,
coiMode
);
}
///////////////////////////////////////////// SVD //////////////////////////////////////////////////////
inline
SVD
::
SVD
()
{}
...
...
modules/core/include/opencv2/core/operations.hpp
浏览文件 @
89356ff1
...
...
@@ -2482,114 +2482,6 @@ inline Point LineIterator::pos() const
return
p
;
}
/////////////////////////////// AutoBuffer ////////////////////////////////////////
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
AutoBuffer
<
_Tp
,
fixed_size
>::
AutoBuffer
()
{
ptr
=
buf
;
sz
=
fixed_size
;
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
AutoBuffer
<
_Tp
,
fixed_size
>::
AutoBuffer
(
size_t
_size
)
{
ptr
=
buf
;
sz
=
fixed_size
;
allocate
(
_size
);
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
AutoBuffer
<
_Tp
,
fixed_size
>::
AutoBuffer
(
const
AutoBuffer
<
_Tp
,
fixed_size
>&
abuf
)
{
ptr
=
buf
;
sz
=
fixed_size
;
allocate
(
abuf
.
size
);
for
(
size_t
i
=
0
;
i
<
sz
;
i
++
)
ptr
[
i
]
=
abuf
.
ptr
[
i
];
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
AutoBuffer
<
_Tp
,
fixed_size
>&
AutoBuffer
<
_Tp
,
fixed_size
>::
operator
=
(
const
AutoBuffer
<
_Tp
,
fixed_size
>&
abuf
)
{
if
(
this
!=
&
abuf
)
{
deallocate
();
allocate
(
abuf
.
size
);
for
(
size_t
i
=
0
;
i
<
sz
;
i
++
)
ptr
[
i
]
=
abuf
.
ptr
[
i
];
}
return
*
this
;
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
AutoBuffer
<
_Tp
,
fixed_size
>::~
AutoBuffer
()
{
deallocate
();
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
void
AutoBuffer
<
_Tp
,
fixed_size
>::
allocate
(
size_t
_size
)
{
if
(
_size
<=
sz
)
{
sz
=
_size
;
return
;
}
deallocate
();
if
(
_size
>
fixed_size
)
{
ptr
=
new
_Tp
[
_size
];
sz
=
_size
;
}
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
void
AutoBuffer
<
_Tp
,
fixed_size
>::
deallocate
()
{
if
(
ptr
!=
buf
)
{
delete
[]
ptr
;
ptr
=
buf
;
sz
=
fixed_size
;
}
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
void
AutoBuffer
<
_Tp
,
fixed_size
>::
resize
(
size_t
_size
)
{
if
(
_size
<=
sz
)
{
sz
=
_size
;
return
;
}
size_t
i
,
prevsize
=
sz
,
minsize
=
MIN
(
prevsize
,
_size
);
_Tp
*
prevptr
=
ptr
;
ptr
=
_size
>
fixed_size
?
new
_Tp
[
_size
]
:
buf
;
sz
=
_size
;
if
(
ptr
!=
prevptr
)
for
(
i
=
0
;
i
<
minsize
;
i
++
)
ptr
[
i
]
=
prevptr
[
i
];
for
(
i
=
prevsize
;
i
<
_size
;
i
++
)
ptr
[
i
]
=
_Tp
();
if
(
prevptr
!=
buf
)
delete
[]
prevptr
;
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
size_t
AutoBuffer
<
_Tp
,
fixed_size
>::
size
()
const
{
return
sz
;
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
AutoBuffer
<
_Tp
,
fixed_size
>::
operator
_Tp
*
()
{
return
ptr
;
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
AutoBuffer
<
_Tp
,
fixed_size
>::
operator
const
_Tp
*
()
const
{
return
ptr
;
}
/////////////////////////////////// Ptr ////////////////////////////////////////
template
<
typename
_Tp
>
inline
Ptr
<
_Tp
>::
Ptr
()
:
obj
(
0
),
refcount
(
0
)
{}
...
...
modules/core/include/opencv2/core/utility.hpp
0 → 100644
浏览文件 @
89356ff1
/*M///////////////////////////////////////////////////////////////////////////////////////
//
// IMPORTANT: READ BEFORE DOWNLOADING, COPYING, INSTALLING OR USING.
//
// By downloading, copying, installing or using the software you agree to this license.
// If you do not agree to this license, do not download, install,
// copy or use the software.
//
//
// License Agreement
// For Open Source Computer Vision Library
//
// Copyright (C) 2000-2008, Intel Corporation, all rights reserved.
// Copyright (C) 2009, Willow Garage Inc., all rights reserved.
// Copyright (C) 2013, OpenCV Foundation, all rights reserved.
// Third party copyrights are property of their respective owners.
//
// Redistribution and use in source and binary forms, with or without modification,
// are permitted provided that the following conditions are met:
//
// * Redistribution's of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
//
// * Redistribution's in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// * The name of the copyright holders may not be used to endorse or promote products
// derived from this software without specific prior written permission.
//
// This software is provided by the copyright holders and contributors "as is" and
// any express or implied warranties, including, but not limited to, the implied
// warranties of merchantability and fitness for a particular purpose are disclaimed.
// In no event shall the Intel Corporation or contributors be liable for any direct,
// indirect, incidental, special, exemplary, or consequential damages
// (including, but not limited to, procurement of substitute goods or services;
// loss of use, data, or profits; or business interruption) however caused
// and on any theory of liability, whether in contract, strict liability,
// or tort (including negligence or otherwise) arising in any way out of
// the use of this software, even if advised of the possibility of such damage.
//
//M*/
#ifndef __OPENCV_CORE_UTILITY_H__
#define __OPENCV_CORE_UTILITY_H__
#include "opencv2/core.hpp"
namespace
cv
{
/*!
Automatically Allocated Buffer Class
The class is used for temporary buffers in functions and methods.
If a temporary buffer is usually small (a few K's of memory),
but its size depends on the parameters, it makes sense to create a small
fixed-size array on stack and use it if it's large enough. If the required buffer size
is larger than the fixed size, another buffer of sufficient size is allocated dynamically
and released after the processing. Therefore, in typical cases, when the buffer size is small,
there is no overhead associated with malloc()/free().
At the same time, there is no limit on the size of processed data.
This is what AutoBuffer does. The template takes 2 parameters - type of the buffer elements and
the number of stack-allocated elements. Here is how the class is used:
\code
void my_func(const cv::Mat& m)
{
cv::AutoBuffer<float> buf; // create automatic buffer containing 1000 floats
buf.allocate(m.rows); // if m.rows <= 1000, the pre-allocated buffer is used,
// otherwise the buffer of "m.rows" floats will be allocated
// dynamically and deallocated in cv::AutoBuffer destructor
...
}
\endcode
*/
template
<
typename
_Tp
,
size_t
fixed_size
=
1024
/
sizeof
(
_Tp
)
+
8
>
class
CV_EXPORTS
AutoBuffer
{
public:
typedef
_Tp
value_type
;
//! the default contructor
AutoBuffer
();
//! constructor taking the real buffer size
AutoBuffer
(
size_t
_size
);
//! the copy constructor
AutoBuffer
(
const
AutoBuffer
<
_Tp
,
fixed_size
>&
buf
);
//! the assignment operator
AutoBuffer
<
_Tp
,
fixed_size
>&
operator
=
(
const
AutoBuffer
<
_Tp
,
fixed_size
>&
buf
);
//! destructor. calls deallocate()
~
AutoBuffer
();
//! allocates the new buffer of size _size. if the _size is small enough, stack-allocated buffer is used
void
allocate
(
size_t
_size
);
//! deallocates the buffer if it was dynamically allocated
void
deallocate
();
//! resizes the buffer and preserves the content
void
resize
(
size_t
_size
);
//! returns the current buffer size
size_t
size
()
const
;
//! returns pointer to the real buffer, stack-allocated or head-allocated
operator
_Tp
*
();
//! returns read-only pointer to the real buffer, stack-allocated or head-allocated
operator
const
_Tp
*
()
const
;
protected:
//! pointer to the real buffer, can point to buf if the buffer is small enough
_Tp
*
ptr
;
//! size of the real buffer
size_t
sz
;
//! pre-allocated buffer
_Tp
buf
[
fixed_size
];
};
//! Sets/resets the break-on-error mode.
/*!
When the break-on-error mode is set, the default error handler
issues a hardware exception, which can make debugging more convenient.
\return the previous state
*/
CV_EXPORTS
bool
setBreakOnError
(
bool
flag
);
typedef
int
(
CV_CDECL
*
ErrorCallback
)(
int
status
,
const
char
*
func_name
,
const
char
*
err_msg
,
const
char
*
file_name
,
int
line
,
void
*
userdata
);
//! Sets the new error handler and the optional user data.
/*!
The function sets the new error handler, called from cv::error().
\param errCallback the new error handler. If NULL, the default error handler is used.
\param userdata the optional user data pointer, passed to the callback.
\param prevUserdata the optional output parameter where the previous user data pointer is stored
\return the previous error handler
*/
CV_EXPORTS
ErrorCallback
redirectError
(
ErrorCallback
errCallback
,
void
*
userdata
=
0
,
void
**
prevUserdata
=
0
);
CV_EXPORTS
std
::
string
format
(
const
char
*
fmt
,
...
);
CV_EXPORTS
std
::
string
tempfile
(
const
char
*
suffix
CV_DEFAULT
(
0
));
CV_EXPORTS
void
glob
(
std
::
string
pattern
,
std
::
vector
<
std
::
string
>&
result
,
bool
recursive
=
false
);
CV_EXPORTS
void
setNumThreads
(
int
nthreads
);
CV_EXPORTS
int
getNumThreads
();
CV_EXPORTS
int
getThreadNum
();
CV_EXPORTS_W
const
std
::
string
&
getBuildInformation
();
//! Returns the number of ticks.
/*!
The function returns the number of ticks since the certain event (e.g. when the machine was turned on).
It can be used to initialize cv::RNG or to measure a function execution time by reading the tick count
before and after the function call. The granularity of ticks depends on the hardware and OS used. Use
cv::getTickFrequency() to convert ticks to seconds.
*/
CV_EXPORTS_W
int64
getTickCount
();
/*!
Returns the number of ticks per seconds.
The function returns the number of ticks (as returned by cv::getTickCount()) per second.
The following code computes the execution time in milliseconds:
\code
double exec_time = (double)getTickCount();
// do something ...
exec_time = ((double)getTickCount() - exec_time)*1000./getTickFrequency();
\endcode
*/
CV_EXPORTS_W
double
getTickFrequency
();
/*!
Returns the number of CPU ticks.
On platforms where the feature is available, the function returns the number of CPU ticks
since the certain event (normally, the system power-on moment). Using this function
one can accurately measure the execution time of very small code fragments,
for which cv::getTickCount() granularity is not enough.
*/
CV_EXPORTS_W
int64
getCPUTickCount
();
/*!
Returns SSE etc. support status
The function returns true if certain hardware features are available.
Currently, the following features are recognized:
- CV_CPU_MMX - MMX
- CV_CPU_SSE - SSE
- CV_CPU_SSE2 - SSE 2
- CV_CPU_SSE3 - SSE 3
- CV_CPU_SSSE3 - SSSE 3
- CV_CPU_SSE4_1 - SSE 4.1
- CV_CPU_SSE4_2 - SSE 4.2
- CV_CPU_POPCNT - POPCOUNT
- CV_CPU_AVX - AVX
\note {Note that the function output is not static. Once you called cv::useOptimized(false),
most of the hardware acceleration is disabled and thus the function will returns false,
until you call cv::useOptimized(true)}
*/
CV_EXPORTS_W
bool
checkHardwareSupport
(
int
feature
);
//! returns the number of CPUs (including hyper-threading)
CV_EXPORTS_W
int
getNumberOfCPUs
();
/*!
Aligns pointer by the certain number of bytes
This small inline function aligns the pointer by the certian number of bytes by shifting
it forward by 0 or a positive offset.
*/
template
<
typename
_Tp
>
static
inline
_Tp
*
alignPtr
(
_Tp
*
ptr
,
int
n
=
(
int
)
sizeof
(
_Tp
))
{
return
(
_Tp
*
)(((
size_t
)
ptr
+
n
-
1
)
&
-
n
);
}
/*!
Aligns buffer size by the certain number of bytes
This small inline function aligns a buffer size by the certian number of bytes by enlarging it.
*/
static
inline
size_t
alignSize
(
size_t
sz
,
int
n
)
{
return
(
sz
+
n
-
1
)
&
-
n
;
}
/*!
Turns on/off available optimization
The function turns on or off the optimized code in OpenCV. Some optimization can not be enabled
or disabled, but, for example, most of SSE code in OpenCV can be temporarily turned on or off this way.
\note{Since optimization may imply using special data structures, it may be unsafe
to call this function anywhere in the code. Instead, call it somewhere at the top level.}
*/
CV_EXPORTS_W
void
setUseOptimized
(
bool
onoff
);
/*!
Returns the current optimization status
The function returns the current optimization status, which is controlled by cv::setUseOptimized().
*/
CV_EXPORTS_W
bool
useOptimized
();
static
inline
size_t
getElemSize
(
int
type
)
{
return
CV_ELEM_SIZE
(
type
);
}
/////////////////////////////// Parallel Primitives //////////////////////////////////
// a base body class
class
CV_EXPORTS
ParallelLoopBody
{
public:
virtual
~
ParallelLoopBody
();
virtual
void
operator
()
(
const
Range
&
range
)
const
=
0
;
};
CV_EXPORTS
void
parallel_for_
(
const
Range
&
range
,
const
ParallelLoopBody
&
body
,
double
nstripes
=-
1.
);
/////////////////////////// Synchronization Primitives ///////////////////////////////
class
CV_EXPORTS
Mutex
{
public:
Mutex
();
~
Mutex
();
Mutex
(
const
Mutex
&
m
);
Mutex
&
operator
=
(
const
Mutex
&
m
);
void
lock
();
bool
trylock
();
void
unlock
();
struct
Impl
;
protected:
Impl
*
impl
;
};
class
CV_EXPORTS
AutoLock
{
public:
AutoLock
(
Mutex
&
m
)
:
mutex
(
&
m
)
{
mutex
->
lock
();
}
~
AutoLock
()
{
mutex
->
unlock
();
}
protected:
Mutex
*
mutex
;
};
// The CommandLineParser class is designed for command line arguments parsing
class
CV_EXPORTS
CommandLineParser
{
public:
CommandLineParser
(
int
argc
,
const
char
*
const
argv
[],
const
std
::
string
&
keys
);
CommandLineParser
(
const
CommandLineParser
&
parser
);
CommandLineParser
&
operator
=
(
const
CommandLineParser
&
parser
);
std
::
string
getPathToApplication
()
const
;
template
<
typename
T
>
T
get
(
const
std
::
string
&
name
,
bool
space_delete
=
true
)
const
{
T
val
=
T
();
getByName
(
name
,
space_delete
,
ParamType
<
T
>::
type
,
(
void
*
)
&
val
);
return
val
;
}
template
<
typename
T
>
T
get
(
int
index
,
bool
space_delete
=
true
)
const
{
T
val
=
T
();
getByIndex
(
index
,
space_delete
,
ParamType
<
T
>::
type
,
(
void
*
)
&
val
);
return
val
;
}
bool
has
(
const
std
::
string
&
name
)
const
;
bool
check
()
const
;
void
about
(
const
std
::
string
&
message
);
void
printMessage
()
const
;
void
printErrors
()
const
;
protected:
void
getByName
(
const
std
::
string
&
name
,
bool
space_delete
,
int
type
,
void
*
dst
)
const
;
void
getByIndex
(
int
index
,
bool
space_delete
,
int
type
,
void
*
dst
)
const
;
struct
Impl
;
Impl
*
impl
;
};
/////////////////////////////// AutoBuffer implementation ////////////////////////////////////////
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
AutoBuffer
<
_Tp
,
fixed_size
>::
AutoBuffer
()
{
ptr
=
buf
;
sz
=
fixed_size
;
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
AutoBuffer
<
_Tp
,
fixed_size
>::
AutoBuffer
(
size_t
_size
)
{
ptr
=
buf
;
sz
=
fixed_size
;
allocate
(
_size
);
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
AutoBuffer
<
_Tp
,
fixed_size
>::
AutoBuffer
(
const
AutoBuffer
<
_Tp
,
fixed_size
>&
abuf
)
{
ptr
=
buf
;
sz
=
fixed_size
;
allocate
(
abuf
.
size
);
for
(
size_t
i
=
0
;
i
<
sz
;
i
++
)
ptr
[
i
]
=
abuf
.
ptr
[
i
];
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
AutoBuffer
<
_Tp
,
fixed_size
>&
AutoBuffer
<
_Tp
,
fixed_size
>::
operator
=
(
const
AutoBuffer
<
_Tp
,
fixed_size
>&
abuf
)
{
if
(
this
!=
&
abuf
)
{
deallocate
();
allocate
(
abuf
.
size
);
for
(
size_t
i
=
0
;
i
<
sz
;
i
++
)
ptr
[
i
]
=
abuf
.
ptr
[
i
];
}
return
*
this
;
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
AutoBuffer
<
_Tp
,
fixed_size
>::~
AutoBuffer
()
{
deallocate
();
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
void
AutoBuffer
<
_Tp
,
fixed_size
>::
allocate
(
size_t
_size
)
{
if
(
_size
<=
sz
)
{
sz
=
_size
;
return
;
}
deallocate
();
if
(
_size
>
fixed_size
)
{
ptr
=
new
_Tp
[
_size
];
sz
=
_size
;
}
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
void
AutoBuffer
<
_Tp
,
fixed_size
>::
deallocate
()
{
if
(
ptr
!=
buf
)
{
delete
[]
ptr
;
ptr
=
buf
;
sz
=
fixed_size
;
}
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
void
AutoBuffer
<
_Tp
,
fixed_size
>::
resize
(
size_t
_size
)
{
if
(
_size
<=
sz
)
{
sz
=
_size
;
return
;
}
size_t
i
,
prevsize
=
sz
,
minsize
=
MIN
(
prevsize
,
_size
);
_Tp
*
prevptr
=
ptr
;
ptr
=
_size
>
fixed_size
?
new
_Tp
[
_size
]
:
buf
;
sz
=
_size
;
if
(
ptr
!=
prevptr
)
for
(
i
=
0
;
i
<
minsize
;
i
++
)
ptr
[
i
]
=
prevptr
[
i
];
for
(
i
=
prevsize
;
i
<
_size
;
i
++
)
ptr
[
i
]
=
_Tp
();
if
(
prevptr
!=
buf
)
delete
[]
prevptr
;
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
size_t
AutoBuffer
<
_Tp
,
fixed_size
>::
size
()
const
{
return
sz
;
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
AutoBuffer
<
_Tp
,
fixed_size
>::
operator
_Tp
*
()
{
return
ptr
;
}
template
<
typename
_Tp
,
size_t
fixed_size
>
inline
AutoBuffer
<
_Tp
,
fixed_size
>::
operator
const
_Tp
*
()
const
{
return
ptr
;
}
// TODO: move them to core_c.h
//! converts array (CvMat or IplImage) to cv::Mat
CV_EXPORTS
Mat
cvarrToMat
(
const
CvArr
*
arr
,
bool
copyData
=
false
,
bool
allowND
=
true
,
int
coiMode
=
0
,
AutoBuffer
<
double
>*
buf
=
0
);
static
inline
Mat
cvarrToMatND
(
const
CvArr
*
arr
,
bool
copyData
=
false
,
int
coiMode
=
0
)
{
return
cvarrToMat
(
arr
,
copyData
,
true
,
coiMode
);
}
}
//namespace cv
#endif //__OPENCV_CORE_UTILITY_H__
modules/core/src/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -48,6 +48,7 @@
#endif
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/core_c.h"
#include "opencv2/core/internal.hpp"
...
...
modules/core/test/test_precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -9,8 +9,8 @@
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
#include <iostream>
#include "opencv2/ts.hpp"
#include "opencv2/core/core_c.h"
#include <iostream>
#endif
modules/features2d/src/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -50,6 +50,8 @@
#include "opencv2/features2d.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/internal.hpp"
#include <algorithm>
...
...
modules/flann/src/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -9,6 +9,7 @@
# include "cvconfig.h"
#endif
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/internal.hpp"
#include "opencv2/flann/miniflann.hpp"
...
...
modules/flann/test/test_precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -10,7 +10,6 @@
#define __OPENCV_TEST_PRECOMP_HPP__
#include "opencv2/ts.hpp"
#include "opencv2/core.hpp"
#include "opencv2/flann.hpp"
#include <iostream>
...
...
modules/highgui/src/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -47,6 +47,8 @@
#include "opencv2/highgui.hpp"
#include "opencv2/highgui/highgui_c.h"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/internal.hpp"
#include <stdlib.h>
...
...
modules/highgui/test/test_precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -13,10 +13,10 @@
# include "cvconfig.h"
#endif
#include <iostream>
#include "opencv2/ts.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include <iostream>
#if defined(HAVE_VIDEOINPUT) || \
defined(HAVE_TYZX) || \
...
...
modules/imgproc/src/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -49,6 +49,8 @@
#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/internal.hpp"
#include <math.h>
#include <assert.h>
...
...
modules/imgproc/test/test_precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -9,11 +9,11 @@
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
#include <iostream>
#include "opencv2/ts.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/highgui.hpp"
#include "opencv2/highgui/highgui_c.h"
#include <iostream>
#endif
modules/java/generator/config/core.filelist
浏览文件 @
89356ff1
include/opencv2/core.hpp
include/opencv2/core/utility.hpp
../java/generator/src/cpp/core_manual.hpp
modules/java/generator/src/cpp/common.h
浏览文件 @
89356ff1
...
...
@@ -20,6 +20,8 @@
# define LOGD(...)
#endif
#include "opencv2/core/utility.hpp"
#include "converters.h"
#include "core_manual.hpp"
...
...
modules/java/generator/src/cpp/core_manual.cpp
浏览文件 @
89356ff1
#define LOG_TAG "org.opencv.core.Core"
#include "common.h"
#include "opencv2/core/utility.hpp"
static
int
quietCallback
(
int
,
const
char
*
,
const
char
*
,
const
char
*
,
int
,
void
*
)
{
return
0
;
...
...
modules/legacy/src/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -47,15 +47,14 @@
#include "opencv2/legacy.hpp"
#include "opencv2/core/internal.hpp"
#include "opencv2/video.hpp"
#include "opencv2/legacy/blobtrack.hpp"
#include "opencv2/legacy/compat.hpp"
#include "_matrix.h"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/internal.hpp"
typedef
unsigned
short
ushort
;
#include "_matrix.h"
CV_INLINE
bool
operator
==
(
CvSize
size1
,
CvSize
size2
);
CV_INLINE
bool
operator
==
(
CvSize
size1
,
CvSize
size2
)
...
...
modules/legacy/test/test_precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -9,12 +9,12 @@
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
#include <iostream>
#include "opencv2/ts.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/highgui.hpp"
#include "opencv2/highgui/highgui_c.h"
#include "opencv2/legacy.hpp"
#include <iostream>
#endif
modules/ml/src/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -47,6 +47,7 @@
#include "opencv2/ml.hpp"
#include "opencv2/core/core_c.h"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/internal.hpp"
#include <assert.h>
...
...
modules/ml/test/test_precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -9,11 +9,11 @@
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
#include <iostream>
#include <map>
#include "opencv2/ts.hpp"
#include "opencv2/ml.hpp"
#include "opencv2/core/core_c.h"
#include <iostream>
#include <map>
#define CV_NBAYES "nbayes"
#define CV_KNEAREST "knearest"
...
...
modules/nonfree/src/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -49,6 +49,8 @@
#include "opencv2/nonfree.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/internal.hpp"
#endif
modules/nonfree/test/test_precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -9,10 +9,10 @@
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
#include <iostream>
#include "opencv2/ts.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/nonfree.hpp"
#include <iostream>
#endif
modules/objdetect/src/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -51,6 +51,8 @@
#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/core_c.h"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/internal.hpp"
#include "opencv2/opencv_modules.hpp"
...
...
modules/ocl/perf/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -62,14 +62,12 @@
#include <string>
#include <cstdarg>
#include "cvconfig.h"
#include "opencv2/core.hpp"
#include "opencv2/highgui.hpp"
//#include "opencv2/calib3d.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/video.hpp"
#include "opencv2/ts.hpp"
#include "opencv2/ts/ts_perf.hpp"
#include "opencv2/ocl.hpp"
//#include "opencv2/calib3d.hpp"
//#include "opencv2/nonfree.hpp"
#include "utility.hpp"
...
...
modules/ocl/src/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -69,6 +69,7 @@
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/core_c.h"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/internal.hpp"
//#include "opencv2/highgui.hpp"
...
...
modules/ocl/test/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -62,14 +62,12 @@
#include <string>
#include <cstdarg>
#include "cvconfig.h"
#include "opencv2/
core
.hpp"
#include "opencv2/
ts
.hpp"
#include "opencv2/highgui.hpp"
//#include "opencv2/calib3d.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/video.hpp"
#include "opencv2/ts.hpp"
#include "opencv2/ts/ts_perf.hpp"
#include "opencv2/ocl.hpp"
//#include "opencv2/calib3d.hpp"
//#include "opencv2/nonfree.hpp"
#include "utility.hpp"
...
...
modules/photo/test/test_precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -9,9 +9,9 @@
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
#include <iostream>
#include "opencv2/ts.hpp"
#include "opencv2/photo.hpp"
#include "opencv2/highgui.hpp"
#include <iostream>
#endif
modules/python/CMakeLists.txt
浏览文件 @
89356ff1
...
...
@@ -24,6 +24,7 @@ ocv_module_include_directories(
set
(
opencv_hdrs
"
${
OPENCV_MODULE_opencv_core_LOCATION
}
/include/opencv2/core.hpp"
"
${
OPENCV_MODULE_opencv_core_LOCATION
}
/include/opencv2/core/utility.hpp"
"
${
OPENCV_MODULE_opencv_flann_LOCATION
}
/include/opencv2/flann/miniflann.hpp"
"
${
OPENCV_MODULE_opencv_imgproc_LOCATION
}
/include/opencv2/imgproc.hpp"
"
${
OPENCV_MODULE_opencv_video_LOCATION
}
/include/opencv2/video/background_segm.hpp"
...
...
modules/python/src2/cv2.cpp
浏览文件 @
89356ff1
...
...
@@ -9,6 +9,7 @@
#include "numpy/ndarrayobject.h"
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/contrib.hpp"
#include "opencv2/flann/miniflann.hpp"
#include "opencv2/imgproc.hpp"
...
...
modules/ts/include/opencv2/ts.hpp
浏览文件 @
89356ff1
...
...
@@ -36,6 +36,7 @@
#endif
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
namespace
cvtest
{
...
...
@@ -478,26 +479,10 @@ protected:
virtual
int
run_test_case
(
int
expected_code
,
const
string
&
descr
);
virtual
void
run_func
(
void
)
=
0
;
int
test_case_idx
;
int
progress
;
double
t
,
freq
;
template
<
class
F
>
int
run_test_case
(
int
expected_code
,
const
string
&
_descr
,
F
f
)
{
double
new_t
=
(
double
)
cv
::
getTickCount
(),
dt
;
if
(
test_case_idx
<
0
)
{
test_case_idx
=
0
;
progress
=
0
;
dt
=
0
;
}
else
{
dt
=
(
new_t
-
t
)
/
(
freq
*
1000
);
t
=
new_t
;
}
progress
=
update_progress
(
progress
,
test_case_idx
,
0
,
dt
);
int
errcount
=
0
;
bool
thrown
=
false
;
const
char
*
descr
=
_descr
.
c_str
()
?
_descr
.
c_str
()
:
""
;
...
...
modules/ts/src/precomp.hpp
浏览文件 @
89356ff1
#include "opencv2/core/core_c.h"
#include "opencv2/ts.hpp"
#include "opencv2/core/core_c.h"
#include "opencv2/core/utility.hpp"
#ifdef GTEST_LINKED_AS_SHARED_LIBRARY
#error ts module should not have GTEST_LINKED_AS_SHARED_LIBRARY defined
#endif
modules/ts/src/ts.cpp
浏览文件 @
89356ff1
...
...
@@ -321,9 +321,7 @@ int BaseTest::update_progress( int progress, int test_case_idx, int count, doubl
BadArgTest
::
BadArgTest
()
{
progress
=
-
1
;
test_case_idx
=
-
1
;
freq
=
cv
::
getTickFrequency
();
// oldErrorCbk = 0;
// oldErrorCbkData = 0;
}
...
...
@@ -334,20 +332,6 @@ BadArgTest::~BadArgTest(void)
int
BadArgTest
::
run_test_case
(
int
expected_code
,
const
string
&
_descr
)
{
double
new_t
=
(
double
)
cv
::
getTickCount
(),
dt
;
if
(
test_case_idx
<
0
)
{
test_case_idx
=
0
;
progress
=
0
;
dt
=
0
;
}
else
{
dt
=
(
new_t
-
t
)
/
(
freq
*
1000
);
t
=
new_t
;
}
progress
=
update_progress
(
progress
,
test_case_idx
,
0
,
dt
);
int
errcount
=
0
;
bool
thrown
=
false
;
const
char
*
descr
=
_descr
.
c_str
()
?
_descr
.
c_str
()
:
""
;
...
...
modules/video/perf/perf_precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -9,10 +9,10 @@
#ifndef __OPENCV_VIDEO_PRECOMP_HPP__
#define __OPENCV_VIDEO_PRECOMP_HPP__
#include "opencv2/ts.hpp"
#include <opencv2/imgproc.hpp>
#include <opencv2/video.hpp>
#include <opencv2/highgui.hpp>
#include "opencv2/ts.hpp"
#ifdef GTEST_CREATE_SHARED_LIBRARY
#error no modules except ts should have GTEST_CREATE_SHARED_LIBRARY defined
...
...
modules/video/src/precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -47,9 +47,10 @@
#include "cvconfig.h"
#endif
#include "opencv2/video/tracking.hpp"
#include "opencv2/video/background_segm.hpp"
#include "opencv2/video.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/core/utility.hpp"
#include "opencv2/core/internal.hpp"
#include <list>
...
...
modules/video/test/test_precomp.hpp
浏览文件 @
89356ff1
...
...
@@ -9,11 +9,11 @@
#ifndef __OPENCV_TEST_PRECOMP_HPP__
#define __OPENCV_TEST_PRECOMP_HPP__
#include <iostream>
#include "opencv2/ts.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/video.hpp"
#include "opencv2/highgui.hpp"
#include <iostream>
#endif
samples/c/bgfg_codebook.cpp
浏览文件 @
89356ff1
...
...
@@ -20,11 +20,12 @@
Or: http://oreilly.com/catalog/9780596516130/
ISBN-10: 0596516134 or: ISBN-13: 978-0596516130
************************************************** */
#include "opencv2/core/core.hpp"
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/video/background_segm.hpp"
#include "opencv2/imgproc/imgproc_c.h"
#include "opencv2/highgui
/highgui
.hpp"
#include "opencv2/legacy
/legacy
.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/legacy.hpp"
#include <stdio.h>
#include <stdlib.h>
...
...
samples/c/find_obj_ferns.cpp
浏览文件 @
89356ff1
#include "opencv2/
highgui/highgui
.hpp"
#include "opencv2/
core/core
.hpp"
#include "opencv2/imgproc
/imgproc
.hpp"
#include "opencv2/features2d
/features2d
.hpp"
#include "opencv2/objdetect
/objdetect
.hpp"
#include "opencv2/legacy
/legacy
.hpp"
#include "opencv2/
core/utility
.hpp"
#include "opencv2/
highgui
.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/objdetect.hpp"
#include "opencv2/legacy.hpp"
#include <algorithm>
#include <iostream>
...
...
samples/c/mser_sample.cpp
浏览文件 @
89356ff1
...
...
@@ -2,9 +2,10 @@
* Copyright (C) 2009, Liu Liu All rights reserved.
*/
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/highgui.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/imgproc.hpp"
#include <iostream>
#include <stdio.h>
...
...
samples/cpp/bgfg_gmg.cpp
浏览文件 @
89356ff1
...
...
@@ -6,6 +6,7 @@
*/
#include <opencv2/opencv.hpp>
#include <opencv2/core/utility.hpp>
#include <iostream>
using
namespace
cv
;
...
...
samples/cpp/bgfg_segm.cpp
浏览文件 @
89356ff1
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/core.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/imgproc.hpp"
#include "opencv2/video/background_segm.hpp"
#include "opencv2/highgui
/highgui
.hpp"
#include "opencv2/highgui.hpp"
#include <stdio.h>
using
namespace
std
;
...
...
samples/cpp/brief_match_test.cpp
浏览文件 @
89356ff1
...
...
@@ -4,11 +4,12 @@
* Created on: Oct 17, 2010
* Author: ethan
*/
#include "opencv2/core/core.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/calib3d.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <vector>
#include <iostream>
...
...
samples/cpp/build3dmodel.cpp
浏览文件 @
89356ff1
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/imgproc.hpp"
#include "opencv2/calib3d.hpp"
#include "opencv2/features2d.hpp"
#include "opencv2/highgui.hpp"
#include <map>
...
...
samples/cpp/calibration.cpp
浏览文件 @
89356ff1
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/imgproc.hpp"
#include "opencv2/calib3d.hpp"
#include "opencv2/highgui.hpp"
#include <cctype>
#include <stdio.h>
...
...
samples/cpp/camshiftdemo.cpp
浏览文件 @
89356ff1
#include <opencv2/core/utility.hpp>
#include "opencv2/video/tracking.hpp"
#include "opencv2/imgproc
/imgproc
.hpp"
#include "opencv2/highgui
/highgui
.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <iostream>
#include <ctype.h>
...
...
samples/cpp/chamfer.cpp
浏览文件 @
89356ff1
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/contrib/contrib.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/contrib.hpp"
#include <iostream>
...
...
samples/cpp/connected_components.cpp
浏览文件 @
89356ff1
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <iostream>
using
namespace
cv
;
...
...
samples/cpp/demhist.cpp
浏览文件 @
89356ff1
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <iostream>
...
...
samples/cpp/detection_based_tracker_sample.cpp
浏览文件 @
89356ff1
#if defined(__linux__) || defined(LINUX) || defined(__APPLE__) || defined(ANDROID)
#include <opencv2/core/core.hpp>
#include <opencv2/core.hpp>
#include <opencv2/core/utility.hpp>
#include <opencv2/core/internal.hpp>
#include <opencv2/imgproc
/imgproc
.hpp>
#include <opencv2/highgui
/highgui
.hpp>
#include <opencv2/objdetect
/objdetect
.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/objdetect.hpp>
#include "opencv2/contrib/detection_based_tracker.hpp"
#include <vector>
...
...
samples/cpp/detector_descriptor_matcher_evaluation.cpp
浏览文件 @
89356ff1
...
...
@@ -39,9 +39,10 @@
//
//M*/
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/features2d/features2d.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/features2d.hpp"
#include <stdlib.h>
#include <stdio.h>
...
...
samples/cpp/dft.cpp
浏览文件 @
89356ff1
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <stdio.h>
...
...
samples/cpp/distrans.cpp
浏览文件 @
89356ff1
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <stdio.h>
...
...
samples/cpp/edge.cpp
浏览文件 @
89356ff1
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <stdio.h>
...
...
samples/cpp/facerec_demo.cpp
浏览文件 @
89356ff1
...
...
@@ -16,9 +16,10 @@
* See <http://www.opensource.org/licenses/bsd-license>
*/
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/contrib/contrib.hpp"
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/contrib.hpp"
#include <iostream>
#include <fstream>
...
...
samples/cpp/freak_demo.cpp
浏览文件 @
89356ff1
...
...
@@ -38,11 +38,12 @@
#include <string>
#include <vector>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/features2d/features2d.hpp>
#include <opencv2/nonfree/features2d.hpp>
#include <opencv2/legacy/legacy.hpp>
#include <opencv2/core.hpp>
#include "opencv2/core/utility.hpp"
#include <opencv2/highgui.hpp>
#include <opencv2/features2d.hpp>
#include <opencv2/nonfree.hpp>
#include <opencv2/legacy.hpp>
using
namespace
cv
;
...
...
samples/cpp/image_alignment.cpp
浏览文件 @
89356ff1
...
...
@@ -13,10 +13,10 @@
* Authors: G. Evangelidis, INRIA, Grenoble, France
* M. Asbach, Fraunhofer IAIS, St. Augustin, Germany
*/
#include <opencv2/highgui
/highgui
.hpp>
#include <opencv2/video
/video
.hpp>
#include <opencv2/imgproc
/imgproc
.hpp>
#include <opencv2/core/
core
.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/video.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/core/
utility
.hpp>
#include <stdio.h>
#include <string>
...
...
samples/cpp/linemod.cpp
浏览文件 @
89356ff1
#include <opencv2/core/core.hpp>
#include <opencv2/core.hpp>
#include <opencv2/core/utility.hpp>
#include <opencv2/imgproc/imgproc_c.h> // cvFindContours
#include <opencv2/imgproc
/imgproc
.hpp>
#include <opencv2/objdetect
/objdetect
.hpp>
#include <opencv2/highgui
/highgui
.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/objdetect.hpp>
#include <opencv2/highgui.hpp>
#include <iterator>
#include <set>
#include <cstdio>
...
...
samples/cpp/opencv_version.cpp
浏览文件 @
89356ff1
#include
"opencv2/core/core.hpp"
#include
<opencv2/core/utility.hpp>
#include <iostream>
const
char
*
keys
=
...
...
samples/cpp/peopledetect.cpp
浏览文件 @
89356ff1
#include <opencv2/core/utility.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/objdetect.hpp>
#include <opencv2/highgui.hpp>
...
...
samples/cpp/select3dobj.cpp
浏览文件 @
89356ff1
...
...
@@ -8,10 +8,11 @@
*
*/
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/calib3d/calib3d.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/imgproc.hpp"
#include "opencv2/calib3d.hpp"
#include "opencv2/highgui.hpp"
#include <ctype.h>
#include <stdio.h>
...
...
samples/cpp/simpleflow_demo.cpp
浏览文件 @
89356ff1
#include <opencv2/core/utility.hpp>
#include "opencv2/video/tracking.hpp"
#include "opencv2/imgproc
/imgproc
.hpp"
#include "opencv2/highgui
/highgui
.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <cstdio>
#include <iostream>
...
...
samples/cpp/stereo_match.cpp
浏览文件 @
89356ff1
...
...
@@ -11,6 +11,7 @@
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/contrib/contrib.hpp"
#include "opencv2/core/utility.hpp"
#include <stdio.h>
...
...
samples/cpp/stitching_detailed.cpp
浏览文件 @
89356ff1
...
...
@@ -45,7 +45,8 @@
#include <fstream>
#include <string>
#include "opencv2/opencv_modules.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/highgui.hpp"
#include "opencv2/stitching/detail/autocalib.hpp"
#include "opencv2/stitching/detail/blenders.hpp"
#include "opencv2/stitching/detail/camera.hpp"
...
...
samples/cpp/tutorial_code/calib3d/camera_calibration/camera_calibration.cpp
浏览文件 @
89356ff1
...
...
@@ -3,10 +3,11 @@
#include <time.h>
#include <stdio.h>
#include <opencv2/core/core.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/calib3d/calib3d.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/core.hpp>
#include <opencv2/core/utility.hpp>
#include <opencv2/imgproc.hpp>
#include <opencv2/calib3d.hpp>
#include <opencv2/highgui.hpp>
using
namespace
cv
;
using
namespace
std
;
...
...
samples/cpp/tutorial_code/core/how_to_scan_images/how_to_scan_images.cpp
浏览文件 @
89356ff1
#
include
<
opencv2
/
core
/
core
.
hpp
>
#include <opencv2/highgui/highgui.hpp>
#
include
<
opencv2
/
core
.
hpp
>
#include <opencv2/core/utility.hpp>
#include <opencv2/highgui.hpp>
#include <iostream>
#include <sstream>
...
...
samples/cpp/tutorial_code/core/mat_mask_operations/mat_mask_operations.cpp
浏览文件 @
89356ff1
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
#include <opencv2/core.hpp>
#include <opencv2/core/utility.hpp>
#include <opencv2/highgui.hpp>
#include <opencv2/imgproc.hpp>
#include <iostream>
using
namespace
std
;
...
...
samples/cpp/tutorial_code/gpu/gpu-basics-similarity/gpu-basics-similarity.cpp
浏览文件 @
89356ff1
#include <iostream> // Console I/O
#include <sstream> // String to number conversion
#include <opencv2/core/core.hpp> // Basic OpenCV structures
#include <opencv2/imgproc/imgproc.hpp>// Image processing methods for the CPU
#include <opencv2/highgui/highgui.hpp>// Read images
#include <opencv2/gpu/gpu.hpp> // GPU structures and methods
#include <opencv2/core.hpp> // Basic OpenCV structures
#include <opencv2/core/utility.hpp>
#include <opencv2/imgproc.hpp>// Image processing methods for the CPU
#include <opencv2/highgui.hpp>// Read images
#include <opencv2/gpu.hpp> // GPU structures and methods
using
namespace
std
;
using
namespace
cv
;
...
...
samples/cpp/tvl1_optical_flow.cpp
浏览文件 @
89356ff1
#include <iostream>
#include <fstream>
#include "opencv2/video/tracking.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/video.hpp"
#include "opencv2/highgui.hpp"
using
namespace
cv
;
using
namespace
std
;
...
...
samples/cpp/videostab.cpp
浏览文件 @
89356ff1
...
...
@@ -4,6 +4,7 @@
#include <sstream>
#include <stdexcept>
#include "opencv2/core.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/video.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
...
...
samples/cpp/watershed.cpp
浏览文件 @
89356ff1
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include <cstdio>
#include <iostream>
...
...
samples/gpu/bgfg_segm.cpp
浏览文件 @
89356ff1
#include <iostream>
#include <string>
#include "opencv2/core/core.hpp"
#include "opencv2/gpu/gpu.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/gpu.hpp"
#include "opencv2/highgui.hpp"
using
namespace
std
;
using
namespace
cv
;
...
...
samples/gpu/brox_optical_flow.cpp
浏览文件 @
89356ff1
...
...
@@ -3,10 +3,10 @@
#include <string>
#include <cctype>
#include "
cvconfig.h
"
#include "opencv2/core/
core
.hpp"
#include "opencv2/highgui
/highgui
.hpp"
#include "opencv2/gpu
/gpu
.hpp"
#include "
opencv2/core.hpp
"
#include "opencv2/core/
utility
.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/gpu.hpp"
using
namespace
std
;
using
namespace
cv
;
...
...
samples/gpu/farneback_optical_flow.cpp
浏览文件 @
89356ff1
...
...
@@ -2,10 +2,11 @@
#include <vector>
#include <sstream>
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/video/video.hpp"
#include "opencv2/gpu/gpu.hpp"
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/video.hpp"
#include "opencv2/gpu.hpp"
using
namespace
std
;
using
namespace
cv
;
...
...
samples/gpu/generalized_hough.cpp
浏览文件 @
89356ff1
...
...
@@ -2,11 +2,12 @@
#include <iostream>
#include <string>
#include "opencv2/core/core.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/gpu/gpu.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/contrib/contrib.hpp"
#include "opencv2/core.hpp"
#include "opencv2/core/utility.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/gpu.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/contrib.hpp"
using
namespace
std
;
using
namespace
cv
;
...
...
samples/gpu/hog.cpp
浏览文件 @
89356ff1
...
...
@@ -4,8 +4,9 @@
#include <sstream>
#include <iomanip>
#include <stdexcept>
#include "opencv2/gpu/gpu.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/gpu.hpp"
#include "opencv2/highgui.hpp"
using
namespace
std
;
using
namespace
cv
;
...
...
samples/gpu/houghlines.cpp
浏览文件 @
89356ff1
#include <cmath>
#include <iostream>
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/imgproc/imgproc.hpp"
#include "opencv2/gpu/gpu.hpp"
#include "opencv2/core.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/highgui.hpp"
#include "opencv2/imgproc.hpp"
#include "opencv2/gpu.hpp"
using
namespace
std
;
using
namespace
cv
;
...
...
samples/gpu/optical_flow.cpp
浏览文件 @
89356ff1
#include <iostream>
#include <fstream>
#include "opencv2/core/core.hpp"
#include "opencv2/highgui/highgui.hpp"
#include "opencv2/gpu/gpu.hpp"
#include "opencv2/core.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/highgui.hpp"
#include "opencv2/gpu.hpp"
using
namespace
std
;
using
namespace
cv
;
...
...
samples/gpu/performance/performance.h
浏览文件 @
89356ff1
...
...
@@ -6,8 +6,8 @@
#include <vector>
#include <numeric>
#include <string>
#include
"opencv2/core/core.hpp"
#include "opencv2/gpu
/gpu
.hpp"
#include
<opencv2/core/utility.hpp>
#include "opencv2/gpu.hpp"
#define TAB " "
...
...
samples/gpu/pyrlk_optical_flow.cpp
浏览文件 @
89356ff1
#include <iostream>
#include <vector>
#include "
cvconfig.h
"
#include
"opencv2/core/core.hpp"
#include "opencv2/imgproc
/imgproc
.hpp"
#include "opencv2/highgui
/highgui
.hpp"
#include "opencv2/video
/video
.hpp"
#include "opencv2/gpu
/gpu
.hpp"
#include "
opencv2/core.hpp
"
#include
<opencv2/core/utility.hpp>
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/video.hpp"
#include "opencv2/gpu.hpp"
using
namespace
std
;
using
namespace
cv
;
...
...
samples/gpu/softcascade.cpp
浏览文件 @
89356ff1
#include <opencv2/core/utility.hpp>
#include <opencv2/gpu.hpp>
#include <opencv2/softcascade.hpp>
#include <opencv2/highgui.hpp>
...
...
samples/gpu/stereo_match.cpp
浏览文件 @
89356ff1
...
...
@@ -3,8 +3,9 @@
#include <sstream>
#include <iomanip>
#include <stdexcept>
#include "opencv2/gpu/gpu.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/gpu.hpp"
#include "opencv2/highgui.hpp"
using
namespace
cv
;
using
namespace
std
;
...
...
samples/ocl/hog.cpp
浏览文件 @
89356ff1
...
...
@@ -4,8 +4,9 @@
#include <sstream>
#include <iomanip>
#include <stdexcept>
#include "opencv2/ocl/ocl.hpp"
#include "opencv2/highgui/highgui.hpp"
#include <opencv2/core/utility.hpp>
#include "opencv2/ocl.hpp"
#include "opencv2/highgui.hpp"
using
namespace
std
;
using
namespace
cv
;
...
...
samples/ocl/performance.cpp
浏览文件 @
89356ff1
...
...
@@ -5,17 +5,17 @@
#include <cstdio>
#include <vector>
#include <numeric>
#include
"opencv2/core/core.hpp"
#include "opencv2/imgproc
/imgproc
.hpp"
#include "opencv2/highgui
/highgui
.hpp"
#include "opencv2/calib3d
/calib3d
.hpp"
#include "opencv2/video
/video
.hpp"
#include "opencv2/nonfree
/nonfree
.hpp"
#include "opencv2/objdetect
/objdetect
.hpp"
#include "opencv2/features2d
/features2d
.hpp"
#include
<opencv2/core/utility.hpp>
#include "opencv2/imgproc.hpp"
#include "opencv2/highgui.hpp"
#include "opencv2/calib3d.hpp"
#include "opencv2/video.hpp"
#include "opencv2/nonfree.hpp"
#include "opencv2/objdetect.hpp"
#include "opencv2/features2d.hpp"
#define USE_OPENCL
#ifdef USE_OPENCL
#include "opencv2/ocl
/ocl
.hpp"
#include "opencv2/ocl.hpp"
#endif
#define TAB " "
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录