Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
afe11f69
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,发现更多精彩内容 >>
提交
afe11f69
编写于
6月 30, 2012
作者:
A
Andrey Kamaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Fixed Windows build warnings and configuration problem.
上级
27c23b55
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
65 addition
and
75 deletion
+65
-75
cmake/OpenCVDetectCXXCompiler.cmake
cmake/OpenCVDetectCXXCompiler.cmake
+1
-1
modules/core/include/opencv2/core/eigen.hpp
modules/core/include/opencv2/core/eigen.hpp
+1
-0
modules/core/test/test_operations.cpp
modules/core/test/test_operations.cpp
+6
-6
modules/features2d/src/freak.cpp
modules/features2d/src/freak.cpp
+10
-10
modules/gpu/src/cascadeclassifier.cpp
modules/gpu/src/cascadeclassifier.cpp
+1
-1
modules/gpu/test/test_video.cpp
modules/gpu/test/test_video.cpp
+1
-1
modules/videostab/include/opencv2/videostab/frame_source.hpp
modules/videostab/include/opencv2/videostab/frame_source.hpp
+1
-5
modules/videostab/src/frame_source.cpp
modules/videostab/src/frame_source.cpp
+44
-51
未找到文件。
cmake/OpenCVDetectCXXCompiler.cmake
浏览文件 @
afe11f69
...
...
@@ -89,7 +89,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
endif
()
endif
()
if
(
CMAKE_SYSTEM_PROCESSOR MATCHES amd64.*|x86_64.*
)
if
(
CMAKE_SYSTEM_PROCESSOR MATCHES amd64.*|x86_64.*
OR CMAKE_GENERATOR MATCHES
"Visual Studio.*Win64"
)
set
(
X86_64 1
)
elseif
(
CMAKE_SYSTEM_PROCESSOR MATCHES i686.*|i386.*|x86.*
)
set
(
X86 1
)
...
...
modules/core/include/opencv2/core/eigen.hpp
浏览文件 @
afe11f69
...
...
@@ -51,6 +51,7 @@
#if defined _MSC_VER && _MSC_VER >= 1200
#pragma warning( disable: 4714 ) //__forceinline is not inlined
#pragma warning( disable: 4127 ) //conditional expression is constant
#pragma warning( disable: 4244 ) //conversion from '__int64' to 'int', possible loss of data
#endif
namespace
cv
...
...
modules/core/test/test_operations.cpp
浏览文件 @
afe11f69
...
...
@@ -955,13 +955,13 @@ bool CV_OperationsTest::TestSVD()
Mat
Q
(
3
,
3
,
CV_32FC1
);
Mat
U
,
Vt
,
R
,
T
,
W
;
Dp
.
at
<
float
>
(
0
,
0
)
=
0.86483884
;
Dp
.
at
<
float
>
(
0
,
1
)
=
-
0.3077251
;
Dp
.
at
<
float
>
(
0
,
2
)
=-
0.55711365
;
Dp
.
at
<
float
>
(
1
,
0
)
=
0.49294353
;
Dp
.
at
<
float
>
(
1
,
1
)
=-
0.24209651
;
Dp
.
at
<
float
>
(
1
,
2
)
=-
0.25084701
;
Dp
.
at
<
float
>
(
2
,
0
)
=
0
;
Dp
.
at
<
float
>
(
2
,
1
)
=
0
;
Dp
.
at
<
float
>
(
2
,
2
)
=
0
;
Dp
.
at
<
float
>
(
0
,
0
)
=
0.86483884
f
;
Dp
.
at
<
float
>
(
0
,
1
)
=
-
0.3077251
f
;
Dp
.
at
<
float
>
(
0
,
2
)
=-
0.55711365
f
;
Dp
.
at
<
float
>
(
1
,
0
)
=
0.49294353
f
;
Dp
.
at
<
float
>
(
1
,
1
)
=-
0.24209651
f
;
Dp
.
at
<
float
>
(
1
,
2
)
=-
0.25084701
f
;
Dp
.
at
<
float
>
(
2
,
0
)
=
0
;
Dp
.
at
<
float
>
(
2
,
1
)
=
0
;
Dp
.
at
<
float
>
(
2
,
2
)
=
0
;
Dc
.
at
<
float
>
(
0
,
0
)
=
0.75632739
;
Dc
.
at
<
float
>
(
0
,
1
)
=
-
0.38859656
;
Dc
.
at
<
float
>
(
0
,
2
)
=-
0.36773083
;
Dc
.
at
<
float
>
(
1
,
0
)
=
0.9699229
;
Dc
.
at
<
float
>
(
1
,
1
)
=-
0.49858192
;
Dc
.
at
<
float
>
(
1
,
2
)
=-
0.47134098
;
Dc
.
at
<
float
>
(
2
,
0
)
=
0.10566688
;
Dc
.
at
<
float
>
(
2
,
1
)
=-
0.060333252
;
Dc
.
at
<
float
>
(
2
,
2
)
=-
0.045333147
;
Dc
.
at
<
float
>
(
0
,
0
)
=
0.75632739
f
;
Dc
.
at
<
float
>
(
0
,
1
)
=
-
0.38859656
f
;
Dc
.
at
<
float
>
(
0
,
2
)
=-
0.36773083
f
;
Dc
.
at
<
float
>
(
1
,
0
)
=
0.9699229
f
;
Dc
.
at
<
float
>
(
1
,
1
)
=-
0.49858192
f
;
Dc
.
at
<
float
>
(
1
,
2
)
=-
0.47134098
f
;
Dc
.
at
<
float
>
(
2
,
0
)
=
0.10566688
f
;
Dc
.
at
<
float
>
(
2
,
1
)
=-
0.060333252
f
;
Dc
.
at
<
float
>
(
2
,
2
)
=-
0.045333147
f
;
Q
=
Dp
*
Dc
.
t
();
SVD
decomp
;
...
...
modules/features2d/src/freak.cpp
浏览文件 @
afe11f69
...
...
@@ -274,14 +274,14 @@ void FREAK::computeImpl( const Mat& image, std::vector<KeyPoint>& keypoints, Mat
// allocate descriptor memory, estimate orientations, extract descriptors
if
(
!
extAll
)
{
// extract the best comparisons only
descriptors
=
cv
::
Mat
::
zeros
(
keypoints
.
size
(),
FREAK_NB_PAIRS
/
8
,
CV_8U
);
descriptors
=
cv
::
Mat
::
zeros
(
(
int
)
keypoints
.
size
(),
FREAK_NB_PAIRS
/
8
,
CV_8U
);
#if CV_SSE2
__m128i
*
ptr
=
(
__m128i
*
)
(
descriptors
.
data
+
(
keypoints
.
size
()
-
1
)
*
descriptors
.
step
[
0
]);
// binary: 10000000 => char: 128 or hex: 0x80
const
__m128i
binMask
=
_mm_set_epi8
(
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
,
0x80
);
const
__m128i
binMask
=
_mm_set_epi8
(
'\x80'
,
'\x80'
,
'\x80'
,
'\x80'
,
'\x80'
,
'\x80'
,
'\x80'
,
'\x80'
,
'\x80'
,
'\x80'
,
'\x80'
,
'\x80'
,
'\x80'
,
'\x80'
,
'\x80'
,
'\x80'
);
#else
std
::
bitset
<
FREAK_NB_PAIRS
>*
ptr
=
(
std
::
bitset
<
FREAK_NB_PAIRS
>*
)
(
descriptors
.
data
+
(
keypoints
.
size
()
-
1
)
*
descriptors
.
step
[
0
]);
#endif
...
...
@@ -390,7 +390,7 @@ void FREAK::computeImpl( const Mat& image, std::vector<KeyPoint>& keypoints, Mat
}
}
else
{
// extract all possible comparisons for selection
descriptors
=
cv
::
Mat
::
zeros
(
keypoints
.
size
(),
128
,
CV_8U
);
descriptors
=
cv
::
Mat
::
zeros
(
(
int
)
keypoints
.
size
(),
128
,
CV_8U
);
std
::
bitset
<
1024
>*
ptr
=
(
std
::
bitset
<
1024
>*
)
(
descriptors
.
data
+
(
keypoints
.
size
()
-
1
)
*
descriptors
.
step
[
0
]);
for
(
size_t
k
=
keypoints
.
size
();
k
--
;
)
{
...
...
@@ -522,16 +522,16 @@ vector<int> FREAK::selectPairs(const std::vector<Mat>& images
Mat
descriptorsFloat
=
Mat
::
zeros
(
descriptors
.
rows
,
903
,
CV_32F
);
std
::
bitset
<
1024
>*
ptr
=
(
std
::
bitset
<
1024
>*
)
(
descriptors
.
data
+
(
descriptors
.
rows
-
1
)
*
descriptors
.
step
[
0
]);
for
(
size_
t
m
=
descriptors
.
rows
;
m
--
;
)
{
for
(
size_
t
n
=
903
;
n
--
;
)
{
for
(
in
t
m
=
descriptors
.
rows
;
m
--
;
)
{
for
(
in
t
n
=
903
;
n
--
;
)
{
if
(
ptr
->
test
(
n
)
==
true
)
descriptorsFloat
.
at
<
float
>
(
m
,
n
)
=
1.0
;
descriptorsFloat
.
at
<
float
>
(
m
,
n
)
=
1.0
f
;
}
--
ptr
;
}
std
::
vector
<
PairStat
>
pairStat
;
for
(
size_
t
n
=
903
;
n
--
;
)
{
for
(
in
t
n
=
903
;
n
--
;
)
{
// the higher the variance, the better --> mean = 0.5
PairStat
tmp
=
{
fabs
(
mean
(
descriptorsFloat
.
col
(
n
))[
0
]
-
0.5
)
,
n
};
pairStat
.
push_back
(
tmp
);
...
...
modules/gpu/src/cascadeclassifier.cpp
浏览文件 @
afe11f69
...
...
@@ -83,7 +83,7 @@ cv::gpu::CascadeClassifier_GPU_LBP::~CascadeClassifier_GPU_LBP() {
bool
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
empty
()
const
{
throw_nogpu
();
return
true
;
}
bool
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
load
(
const
string
&
)
{
throw_nogpu
();
return
true
;
}
Size
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
getClassifierSize
()
const
{
throw_nogpu
();
return
Size
();
}
void
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
preallocateIntegralBuffer
(
cv
::
Size
desired
)
{
throw_nogpu
();}
void
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
preallocateIntegralBuffer
(
cv
::
Size
/*desired*/
)
{
throw_nogpu
();}
int
cv
::
gpu
::
CascadeClassifier_GPU_LBP
::
detectMultiScale
(
const
cv
::
gpu
::
GpuMat
&
,
cv
::
gpu
::
GpuMat
&
,
cv
::
gpu
::
GpuMat
&
,
double
,
int
)
{
throw_nogpu
();
return
0
;
}
...
...
modules/gpu/test/test_video.cpp
浏览文件 @
afe11f69
...
...
@@ -545,7 +545,7 @@ TEST_P(MOG, Update)
cv
::
swap
(
temp
,
frame
);
}
mog
(
loadMat
(
frame
,
useRoi
),
foreground
,
learningRate
);
mog
(
loadMat
(
frame
,
useRoi
),
foreground
,
(
float
)
learningRate
);
mog_gold
(
frame
,
foreground_gold
,
learningRate
);
...
...
modules/videostab/include/opencv2/videostab/frame_source.hpp
浏览文件 @
afe11f69
...
...
@@ -81,11 +81,7 @@ public:
double
fps
();
private:
std
::
string
path_
;
bool
volatileFrame_
;
struct
VideoReader
;
const
VideoReader
&
reader_
;
Ptr
<
IFrameSource
>
impl
;
};
}
// namespace videostab
...
...
modules/videostab/src/frame_source.cpp
浏览文件 @
afe11f69
...
...
@@ -56,74 +56,67 @@ namespace cv
namespace
videostab
{
struct
VideoFileSource
::
VideoReader
{
#ifdef HAVE_OPENCV_HIGHGUI
mutable
VideoCapture
vc
;
#endif
};
VideoFileSource
::
VideoFileSource
(
const
string
&
path
,
bool
volatileFrame
)
:
path_
(
path
),
volatileFrame_
(
volatileFrame
),
reader_
(
VideoReader
())
{
reset
();
}
namespace
{
void
VideoFileSource
::
reset
()
class
VideoFileSourceImpl
:
public
IFrameSource
{
public:
VideoFileSourceImpl
(
const
std
::
string
&
path
,
bool
volatileFrame
)
:
path_
(
path
),
volatileFrame_
(
volatileFrame
)
{
reset
();
}
virtual
void
reset
()
{
#ifdef HAVE_OPENCV_HIGHGUI
reader_
.
vc
.
release
();
reader_
.
vc
.
open
(
path_
);
if
(
!
reader_
.
vc
.
isOpened
())
throw
runtime_error
(
"can't open file: "
+
path_
);
vc
.
release
();
vc
.
open
(
path_
);
if
(
!
vc
.
isOpened
())
throw
runtime_error
(
"can't open file: "
+
path_
);
#else
CV_Error
(
CV_StsNotImplemented
,
"OpenCV has been compiled without video I/O support"
);
CV_Error
(
CV_StsNotImplemented
,
"OpenCV has been compiled without video I/O support"
);
#endif
}
}
Mat
VideoFileSource
::
nextFrame
()
{
Mat
frame
;
virtual
Mat
nextFrame
()
{
Mat
frame
;
#ifdef HAVE_OPENCV_HIGHGUI
reader_
.
vc
>>
frame
;
vc
>>
frame
;
#endif
return
volatileFrame_
?
frame
:
frame
.
clone
();
}
return
volatileFrame_
?
frame
:
frame
.
clone
();
}
int
VideoFileSource
::
width
()
{
#ifdef HAVE_OPENCV_HIGHGUI
return
static_cast
<
int
>
(
reader_
.
vc
.
get
(
CV_CAP_PROP_FRAME_WIDTH
));
int
width
()
{
return
static_cast
<
int
>
(
vc
.
get
(
CV_CAP_PROP_FRAME_WIDTH
));}
int
height
()
{
return
static_cast
<
int
>
(
vc
.
get
(
CV_CAP_PROP_FRAME_HEIGHT
));}
int
count
()
{
return
static_cast
<
int
>
(
vc
.
get
(
CV_CAP_PROP_FRAME_COUNT
));}
double
fps
()
{
return
vc
.
get
(
CV_CAP_PROP_FPS
);}
#else
return
0
;
int
width
()
{
return
0
;}
int
height
()
{
return
0
;}
int
count
()
{
return
0
;}
double
fps
()
{
return
0
;}
#endif
}
int
VideoFileSource
::
height
()
{
private:
std
::
string
path_
;
bool
volatileFrame_
;
#ifdef HAVE_OPENCV_HIGHGUI
return
static_cast
<
int
>
(
reader_
.
vc
.
get
(
CV_CAP_PROP_FRAME_HEIGHT
));
#else
return
0
;
VideoCapture
vc
;
#endif
}
}
;
int
VideoFileSource
::
count
()
{
#ifdef HAVE_OPENCV_HIGHGUI
return
static_cast
<
int
>
(
reader_
.
vc
.
get
(
CV_CAP_PROP_FRAME_COUNT
));
#else
return
0
;
#endif
}
}
//namespace
double
VideoFileSource
::
fps
()
{
#ifdef HAVE_OPENCV_HIGHGUI
return
reader_
.
vc
.
get
(
CV_CAP_PROP_FPS
);
#else
return
0
;
#endif
}
VideoFileSource
::
VideoFileSource
(
const
string
&
path
,
bool
volatileFrame
)
:
impl
(
new
VideoFileSourceImpl
(
path
,
volatileFrame
))
{}
void
VideoFileSource
::
reset
()
{
impl
->
reset
();
}
Mat
VideoFileSource
::
nextFrame
()
{
return
impl
->
nextFrame
();
}
int
VideoFileSource
::
width
()
{
return
((
VideoFileSourceImpl
*
)
impl
.
obj
)
->
width
();
}
int
VideoFileSource
::
height
()
{
return
((
VideoFileSourceImpl
*
)
impl
.
obj
)
->
height
();
}
int
VideoFileSource
::
count
()
{
return
((
VideoFileSourceImpl
*
)
impl
.
obj
)
->
count
();
}
double
VideoFileSource
::
fps
()
{
return
((
VideoFileSourceImpl
*
)
impl
.
obj
)
->
fps
();
}
}
// namespace videostab
}
// namespace cv
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录