Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Greenplum
Opencv
提交
8a8ba57b
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,发现更多精彩内容 >>
提交
8a8ba57b
编写于
11月 03, 2010
作者:
V
Vadim Pisarevsky
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fixed building Python wrappers when Numpy is not available
上级
37c1204d
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
29 addition
and
7 deletion
+29
-7
CMakeLists.txt
CMakeLists.txt
+5
-1
modules/features2d/include/opencv2/features2d/features2d.hpp
modules/features2d/include/opencv2/features2d/features2d.hpp
+4
-4
modules/python/cv.cpp
modules/python/cv.cpp
+12
-1
modules/python/gen2.py
modules/python/gen2.py
+1
-1
modules/python/opencv2x.h
modules/python/opencv2x.h
+7
-0
未找到文件。
CMakeLists.txt
浏览文件 @
8a8ba57b
...
...
@@ -1321,7 +1321,11 @@ message(STATUS "")
message
(
STATUS
" Interfaces: "
)
message
(
STATUS
" Python:
${
BUILD_NEW_PYTHON_SUPPORT
}
"
)
message
(
STATUS
" Python interpreter:
${
PYTHON_EXECUTABLE
}
"
)
message
(
STATUS
" Python numpy:
${
PYTHON_USE_NUMPY
}
"
)
if
(
PYTHON_USE_NUMPY
)
message
(
STATUS
" Python numpy: YES"
)
else
()
message
(
STATUS
" Python numpy: NO (Python interface will not cover OpenCV 2.x API)"
)
endif
()
if
(
IPP_FOUND AND USE_IPP
)
message
(
STATUS
" Use IPP:
${
IPP_PATH
}
"
)
...
...
modules/features2d/include/opencv2/features2d/features2d.hpp
浏览文件 @
8a8ba57b
...
...
@@ -1400,8 +1400,8 @@ public:
virtual
void
detect
(
const
Mat
&
image
,
vector
<
KeyPoint
>&
keypoints
,
const
Mat
&
mask
=
Mat
()
)
const
;
// todo read/write
virtual
void
read
(
const
FileNode
&
fn
)
{}
virtual
void
write
(
FileStorage
&
fs
)
const
{}
virtual
void
read
(
const
FileNode
&
)
{}
virtual
void
write
(
FileStorage
&
)
const
{}
protected:
Ptr
<
FeatureDetector
>
detector
;
...
...
@@ -1421,8 +1421,8 @@ public:
virtual
void
detect
(
const
Mat
&
image
,
vector
<
KeyPoint
>&
keypoints
,
const
Mat
&
mask
=
Mat
()
)
const
;
// todo read/write
virtual
void
read
(
const
FileNode
&
fn
)
{}
virtual
void
write
(
FileStorage
&
fs
)
const
{}
virtual
void
read
(
const
FileNode
&
)
{}
virtual
void
write
(
FileStorage
&
)
const
{}
protected:
Ptr
<
FeatureDetector
>
detector
;
...
...
modules/python/cv.cpp
浏览文件 @
8a8ba57b
...
...
@@ -1860,7 +1860,7 @@ static int convert_to_floats(PyObject *o, floats *dst, const char *name = "no_na
}
else
if
(
PyNumber_Check
(
o
))
{
dst
->
count
=
1
;
dst
->
f
=
new
float
[
1
];
dst
->
f
[
0
]
=
PyFloat_AsDouble
(
o
);
dst
->
f
[
0
]
=
(
float
)
PyFloat_AsDouble
(
o
);
}
else
{
return
failmsg
(
"Expected list of floats, or float for argument '%s'"
,
name
);
}
...
...
@@ -3847,9 +3847,11 @@ static int zero = 0;
#include "generated0.i"
#if PYTHON_USE_NUMPY
#include "opencv2x.h"
#include "pyopencv_generated_types.h"
#include "pyopencv_generated_funcs.h"
#endif
static
PyMethodDef
methods
[]
=
{
...
...
@@ -3865,7 +3867,10 @@ static PyMethodDef methods[] = {
{
"temp_test"
,
temp_test
,
METH_VARARGS
},
#include "generated1.i"
#if PYTHON_USE_NUMPY
#include "pyopencv_generated_func_tab.h"
#endif
{
NULL
,
NULL
},
};
...
...
@@ -3918,7 +3923,10 @@ void initcv()
MKTYPE
(
memtrack
);
#include "generated4.i"
#if PYTHON_USE_NUMPY
#include "pyopencv_generated_type_reg.h"
#endif
m
=
Py_InitModule
(
MODULESTR
""
,
methods
);
d
=
PyModule_GetDict
(
m
);
...
...
@@ -4015,7 +4023,10 @@ void initcv()
PUBLISH
(
GC_EVAL
);
#include "generated2.i"
#if PYTHON_USE_NUMPY
#include "pyopencv_generated_const_reg.h"
#endif
#if 0
{
...
...
modules/python/gen2.py
浏览文件 @
8a8ba57b
...
...
@@ -49,7 +49,7 @@ static PyObject* pyopencv_from(const ${cname}& r)
static bool pyopencv_to(PyObject* src, ${cname}& dst, const char* name="<unknown>")
{
if( src == NULL
or
src == Py_None )
if( src == NULL
||
src == Py_None )
return true;
if(!PyObject_TypeCheck(src, &pyopencv_${name}_Type))
{
...
...
modules/python/opencv2x.h
浏览文件 @
8a8ba57b
...
...
@@ -693,4 +693,11 @@ static inline PyObject* pyopencv_from(const Moments& m)
"nu30"
,
m
.
nu30
,
"nu21"
,
m
.
nu21
,
"nu12"
,
m
.
nu12
,
"mu03"
,
m
.
nu03
);
}
static
inline
PyObject
*
pyopencv_from
(
const
CvDTreeNode
*
node
)
{
double
value
=
node
->
value
;
int
ivalue
=
cvRound
(
value
);
return
value
==
ivalue
?
PyInt_FromLong
(
ivalue
)
:
PyFloat_FromDouble
(
value
);
}
#endif
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录