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
8011be28
Commit
8011be28
authored
May 17, 2016
by
Maksim Shabunin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Python bindings: added std::vector< std::pair< int, double > > type read support
parent
764a1f59
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
cv2.cpp
modules/python/src2/cv2.cpp
+18
-0
No files found.
modules/python/src2/cv2.cpp
View file @
8011be28
...
...
@@ -967,6 +967,24 @@ template<typename _Tp> static inline PyObject* pyopencv_from_generic_vec(const s
return
seq
;
}
template
<>
PyObject
*
pyopencv_from
(
const
std
::
pair
<
int
,
double
>&
src
)
{
return
Py_BuildValue
(
"(id)"
,
src
.
first
,
src
.
second
);
}
template
<
typename
_Tp
,
typename
_Tr
>
struct
pyopencvVecConverter
<
std
::
pair
<
_Tp
,
_Tr
>
>
{
static
bool
to
(
PyObject
*
obj
,
std
::
vector
<
std
::
pair
<
_Tp
,
_Tr
>
>&
value
,
const
ArgInfo
info
)
{
return
pyopencv_to_generic_vec
(
obj
,
value
,
info
);
}
static
PyObject
*
from
(
const
std
::
vector
<
std
::
pair
<
_Tp
,
_Tr
>
>&
value
)
{
return
pyopencv_from_generic_vec
(
value
);
}
};
template
<
typename
_Tp
>
struct
pyopencvVecConverter
<
std
::
vector
<
_Tp
>
>
{
...
...
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