Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
17fd1c7c
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,发现更多精彩内容 >>
提交
17fd1c7c
编写于
6月 29, 2012
作者:
A
Andrey Kamaev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Merged recent changes from trunk - 8833,8848,8850
上级
57fb5f09
变更
9
隐藏空白更改
内联
并排
Showing
9 changed file
with
84 addition
and
27 deletion
+84
-27
modules/core/include/opencv2/core/core.hpp
modules/core/include/opencv2/core/core.hpp
+10
-0
modules/core/include/opencv2/core/operations.hpp
modules/core/include/opencv2/core/operations.hpp
+21
-3
modules/core/src/lapack.cpp
modules/core/src/lapack.cpp
+9
-8
modules/core/test/test_operations.cpp
modules/core/test/test_operations.cpp
+28
-0
modules/features2d/src/features2d_init.cpp
modules/features2d/src/features2d_init.cpp
+1
-1
modules/highgui/CMakeLists.txt
modules/highgui/CMakeLists.txt
+1
-1
modules/highgui/src/cap_avfoundation.mm
modules/highgui/src/cap_avfoundation.mm
+4
-4
modules/highgui/src/window.cpp
modules/highgui/src/window.cpp
+1
-1
modules/highgui/src/window_QT.cpp
modules/highgui/src/window_QT.cpp
+9
-9
未找到文件。
modules/core/include/opencv2/core/core.hpp
浏览文件 @
17fd1c7c
...
...
@@ -4406,6 +4406,16 @@ public:
Ptr
<
Algorithm
>
(
Algorithm
::*
getter
)()
=
0
,
void
(
Algorithm
::*
setter
)(
const
Ptr
<
Algorithm
>&
)
=
0
,
const
string
&
help
=
string
());
template
<
typename
_Tp
,
typename
_Base
>
void
addParam
(
Algorithm
&
algo
,
const
char
*
name
,
Ptr
<
_Tp
>&
value
,
bool
readOnly
=
false
,
Ptr
<
_Tp
>
(
Algorithm
::*
getter
)()
=
0
,
void
(
Algorithm
::*
setter
)(
const
Ptr
<
_Tp
>&
)
=
0
,
const
string
&
help
=
string
());
template
<
typename
_Tp
>
void
addParam
(
Algorithm
&
algo
,
const
char
*
name
,
Ptr
<
_Tp
>&
value
,
bool
readOnly
=
false
,
Ptr
<
_Tp
>
(
Algorithm
::*
getter
)()
=
0
,
void
(
Algorithm
::*
setter
)(
const
Ptr
<
_Tp
>&
)
=
0
,
const
string
&
help
=
string
());
protected:
AlgorithmInfoData
*
data
;
void
set
(
Algorithm
*
algo
,
const
char
*
name
,
int
argType
,
...
...
modules/core/include/opencv2/core/operations.hpp
浏览文件 @
17fd1c7c
...
...
@@ -3843,7 +3843,7 @@ template<typename _Tp> inline Ptr<_Tp> Algorithm::create(const string& name)
}
template
<
typename
_Tp
>
void
Algorithm
::
set
(
const
char
*
_name
,
const
Ptr
<
_Tp
>&
value
)
inline
void
Algorithm
::
set
(
const
char
*
_name
,
const
Ptr
<
_Tp
>&
value
)
{
Ptr
<
Algorithm
>
algo_ptr
=
value
.
template
ptr
<
cv
::
Algorithm
>();
if
(
algo_ptr
.
empty
())
{
...
...
@@ -3851,12 +3851,12 @@ void Algorithm::set(const char* _name, const Ptr<_Tp>& value)
}
info
()
->
set
(
this
,
_name
,
ParamType
<
Algorithm
>::
type
,
&
algo_ptr
);
}
template
<
typename
_Tp
>
void
Algorithm
::
set
(
const
string
&
_name
,
const
Ptr
<
_Tp
>&
value
)
inline
void
Algorithm
::
set
(
const
string
&
_name
,
const
Ptr
<
_Tp
>&
value
)
{
this
->
set
<
_Tp
>
(
_name
.
c_str
(),
value
);
}
template
<
typename
_Tp
>
inline
typename
ParamType
<
_Tp
>::
member_type
Algorithm
::
get
(
const
string
&
_name
)
const
{
...
...
@@ -3872,6 +3872,24 @@ template<typename _Tp> inline typename ParamType<_Tp>::member_type Algorithm::ge
return
value
;
}
template
<
typename
_Tp
,
typename
_Base
>
inline
void
AlgorithmInfo
::
addParam
(
Algorithm
&
algo
,
const
char
*
parameter
,
Ptr
<
_Tp
>&
value
,
bool
readOnly
,
Ptr
<
_Tp
>
(
Algorithm
::*
getter
)(),
void
(
Algorithm
::*
setter
)(
const
Ptr
<
_Tp
>&
),
const
string
&
help
)
{
//TODO: static assert: _Tp inherits from _Base
addParam_
(
algo
,
parameter
,
ParamType
<
_Base
>::
type
,
&
value
,
readOnly
,
(
Algorithm
::
Getter
)
getter
,
(
Algorithm
::
Setter
)
setter
,
help
);
}
template
<
typename
_Tp
>
inline
void
AlgorithmInfo
::
addParam
(
Algorithm
&
algo
,
const
char
*
parameter
,
Ptr
<
_Tp
>&
value
,
bool
readOnly
,
Ptr
<
_Tp
>
(
Algorithm
::*
getter
)(),
void
(
Algorithm
::*
setter
)(
const
Ptr
<
_Tp
>&
),
const
string
&
help
)
{
//TODO: static assert: _Tp inherits from Algorithm
addParam_
(
algo
,
parameter
,
ParamType
<
Algorithm
>::
type
,
&
value
,
readOnly
,
(
Algorithm
::
Getter
)
getter
,
(
Algorithm
::
Setter
)
setter
,
help
);
}
}
#endif // __cplusplus
...
...
modules/core/src/lapack.cpp
浏览文件 @
17fd1c7c
...
...
@@ -527,7 +527,7 @@ template<> inline int VBLAS<double>::givensx(double* a, double* b, int n, double
#endif
template
<
typename
_Tp
>
void
JacobiSVDImpl_
(
_Tp
*
At
,
size_t
astep
,
_Tp
*
_W
,
_Tp
*
Vt
,
size_t
vstep
,
int
m
,
int
n
,
int
n1
)
JacobiSVDImpl_
(
_Tp
*
At
,
size_t
astep
,
_Tp
*
_W
,
_Tp
*
Vt
,
size_t
vstep
,
int
m
,
int
n
,
int
n1
,
double
minval
)
{
VBLAS
<
_Tp
>
vblas
;
AutoBuffer
<
double
>
Wbuf
(
n
);
...
...
@@ -587,11 +587,11 @@ JacobiSVDImpl_(_Tp* At, size_t astep, _Tp* _W, _Tp* Vt, size_t vstep, int m, int
delta
=
p
*
p
*
0.5
/
(
gamma
+
beta
);
}
if
(
iter
%
2
)
W
[
i
]
+=
delta
;
W
[
j
]
-=
delta
;
if
(
iter
%
2
!=
0
&&
W
[
i
]
>
0
&&
W
[
j
]
>
0
)
{
W
[
i
]
+=
delta
;
W
[
j
]
-=
delta
;
k
=
vblas
.
givens
(
Ai
,
Aj
,
m
,
c
,
s
);
for
(
;
k
<
m
;
k
++
)
...
...
@@ -671,12 +671,13 @@ JacobiSVDImpl_(_Tp* At, size_t astep, _Tp* _W, _Tp* Vt, size_t vstep, int m, int
if
(
!
Vt
)
return
;
RNG
rng
(
0x12345678
);
for
(
i
=
0
;
i
<
n1
;
i
++
)
{
sd
=
i
<
n
?
W
[
i
]
:
0
;
while
(
sd
==
0
)
while
(
sd
<=
minval
)
{
// if we got a zero singular value, then in order to get the corresponding left singular vector
// we generate a random vector, project it to the previously computed left singular vectors,
...
...
@@ -724,12 +725,12 @@ JacobiSVDImpl_(_Tp* At, size_t astep, _Tp* _W, _Tp* Vt, size_t vstep, int m, int
static
void
JacobiSVD
(
float
*
At
,
size_t
astep
,
float
*
W
,
float
*
Vt
,
size_t
vstep
,
int
m
,
int
n
,
int
n1
=-
1
)
{
JacobiSVDImpl_
(
At
,
astep
,
W
,
Vt
,
vstep
,
m
,
n
,
!
Vt
?
0
:
n1
<
0
?
n
:
n1
);
JacobiSVDImpl_
(
At
,
astep
,
W
,
Vt
,
vstep
,
m
,
n
,
!
Vt
?
0
:
n1
<
0
?
n
:
n1
,
FLT_MIN
);
}
static
void
JacobiSVD
(
double
*
At
,
size_t
astep
,
double
*
W
,
double
*
Vt
,
size_t
vstep
,
int
m
,
int
n
,
int
n1
=-
1
)
{
JacobiSVDImpl_
(
At
,
astep
,
W
,
Vt
,
vstep
,
m
,
n
,
!
Vt
?
0
:
n1
<
0
?
n
:
n1
);
JacobiSVDImpl_
(
At
,
astep
,
W
,
Vt
,
vstep
,
m
,
n
,
!
Vt
?
0
:
n1
<
0
?
n
:
n1
,
DBL_MIN
);
}
/* y[0:m,0:n] += diag(a[0:1,0:m]) * x[0:m,0:n] */
...
...
modules/core/test/test_operations.cpp
浏览文件 @
17fd1c7c
...
...
@@ -940,6 +940,34 @@ bool CV_OperationsTest::TestSVD()
SVD
svd
(
A
,
SVD
::
FULL_UV
);
if
(
norm
(
A
*
svd
.
vt
.
row
(
3
).
t
(),
CV_C
)
>
FLT_EPSILON
)
throw
test_excep
();
Mat
Dp
(
3
,
3
,
CV_32FC1
);
Mat
Dc
(
3
,
3
,
CV_32FC1
);
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
;
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
;
Q
=
Dp
*
Dc
.
t
();
SVD
decomp
;
decomp
=
SVD
(
Q
);
U
=
decomp
.
u
;
Vt
=
decomp
.
vt
;
W
=
decomp
.
w
;
Mat
I
=
Mat
::
eye
(
3
,
3
,
CV_32F
);
if
(
norm
(
U
*
U
.
t
(),
I
,
CV_C
)
>
FLT_EPSILON
||
norm
(
Vt
*
Vt
.
t
(),
I
,
CV_C
)
>
FLT_EPSILON
||
W
.
at
<
float
>
(
2
)
<
0
||
W
.
at
<
float
>
(
1
)
<
W
.
at
<
float
>
(
2
)
||
W
.
at
<
float
>
(
0
)
<
W
.
at
<
float
>
(
1
)
||
norm
(
U
*
Mat
::
diag
(
W
)
*
Vt
,
Q
,
CV_C
)
>
FLT_EPSILON
)
throw
test_excep
();
}
catch
(
const
test_excep
&
)
{
...
...
modules/features2d/src/features2d_init.cpp
浏览文件 @
17fd1c7c
...
...
@@ -144,7 +144,7 @@ CV_INIT_ALGORITHM(DenseFeatureDetector, "Feature2D.Dense",
obj
.
info
()
->
addParam
(
obj
,
"varyImgBoundWithScale"
,
obj
.
varyImgBoundWithScale
));
CV_INIT_ALGORITHM
(
GridAdaptedFeatureDetector
,
"Feature2D.Grid"
,
obj
.
info
()
->
addParam
(
obj
,
"detector"
,
(
Ptr
<
Algorithm
>&
)
obj
.
detector
);
obj
.
info
()
->
addParam
(
obj
,
"detector"
,
obj
.
detector
);
obj
.
info
()
->
addParam
(
obj
,
"maxTotalKeypoints"
,
obj
.
maxTotalKeypoints
);
obj
.
info
()
->
addParam
(
obj
,
"gridRows"
,
obj
.
gridRows
);
obj
.
info
()
->
addParam
(
obj
,
"gridCols"
,
obj
.
gridCols
));
...
...
modules/highgui/CMakeLists.txt
浏览文件 @
17fd1c7c
...
...
@@ -160,7 +160,7 @@ if(HAVE_FFMPEG)
list
(
APPEND HIGHGUI_LIBRARIES
${
BZIP2_LIBRARIES
}
)
endif
()
if
(
APPLE
)
list
(
APPEND HIGHGUI_LIBRARIES
"-framework VideoDecodeAcceleration"
)
list
(
APPEND HIGHGUI_LIBRARIES
"-framework VideoDecodeAcceleration"
bz2
)
endif
()
endif
(
HAVE_FFMPEG
)
...
...
modules/highgui/src/cap_avfoundation.mm
浏览文件 @
17fd1c7c
...
...
@@ -720,7 +720,7 @@ fromConnection:(AVCaptureConnection *)connection{
image
->
height
=
height
;
image
->
nChannels
=
4
;
image
->
depth
=
IPL_DEPTH_8U
;
image
->
widthStep
=
rowBytes
;
image
->
widthStep
=
(
int
)
rowBytes
;
image
->
imageData
=
imagedata
;
image
->
imageSize
=
currSize
;
...
...
@@ -731,7 +731,7 @@ fromConnection:(AVCaptureConnection *)connection{
bgr_image
->
height
=
height
;
bgr_image
->
nChannels
=
3
;
bgr_image
->
depth
=
IPL_DEPTH_8U
;
bgr_image
->
widthStep
=
rowBytes
;
bgr_image
->
widthStep
=
(
int
)
rowBytes
;
bgr_image
->
imageData
=
bgr_imagedata
;
bgr_image
->
imageSize
=
currSize
;
...
...
@@ -949,7 +949,7 @@ IplImage* CvCaptureFile::retrieveFramePixelBuffer() {
image
->
height
=
height
;
image
->
nChannels
=
4
;
image
->
depth
=
IPL_DEPTH_8U
;
image
->
widthStep
=
width
*
4
;
image
->
widthStep
=
rowBytes
;
image
->
imageData
=
imagedata
;
image
->
imageSize
=
currSize
;
...
...
@@ -962,7 +962,7 @@ IplImage* CvCaptureFile::retrieveFramePixelBuffer() {
bgr_image
->
height
=
height
;
bgr_image
->
nChannels
=
3
;
bgr_image
->
depth
=
IPL_DEPTH_8U
;
bgr_image
->
widthStep
=
width
*
4
;
bgr_image
->
widthStep
=
rowBytes
;
bgr_image
->
imageData
=
bgr_imagedata
;
bgr_image
->
imageSize
=
currSize
;
...
...
modules/highgui/src/window.cpp
浏览文件 @
17fd1c7c
...
...
@@ -521,7 +521,7 @@ void icvSetOpenGlCleanCallback(const char*, CvOpenGlCleanCallback, void*)
#if defined (HAVE_QT)
CvFont
cv
::
fontQt
(
const
string
&
nameFont
,
int
pointSize
,
Scalar
color
,
int
weight
,
int
style
,
int
spacing
)
CvFont
cv
::
fontQt
(
const
string
&
nameFont
,
int
pointSize
,
Scalar
color
,
int
weight
,
int
style
,
int
/*spacing*/
)
{
return
cvFontQt
(
nameFont
.
c_str
(),
pointSize
,
color
,
weight
,
style
);
}
...
...
modules/highgui/src/window_QT.cpp
浏览文件 @
17fd1c7c
...
...
@@ -2414,13 +2414,13 @@ void DefaultViewPort::startDisplayInfo(QString text, int delayms)
}
void
DefaultViewPort
::
setOpenGlDrawCallback
(
CvOpenGlDrawCallback
callback
,
void
*
userdata
)
void
DefaultViewPort
::
setOpenGlDrawCallback
(
CvOpenGlDrawCallback
/*callback*/
,
void
*
/*userdata*/
)
{
CV_Error
(
CV_OpenGlNotSupported
,
"Window doesn't support OpenGL"
);
}
void
DefaultViewPort
::
setOpenGlCleanCallback
(
CvOpenGlCleanCallback
callback
,
void
*
userdata
)
void
DefaultViewPort
::
setOpenGlCleanCallback
(
CvOpenGlCleanCallback
/*callback*/
,
void
*
/*userdata*/
)
{
CV_Error
(
CV_OpenGlNotSupported
,
"Window doesn't support OpenGL"
);
}
...
...
@@ -3058,7 +3058,7 @@ void DefaultViewPort::drawInstructions(QPainter *painter)
}
void
DefaultViewPort
::
setSize
(
QSize
size_
)
void
DefaultViewPort
::
setSize
(
QSize
/*size_*/
)
{
}
...
...
@@ -3101,11 +3101,11 @@ void OpenGlViewPort::setMouseCallBack(CvMouseCallback callback, void* param)
mouseData
=
param
;
}
void
OpenGlViewPort
::
writeSettings
(
QSettings
&
settings
)
void
OpenGlViewPort
::
writeSettings
(
QSettings
&
/*settings*/
)
{
}
void
OpenGlViewPort
::
readSettings
(
QSettings
&
settings
)
void
OpenGlViewPort
::
readSettings
(
QSettings
&
/*settings*/
)
{
}
...
...
@@ -3114,15 +3114,15 @@ double OpenGlViewPort::getRatio()
return
(
double
)
width
()
/
height
();
}
void
OpenGlViewPort
::
setRatio
(
int
flags
)
void
OpenGlViewPort
::
setRatio
(
int
/*flags*/
)
{
}
void
OpenGlViewPort
::
updateImage
(
const
CvArr
*
arr
)
void
OpenGlViewPort
::
updateImage
(
const
CvArr
*
/*arr*/
)
{
}
void
OpenGlViewPort
::
startDisplayInfo
(
QString
text
,
int
delayms
)
void
OpenGlViewPort
::
startDisplayInfo
(
QString
/*text*/
,
int
/*delayms*/
)
{
}
...
...
@@ -3350,7 +3350,7 @@ void GlFuncTab_QT::unmapBuffer(unsigned int target) const
__END__
;
}
void
GlFuncTab_QT
::
generateBitmapFont
(
const
std
::
string
&
family
,
int
height
,
int
weight
,
bool
italic
,
bool
underline
,
int
start
,
int
count
,
int
base
)
const
void
GlFuncTab_QT
::
generateBitmapFont
(
const
std
::
string
&
family
,
int
height
,
int
weight
,
bool
italic
,
bool
/*underline*/
,
int
start
,
int
count
,
int
base
)
const
{
//CV_FUNCNAME( "GlFuncTab_QT::generateBitmapFont" );
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录