Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
b2d359b6
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,发现更多精彩内容 >>
提交
b2d359b6
编写于
7月 24, 2013
作者:
R
Roman Donchenko
提交者:
OpenCV Buildbot
7月 24, 2013
浏览文件
操作
浏览文件
下载
差异文件
Merge pull request #1170 from SpecLad:merge-2.4
上级
ef91d7e8
3939d783
变更
32
展开全部
隐藏空白更改
内联
并排
Showing
32 changed file
with
358 addition
and
215 deletion
+358
-215
3rdparty/tbb/CMakeLists.txt
3rdparty/tbb/CMakeLists.txt
+7
-1
cmake/OpenCVDetectCUDA.cmake
cmake/OpenCVDetectCUDA.cmake
+11
-3
doc/tutorials/introduction/windows_visual_studio_Opencv/images/PropertySheetOpenCVInclude.jpg
...isual_studio_Opencv/images/PropertySheetOpenCVInclude.jpg
+0
-0
doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.rst
...ows_visual_studio_Opencv/windows_visual_studio_Opencv.rst
+2
-2
modules/contrib/src/ba.cpp
modules/contrib/src/ba.cpp
+1
-1
modules/contrib/src/featuretracker.cpp
modules/contrib/src/featuretracker.cpp
+3
-0
modules/core/include/opencv2/core/cvdef.h
modules/core/include/opencv2/core/cvdef.h
+1
-1
modules/features2d/src/bagofwords.cpp
modules/features2d/src/bagofwords.cpp
+6
-1
modules/highgui/src/cap_qtkit.mm
modules/highgui/src/cap_qtkit.mm
+5
-2
modules/imgproc/src/distransform.cpp
modules/imgproc/src/distransform.cpp
+10
-0
modules/imgproc/src/histogram.cpp
modules/imgproc/src/histogram.cpp
+12
-4
modules/imgproc/src/shapedescr.cpp
modules/imgproc/src/shapedescr.cpp
+1
-1
modules/imgproc/src/sumpixels.cpp
modules/imgproc/src/sumpixels.cpp
+50
-0
modules/java/generator/src/cpp/Mat.cpp
modules/java/generator/src/cpp/Mat.cpp
+183
-152
modules/java/generator/src/java/core+Mat.java
modules/java/generator/src/java/core+Mat.java
+16
-0
modules/java/generator/src/java/core+MatOfByte.java
modules/java/generator/src/java/core+MatOfByte.java
+2
-2
modules/java/generator/src/java/core+MatOfDMatch.java
modules/java/generator/src/java/core+MatOfDMatch.java
+2
-2
modules/java/generator/src/java/core+MatOfDouble.java
modules/java/generator/src/java/core+MatOfDouble.java
+2
-2
modules/java/generator/src/java/core+MatOfFloat.java
modules/java/generator/src/java/core+MatOfFloat.java
+2
-2
modules/java/generator/src/java/core+MatOfFloat4.java
modules/java/generator/src/java/core+MatOfFloat4.java
+2
-2
modules/java/generator/src/java/core+MatOfFloat6.java
modules/java/generator/src/java/core+MatOfFloat6.java
+2
-2
modules/java/generator/src/java/core+MatOfInt.java
modules/java/generator/src/java/core+MatOfInt.java
+2
-2
modules/java/generator/src/java/core+MatOfInt4.java
modules/java/generator/src/java/core+MatOfInt4.java
+2
-2
modules/java/generator/src/java/core+MatOfKeyPoint.java
modules/java/generator/src/java/core+MatOfKeyPoint.java
+2
-2
modules/java/generator/src/java/core+MatOfPoint.java
modules/java/generator/src/java/core+MatOfPoint.java
+2
-2
modules/java/generator/src/java/core+MatOfPoint2f.java
modules/java/generator/src/java/core+MatOfPoint2f.java
+2
-2
modules/java/generator/src/java/core+MatOfPoint3.java
modules/java/generator/src/java/core+MatOfPoint3.java
+2
-2
modules/java/generator/src/java/core+MatOfPoint3f.java
modules/java/generator/src/java/core+MatOfPoint3f.java
+2
-2
modules/java/generator/src/java/core+MatOfRect.java
modules/java/generator/src/java/core+MatOfRect.java
+2
-2
modules/python/src2/cv2.cpp
modules/python/src2/cv2.cpp
+21
-12
modules/ts/misc/xls-report.py
modules/ts/misc/xls-report.py
+1
-0
modules/ts/src/ts_perf.cpp
modules/ts/src/ts_perf.cpp
+0
-7
未找到文件。
3rdparty/tbb/CMakeLists.txt
浏览文件 @
b2d359b6
...
...
@@ -230,9 +230,15 @@ endif()
ocv_warnings_disable
(
CMAKE_CXX_FLAGS -Wundef -Wmissing-declarations
)
string
(
REPLACE
"-Werror=non-virtual-dtor"
""
CMAKE_CXX_FLAGS
"
${
CMAKE_CXX_FLAGS
}
"
)
if
(
WIN32
)
set
(
tbb_debug_postfix
"_debug"
)
# to fit pragmas in _windef.h inside TBB
else
()
set
(
tbb_debug_postfix
${
OPENCV_DEBUG_POSTFIX
}
)
endif
()
set_target_properties
(
tbb
PROPERTIES OUTPUT_NAME tbb
DEBUG_POSTFIX
"
${
OPENCV_DEBUG_POSTFIX
}
"
DEBUG_POSTFIX
"
${
tbb_debug_postfix
}
"
ARCHIVE_OUTPUT_DIRECTORY
${
3P_LIBRARY_OUTPUT_PATH
}
RUNTIME_OUTPUT_DIRECTORY
${
EXECUTABLE_OUTPUT_PATH
}
)
...
...
cmake/OpenCVDetectCUDA.cmake
浏览文件 @
b2d359b6
...
...
@@ -99,7 +99,11 @@ if(CUDA_FOUND)
if
(
CUDA_GENERATION STREQUAL
"Fermi"
)
set
(
__cuda_arch_bin
"2.0 2.1(2.0)"
)
elseif
(
CUDA_GENERATION STREQUAL
"Kepler"
)
set
(
__cuda_arch_bin
"3.0"
)
if
(
${
CUDA_VERSION
}
VERSION_LESS
"5.0"
)
set
(
__cuda_arch_bin
"3.0"
)
else
()
set
(
__cuda_arch_bin
"3.0 3.5"
)
endif
()
elseif
(
CUDA_GENERATION STREQUAL
"Auto"
)
execute_process
(
COMMAND
"
${
CUDA_NVCC_EXECUTABLE
}
"
"
${
OpenCV_SOURCE_DIR
}
/cmake/checks/OpenCVDetectCudaArch.cu"
"--run"
WORKING_DIRECTORY
"
${
CMAKE_BINARY_DIR
}${
CMAKE_FILES_DIRECTORY
}
/CMakeTmp/"
...
...
@@ -113,8 +117,12 @@ if(CUDA_FOUND)
endif
()
if
(
NOT DEFINED __cuda_arch_bin
)
set
(
__cuda_arch_bin
"1.1 1.2 1.3 2.0 2.1(2.0) 3.0"
)
set
(
__cuda_arch_ptx
"2.0 3.0"
)
if
(
${
CUDA_VERSION
}
VERSION_LESS
"5.0"
)
set
(
__cuda_arch_bin
"1.1 1.2 1.3 2.0 2.1(2.0) 3.0"
)
else
()
set
(
__cuda_arch_bin
"1.1 1.2 1.3 2.0 2.1(2.0) 3.0 3.5"
)
endif
()
set
(
__cuda_arch_ptx
"3.0"
)
endif
()
set
(
CUDA_ARCH_BIN
${
__cuda_arch_bin
}
CACHE STRING
"Specify 'real' GPU architectures to build binaries for, BIN(PTX) format is supported"
)
...
...
doc/tutorials/introduction/windows_visual_studio_Opencv/images/PropertySheetOpenCVInclude.jpg
浏览文件 @
b2d359b6
此差异由.gitattributes 抑制。
doc/tutorials/introduction/windows_visual_studio_Opencv/windows_visual_studio_Opencv.rst
浏览文件 @
b2d359b6
...
...
@@ -52,7 +52,7 @@ Use for example the *OpenCV_Debug* name. Then by selecting the sheet :menuselect
.. code-block:: bash
$(OPENCV_DIR)\include
$(OPENCV_DIR)\
..\..\
include
.. image:: images/PropertySheetOpenCVInclude.jpg
:alt: Add the include dir like this.
...
...
@@ -64,7 +64,7 @@ Next go to the :menuselection:`Linker --> General` and under the *"Additional Li
.. code-block:: bash
$(OPENCV_DIR)\lib
s
$(OPENCV_DIR)\lib
.. image:: images/PropertySheetOpenCVLib.jpg
:alt: Add the library folder like this.
...
...
modules/contrib/src/ba.cpp
浏览文件 @
b2d359b6
...
...
@@ -746,7 +746,7 @@ static void fjac(int /*i*/, int /*j*/, CvMat *point_params, CvMat* cam_params, C
CvMat
*
_mp
=
cvCreateMat
(
1
,
1
,
CV_64FC2
);
//projection of the point
//split camera params into different matrices
CvMat
_ri
,
_ti
,
_k
;
CvMat
_ri
,
_ti
,
_k
=
cvMat
(
0
,
0
,
CV_64F
,
NULL
);
// dummy initialization to fix warning of cl.exe
cvGetRows
(
cam_params
,
&
_ri
,
0
,
3
);
cvGetRows
(
cam_params
,
&
_ti
,
3
,
6
);
...
...
modules/contrib/src/featuretracker.cpp
浏览文件 @
b2d359b6
...
...
@@ -59,6 +59,7 @@ CvFeatureTracker::CvFeatureTracker(CvFeatureTrackerParams _params) :
dd
->
set
(
"nOctaveLayers"
,
5
);
dd
->
set
(
"contrastThreshold"
,
0.04
);
dd
->
set
(
"edgeThreshold"
,
10.7
);
break
;
case
CvFeatureTrackerParams
::
SURF
:
dd
=
Algorithm
::
create
<
Feature2D
>
(
"Feature2D.SURF"
);
if
(
dd
.
empty
()
)
...
...
@@ -66,8 +67,10 @@ CvFeatureTracker::CvFeatureTracker(CvFeatureTrackerParams _params) :
dd
->
set
(
"hessianThreshold"
,
400
);
dd
->
set
(
"nOctaves"
,
3
);
dd
->
set
(
"nOctaveLayers"
,
4
);
break
;
default:
CV_Error
(
CV_StsBadArg
,
"Unknown feature type"
);
break
;
}
matcher
=
new
BFMatcher
(
NORM_L2
);
...
...
modules/core/include/opencv2/core/cvdef.h
浏览文件 @
b2d359b6
...
...
@@ -84,7 +84,7 @@
#ifndef CV_INLINE
# if defined __cplusplus
# define CV_INLINE static inline
# elif
(defined WIN32 || defined _WIN32 || defined WINCE) && !defined __GNUC__
# elif
defined _MSC_VER
# define CV_INLINE __inline
# else
# define CV_INLINE static
...
...
modules/features2d/src/bagofwords.cpp
浏览文件 @
b2d359b6
...
...
@@ -147,7 +147,7 @@ void BOWImgDescriptorExtractor::compute( const Mat& image, std::vector<KeyPoint>
int
clusterCount
=
descriptorSize
();
// = vocabulary.rows
// Compute descriptors for the image.
Mat
descriptors
=
_descriptors
?
*
_descriptors
:
Mat
()
;
Mat
descriptors
;
dextractor
->
compute
(
image
,
keypoints
,
descriptors
);
// Match keypoint descriptors to cluster center (to vocabulary)
...
...
@@ -176,6 +176,11 @@ void BOWImgDescriptorExtractor::compute( const Mat& image, std::vector<KeyPoint>
// Normalize image descriptor.
imgDescriptor
/=
descriptors
.
rows
;
// Add the descriptors of image keypoints
if
(
_descriptors
)
{
*
_descriptors
=
descriptors
.
clone
();
}
}
int
BOWImgDescriptorExtractor
::
descriptorSize
()
const
...
...
modules/highgui/src/cap_qtkit.mm
浏览文件 @
b2d359b6
...
...
@@ -275,8 +275,11 @@ bool CvCaptureCAM::grabFrame(double timeOut) {
double
sleepTime
=
0.005
;
double
total
=
0
;
while
(
!
[
capture
updateImage
]
&&
(
total
+=
sleepTime
)
<=
timeOut
)
usleep
((
int
)(
sleepTime
*
1000
));
NSDate
*
loopUntil
=
[
NSDate
dateWithTimeIntervalSinceNow
:
sleepTime
];
while
(
!
[
capture
updateImage
]
&&
(
total
+=
sleepTime
)
<=
timeOut
&&
[[
NSRunLoop
currentRunLoop
]
runMode
:
NSDefaultRunLoopMode
beforeDate:
loopUntil
])
loopUntil
=
[
NSDate
dateWithTimeIntervalSinceNow
:
sleepTime
];
[
localpool
drain
];
...
...
modules/imgproc/src/distransform.cpp
浏览文件 @
b2d359b6
...
...
@@ -744,6 +744,16 @@ void cv::distanceTransform( InputArray _src, OutputArray _dst, OutputArray _labe
if
(
labelType
==
CV_DIST_LABEL_CCOMP
)
{
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
if
(
maskSize
==
CV_DIST_MASK_5
)
{
IppiSize
roi
=
{
src
->
cols
,
src
->
rows
};
if
(
ippiDistanceTransform_5x5_8u32f_C1R
(
src
->
data
.
ptr
,
src
->
step
,
dst
->
data
.
fl
,
dst
->
step
,
roi
,
_mask
)
>=
0
)
return
;
}
#endif
Mat
zpix
=
src
==
0
;
connectedComponents
(
zpix
,
labels
,
8
,
CV_32S
);
}
...
...
modules/imgproc/src/histogram.cpp
浏览文件 @
b2d359b6
...
...
@@ -266,6 +266,8 @@ public:
}
private:
calcHist1D_Invoker
operator
=
(
const
calcHist1D_Invoker
&
);
T
*
p_
[
one
];
uchar
*
mask_
;
int
step_
[
one
];
...
...
@@ -338,6 +340,8 @@ public:
}
private:
calcHist2D_Invoker
operator
=
(
const
calcHist2D_Invoker
&
);
T
*
p_
[
two
];
uchar
*
mask_
;
int
step_
[
two
];
...
...
@@ -428,6 +432,8 @@ public:
}
private:
calcHist3D_Invoker
operator
=
(
const
calcHist3D_Invoker
&
);
T
*
p_
[
three
];
uchar
*
mask_
;
int
step_
[
three
];
...
...
@@ -767,8 +773,7 @@ calcHist_( std::vector<uchar*>& _ptrs, const std::vector<int>& _deltas,
#ifdef HAVE_TBB
calcHist1D_Invoker
<
T
>
body
(
_ptrs
,
_deltas
,
hist
,
_uniranges
,
size
[
0
],
dims
,
imsize
);
parallel_for
(
BlockedRange
(
0
,
imsize
.
height
),
body
);
return
;
#endif
#else
double
a
=
uniranges
[
0
],
b
=
uniranges
[
1
];
int
sz
=
size
[
0
],
d0
=
deltas
[
0
],
step0
=
deltas
[
1
];
const
T
*
p0
=
(
const
T
*
)
ptrs
[
0
];
...
...
@@ -791,14 +796,15 @@ calcHist_( std::vector<uchar*>& _ptrs, const std::vector<int>& _deltas,
((
int
*
)
H
)[
idx
]
++
;
}
}
#endif //HAVE_TBB
return
;
}
else
if
(
dims
==
2
)
{
#ifdef HAVE_TBB
calcHist2D_Invoker
<
T
>
body
(
_ptrs
,
_deltas
,
hist
,
_uniranges
,
size
,
dims
,
imsize
,
hstep
);
parallel_for
(
BlockedRange
(
0
,
imsize
.
height
),
body
);
return
;
#endif
#else
double
a0
=
uniranges
[
0
],
b0
=
uniranges
[
1
],
a1
=
uniranges
[
2
],
b1
=
uniranges
[
3
];
int
sz0
=
size
[
0
],
sz1
=
size
[
1
];
int
d0
=
deltas
[
0
],
step0
=
deltas
[
1
],
...
...
@@ -827,6 +833,8 @@ calcHist_( std::vector<uchar*>& _ptrs, const std::vector<int>& _deltas,
((
int
*
)(
H
+
hstep0
*
idx0
))[
idx1
]
++
;
}
}
#endif //HAVE_TBB
return
;
}
else
if
(
dims
==
3
)
{
...
...
modules/imgproc/src/shapedescr.cpp
浏览文件 @
b2d359b6
...
...
@@ -381,7 +381,7 @@ cv::RotatedRect cv::fitEllipse( InputArray _points )
// New fitellipse algorithm, contributed by Dr. Daniel Weiss
Point2f
c
(
0
,
0
);
double
gfp
[
5
],
rp
[
5
],
t
;
const
double
min_eps
=
1e-
6
;
const
double
min_eps
=
1e-
8
;
bool
is_float
=
depth
==
CV_32F
;
const
Point
*
ptsi
=
(
const
Point
*
)
points
.
data
;
const
Point2f
*
ptsf
=
(
const
Point2f
*
)
points
.
data
;
...
...
modules/imgproc/src/sumpixels.cpp
浏览文件 @
b2d359b6
...
...
@@ -41,6 +41,9 @@
//M*/
#include "precomp.hpp"
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
static
IppStatus
sts
=
ippInit
();
#endif
namespace
cv
{
...
...
@@ -234,6 +237,53 @@ void cv::integral( InputArray _src, OutputArray _sum, OutputArray _sqsum, Output
if
(
sdepth
<=
0
)
sdepth
=
depth
==
CV_8U
?
CV_32S
:
CV_64F
;
sdepth
=
CV_MAT_DEPTH
(
sdepth
);
#if defined (HAVE_IPP) && (IPP_VERSION_MAJOR >= 7)
if
(
(
depth
==
CV_8U
)
&&
(
!
_tilted
.
needed
()
)
)
{
if
(
sdepth
==
CV_32F
)
{
if
(
cn
==
1
)
{
IppiSize
srcRoiSize
=
ippiSize
(
src
.
cols
,
src
.
rows
);
_sum
.
create
(
isize
,
CV_MAKETYPE
(
sdepth
,
cn
)
);
sum
=
_sum
.
getMat
();
if
(
_sqsum
.
needed
()
)
{
_sqsum
.
create
(
isize
,
CV_MAKETYPE
(
CV_64F
,
cn
)
);
sqsum
=
_sqsum
.
getMat
();
ippiSqrIntegral_8u32f64f_C1R
(
(
const
Ipp8u
*
)
src
.
data
,
src
.
step
,
(
Ipp32f
*
)
sum
.
data
,
sum
.
step
,
(
Ipp64f
*
)
sqsum
.
data
,
sqsum
.
step
,
srcRoiSize
,
0
,
0
);
}
else
{
ippiIntegral_8u32f_C1R
(
(
const
Ipp8u
*
)
src
.
data
,
src
.
step
,
(
Ipp32f
*
)
sum
.
data
,
sum
.
step
,
srcRoiSize
,
0
);
}
return
;
}
}
if
(
sdepth
==
CV_32S
)
{
if
(
cn
==
1
)
{
IppiSize
srcRoiSize
=
ippiSize
(
src
.
cols
,
src
.
rows
);
_sum
.
create
(
isize
,
CV_MAKETYPE
(
sdepth
,
cn
)
);
sum
=
_sum
.
getMat
();
if
(
_sqsum
.
needed
()
)
{
_sqsum
.
create
(
isize
,
CV_MAKETYPE
(
CV_64F
,
cn
)
);
sqsum
=
_sqsum
.
getMat
();
ippiSqrIntegral_8u32s64f_C1R
(
(
const
Ipp8u
*
)
src
.
data
,
src
.
step
,
(
Ipp32s
*
)
sum
.
data
,
sum
.
step
,
(
Ipp64f
*
)
sqsum
.
data
,
sqsum
.
step
,
srcRoiSize
,
0
,
0
);
}
else
{
ippiIntegral_8u32s_C1R
(
(
const
Ipp8u
*
)
src
.
data
,
src
.
step
,
(
Ipp32s
*
)
sum
.
data
,
sum
.
step
,
srcRoiSize
,
0
);
}
return
;
}
}
}
#endif
_sum
.
create
(
isize
,
CV_MAKETYPE
(
sdepth
,
cn
)
);
sum
=
_sum
.
getMat
();
...
...
modules/java/generator/src/cpp/Mat.cpp
浏览文件 @
b2d359b6
此差异已折叠。
点击以展开。
modules/java/generator/src/java/core+Mat.java
浏览文件 @
b2d359b6
...
...
@@ -245,6 +245,19 @@ public class Mat {
return
retVal
;
}
//
// C++: int Mat::dims()
//
// javadoc: Mat::dims()
public
int
dims
()
{
int
retVal
=
n_dims
(
nativeObj
);
return
retVal
;
}
//
// C++: int Mat::cols()
//
...
...
@@ -1130,6 +1143,9 @@ public class Mat {
// C++: Mat Mat::colRange(int startcol, int endcol)
private
static
native
long
n_colRange
(
long
nativeObj
,
int
startcol
,
int
endcol
);
// C++: int Mat::dims()
private
static
native
int
n_dims
(
long
nativeObj
);
// C++: int Mat::cols()
private
static
native
int
n_cols
(
long
nativeObj
);
...
...
modules/java/generator/src/java/core+MatOfByte.java
浏览文件 @
b2d359b6
...
...
@@ -15,7 +15,7 @@ public class MatOfByte extends Mat {
protected
MatOfByte
(
long
addr
)
{
super
(
addr
);
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
@@ -26,7 +26,7 @@ public class MatOfByte extends Mat {
public
MatOfByte
(
Mat
m
)
{
super
(
m
,
Range
.
all
());
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
modules/java/generator/src/java/core+MatOfDMatch.java
浏览文件 @
b2d359b6
...
...
@@ -17,7 +17,7 @@ public class MatOfDMatch extends Mat {
protected
MatOfDMatch
(
long
addr
)
{
super
(
addr
);
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat: "
+
toString
());
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat: "
+
toString
());
//FIXME: do we need release() here?
}
...
...
@@ -28,7 +28,7 @@ public class MatOfDMatch extends Mat {
public
MatOfDMatch
(
Mat
m
)
{
super
(
m
,
Range
.
all
());
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat: "
+
toString
());
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat: "
+
toString
());
//FIXME: do we need release() here?
}
...
...
modules/java/generator/src/java/core+MatOfDouble.java
浏览文件 @
b2d359b6
...
...
@@ -15,7 +15,7 @@ public class MatOfDouble extends Mat {
protected
MatOfDouble
(
long
addr
)
{
super
(
addr
);
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
@@ -26,7 +26,7 @@ public class MatOfDouble extends Mat {
public
MatOfDouble
(
Mat
m
)
{
super
(
m
,
Range
.
all
());
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
modules/java/generator/src/java/core+MatOfFloat.java
浏览文件 @
b2d359b6
...
...
@@ -15,7 +15,7 @@ public class MatOfFloat extends Mat {
protected
MatOfFloat
(
long
addr
)
{
super
(
addr
);
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
@@ -26,7 +26,7 @@ public class MatOfFloat extends Mat {
public
MatOfFloat
(
Mat
m
)
{
super
(
m
,
Range
.
all
());
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
modules/java/generator/src/java/core+MatOfFloat4.java
浏览文件 @
b2d359b6
...
...
@@ -15,7 +15,7 @@ public class MatOfFloat4 extends Mat {
protected
MatOfFloat4
(
long
addr
)
{
super
(
addr
);
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
@@ -26,7 +26,7 @@ public class MatOfFloat4 extends Mat {
public
MatOfFloat4
(
Mat
m
)
{
super
(
m
,
Range
.
all
());
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
modules/java/generator/src/java/core+MatOfFloat6.java
浏览文件 @
b2d359b6
...
...
@@ -15,7 +15,7 @@ public class MatOfFloat6 extends Mat {
protected
MatOfFloat6
(
long
addr
)
{
super
(
addr
);
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
@@ -26,7 +26,7 @@ public class MatOfFloat6 extends Mat {
public
MatOfFloat6
(
Mat
m
)
{
super
(
m
,
Range
.
all
());
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
modules/java/generator/src/java/core+MatOfInt.java
浏览文件 @
b2d359b6
...
...
@@ -16,7 +16,7 @@ public class MatOfInt extends Mat {
protected
MatOfInt
(
long
addr
)
{
super
(
addr
);
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
@@ -27,7 +27,7 @@ public class MatOfInt extends Mat {
public
MatOfInt
(
Mat
m
)
{
super
(
m
,
Range
.
all
());
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
modules/java/generator/src/java/core+MatOfInt4.java
浏览文件 @
b2d359b6
...
...
@@ -16,7 +16,7 @@ public class MatOfInt4 extends Mat {
protected
MatOfInt4
(
long
addr
)
{
super
(
addr
);
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
@@ -27,7 +27,7 @@ public class MatOfInt4 extends Mat {
public
MatOfInt4
(
Mat
m
)
{
super
(
m
,
Range
.
all
());
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
modules/java/generator/src/java/core+MatOfKeyPoint.java
浏览文件 @
b2d359b6
...
...
@@ -17,7 +17,7 @@ public class MatOfKeyPoint extends Mat {
protected
MatOfKeyPoint
(
long
addr
)
{
super
(
addr
);
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
@@ -28,7 +28,7 @@ public class MatOfKeyPoint extends Mat {
public
MatOfKeyPoint
(
Mat
m
)
{
super
(
m
,
Range
.
all
());
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
modules/java/generator/src/java/core+MatOfPoint.java
浏览文件 @
b2d359b6
...
...
@@ -15,7 +15,7 @@ public class MatOfPoint extends Mat {
protected
MatOfPoint
(
long
addr
)
{
super
(
addr
);
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
@@ -26,7 +26,7 @@ public class MatOfPoint extends Mat {
public
MatOfPoint
(
Mat
m
)
{
super
(
m
,
Range
.
all
());
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
modules/java/generator/src/java/core+MatOfPoint2f.java
浏览文件 @
b2d359b6
...
...
@@ -15,7 +15,7 @@ public class MatOfPoint2f extends Mat {
protected
MatOfPoint2f
(
long
addr
)
{
super
(
addr
);
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
@@ -26,7 +26,7 @@ public class MatOfPoint2f extends Mat {
public
MatOfPoint2f
(
Mat
m
)
{
super
(
m
,
Range
.
all
());
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
modules/java/generator/src/java/core+MatOfPoint3.java
浏览文件 @
b2d359b6
...
...
@@ -15,7 +15,7 @@ public class MatOfPoint3 extends Mat {
protected
MatOfPoint3
(
long
addr
)
{
super
(
addr
);
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
@@ -26,7 +26,7 @@ public class MatOfPoint3 extends Mat {
public
MatOfPoint3
(
Mat
m
)
{
super
(
m
,
Range
.
all
());
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
modules/java/generator/src/java/core+MatOfPoint3f.java
浏览文件 @
b2d359b6
...
...
@@ -15,7 +15,7 @@ public class MatOfPoint3f extends Mat {
protected
MatOfPoint3f
(
long
addr
)
{
super
(
addr
);
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
@@ -26,7 +26,7 @@ public class MatOfPoint3f extends Mat {
public
MatOfPoint3f
(
Mat
m
)
{
super
(
m
,
Range
.
all
());
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
modules/java/generator/src/java/core+MatOfRect.java
浏览文件 @
b2d359b6
...
...
@@ -16,7 +16,7 @@ public class MatOfRect extends Mat {
protected
MatOfRect
(
long
addr
)
{
super
(
addr
);
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
@@ -27,7 +27,7 @@ public class MatOfRect extends Mat {
public
MatOfRect
(
Mat
m
)
{
super
(
m
,
Range
.
all
());
if
(
!
empty
()
&&
checkVector
(
_channels
,
_depth
)
<
0
)
throw
new
IllegalArgumentException
(
"Incomatible Mat"
);
throw
new
IllegalArgumentException
(
"Incom
p
atible Mat"
);
//FIXME: do we need release() here?
}
...
...
modules/python/src2/cv2.cpp
浏览文件 @
b2d359b6
#include <Python.h>
#define MODULESTR "cv2"
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <numpy/ndarrayobject.h>
#include "opencv2/core.hpp"
...
...
@@ -200,10 +201,10 @@ public:
if
(
!
o
)
CV_Error_
(
Error
::
StsError
,
(
"The numpy array of typenum=%d, ndims=%d can not be created"
,
typenum
,
dims
));
refcount
=
refcountFromPyObject
(
o
);
npy_intp
*
_strides
=
PyArray_STRIDES
(
o
);
npy_intp
*
_strides
=
PyArray_STRIDES
(
(
PyArrayObject
*
)
o
);
for
(
i
=
0
;
i
<
dims
-
(
cn
>
1
);
i
++
)
step
[
i
]
=
(
size_t
)
_strides
[
i
];
datastart
=
data
=
(
uchar
*
)
PyArray_DATA
(
o
);
datastart
=
data
=
(
uchar
*
)
PyArray_DATA
(
(
PyArrayObject
*
)
o
);
}
void
deallocate
(
int
*
refcount
,
uchar
*
,
uchar
*
)
...
...
@@ -278,8 +279,10 @@ static bool pyopencv_to(PyObject* o, Mat& m, const ArgInfo info)
return
false
;
}
PyArrayObject
*
oarr
=
(
PyArrayObject
*
)
o
;
bool
needcopy
=
false
,
needcast
=
false
;
int
typenum
=
PyArray_TYPE
(
o
),
new_typenum
=
typenum
;
int
typenum
=
PyArray_TYPE
(
o
arr
),
new_typenum
=
typenum
;
int
type
=
typenum
==
NPY_UBYTE
?
CV_8U
:
typenum
==
NPY_BYTE
?
CV_8S
:
typenum
==
NPY_USHORT
?
CV_16U
:
...
...
@@ -308,7 +311,7 @@ static bool pyopencv_to(PyObject* o, Mat& m, const ArgInfo info)
const
int
CV_MAX_DIM
=
32
;
#endif
int
ndims
=
PyArray_NDIM
(
o
);
int
ndims
=
PyArray_NDIM
(
o
arr
);
if
(
ndims
>=
CV_MAX_DIM
)
{
failmsg
(
"%s dimensionality (=%d) is too high"
,
info
.
name
,
ndims
);
...
...
@@ -318,8 +321,8 @@ static bool pyopencv_to(PyObject* o, Mat& m, const ArgInfo info)
int
size
[
CV_MAX_DIM
+
1
];
size_t
step
[
CV_MAX_DIM
+
1
];
size_t
elemsize
=
CV_ELEM_SIZE1
(
type
);
const
npy_intp
*
_sizes
=
PyArray_DIMS
(
o
);
const
npy_intp
*
_strides
=
PyArray_STRIDES
(
o
);
const
npy_intp
*
_sizes
=
PyArray_DIMS
(
o
arr
);
const
npy_intp
*
_strides
=
PyArray_STRIDES
(
o
arr
);
bool
ismultichannel
=
ndims
==
3
&&
_sizes
[
2
]
<=
CV_CN_MAX
;
for
(
int
i
=
ndims
-
1
;
i
>=
0
&&
!
needcopy
;
i
--
)
...
...
@@ -343,11 +346,17 @@ static bool pyopencv_to(PyObject* o, Mat& m, const ArgInfo info)
failmsg
(
"Layout of the output array %s is incompatible with cv::Mat (step[ndims-1] != elemsize or step[1] != elemsize*nchannels)"
,
info
.
name
);
return
false
;
}
if
(
needcast
)
o
=
(
PyObject
*
)
PyArray_Cast
((
PyArrayObject
*
)
o
,
new_typenum
);
else
o
=
(
PyObject
*
)
PyArray_GETCONTIGUOUS
((
PyArrayObject
*
)
o
);
_strides
=
PyArray_STRIDES
(
o
);
if
(
needcast
)
{
o
=
PyArray_Cast
(
oarr
,
new_typenum
);
oarr
=
(
PyArrayObject
*
)
o
;
}
else
{
oarr
=
PyArray_GETCONTIGUOUS
(
oarr
);
o
=
(
PyObject
*
)
oarr
;
}
_strides
=
PyArray_STRIDES
(
oarr
);
}
for
(
int
i
=
0
;
i
<
ndims
;
i
++
)
...
...
@@ -375,7 +384,7 @@ static bool pyopencv_to(PyObject* o, Mat& m, const ArgInfo info)
return
false
;
}
m
=
Mat
(
ndims
,
size
,
type
,
PyArray_DATA
(
o
),
step
);
m
=
Mat
(
ndims
,
size
,
type
,
PyArray_DATA
(
o
arr
),
step
);
if
(
m
.
data
)
{
...
...
modules/ts/misc/xls-report.py
浏览文件 @
b2d359b6
...
...
@@ -291,6 +291,7 @@ def main():
sheet
.
write_merge
(
row
,
row
+
1
,
col
,
col
,
caption
,
header_style
)
else
:
sheet
.
write
(
row
,
col
,
caption
,
header_style
)
col
+=
1
row
+=
2
if
args
.
show_times_per_pixel
else
1
...
...
modules/ts/src/ts_perf.cpp
浏览文件 @
b2d359b6
...
...
@@ -552,13 +552,6 @@ Regression& Regression::operator() (const std::string& name, cv::InputArray arra
std
::
string
nodename
=
getCurrentTestNodeName
();
// This is a hack for compatibility and it should eventually get removed.
// gpu's tests don't even have CPU sanity data anymore.
if
(
suiteName
==
"gpu"
)
{
nodename
=
(
PERF_RUN_GPU
()
?
"GPU_"
:
"CPU_"
)
+
nodename
;
}
cv
::
FileNode
n
=
rootIn
[
nodename
];
if
(
n
.
isNone
())
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录