Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
O
opencv
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
opencv
Commits
21fff4df
Commit
21fff4df
authored
Apr 27, 2017
by
Alexander Alekhin
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #8654 from paroj:py_vector_ptr
parents
11cd884c
930611df
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
17 deletions
+17
-17
cv2.cpp
modules/python/src2/cv2.cpp
+17
-17
No files found.
modules/python/src2/cv2.cpp
View file @
21fff4df
...
...
@@ -394,6 +394,15 @@ bool pyopencv_to(PyObject* o, Mat& m, const char* name)
return
pyopencv_to
(
o
,
m
,
ArgInfo
(
name
,
0
));
}
template
<
typename
T
>
bool
pyopencv_to
(
PyObject
*
o
,
Ptr
<
T
>&
p
,
const
char
*
name
)
{
if
(
!
o
||
o
==
Py_None
)
return
true
;
p
=
makePtr
<
T
>
();
return
pyopencv_to
(
o
,
*
p
,
name
);
}
template
<>
PyObject
*
pyopencv_from
(
const
Mat
&
m
)
{
...
...
@@ -417,6 +426,14 @@ PyObject* pyopencv_from(const Matx<_Tp, m, n>& matx)
return
pyopencv_from
(
Mat
(
matx
));
}
template
<
typename
T
>
PyObject
*
pyopencv_from
(
const
cv
::
Ptr
<
T
>&
p
)
{
if
(
!
p
)
Py_RETURN_NONE
;
return
pyopencv_from
(
*
p
);
}
typedef
struct
{
PyObject_HEAD
UMat
*
um
;
...
...
@@ -1329,23 +1346,6 @@ PyObject* pyopencv_from(const Moments& m)
"nu30"
,
m
.
nu30
,
"nu21"
,
m
.
nu21
,
"nu12"
,
m
.
nu12
,
"nu03"
,
m
.
nu03
);
}
template
<
typename
T
>
PyObject
*
pyopencv_from
(
const
cv
::
Ptr
<
T
>&
p
)
{
if
(
!
p
)
Py_RETURN_NONE
;
return
pyopencv_from
(
*
p
);
}
template
<
typename
T
>
bool
pyopencv_to
(
PyObject
*
o
,
Ptr
<
T
>&
p
,
const
char
*
name
)
{
if
(
!
o
||
o
==
Py_None
)
return
true
;
p
=
makePtr
<
T
>
();
return
pyopencv_to
(
o
,
*
p
,
name
);
}
#include "pyopencv_custom_headers.h"
static
void
OnMouse
(
int
event
,
int
x
,
int
y
,
int
flags
,
void
*
param
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment