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
30f9710d
Commit
30f9710d
authored
May 16, 2011
by
Alexander Mordvintsev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed #808 and #848
parent
0caf2707
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
8 deletions
+8
-8
cv2.cpp
modules/python/src2/cv2.cpp
+7
-7
gen2.py
modules/python/src2/gen2.py
+1
-1
No files found.
modules/python/src2/cv2.cpp
View file @
30f9710d
...
...
@@ -354,7 +354,7 @@ static inline bool pyopencv_to(PyObject* obj, Size& sz, const char* name = "<unk
{
if
(
!
obj
||
obj
==
Py_None
)
return
true
;
return
PyArg_Parse
(
obj
,
"ii"
,
&
sz
.
width
,
&
sz
.
height
)
>
0
;
return
PyArg_Parse
Tuple
(
obj
,
"ii"
,
&
sz
.
width
,
&
sz
.
height
)
>
0
;
}
static
inline
PyObject
*
pyopencv_from
(
const
Size
&
sz
)
...
...
@@ -366,7 +366,7 @@ static inline bool pyopencv_to(PyObject* obj, Rect& r, const char* name = "<unkn
{
if
(
!
obj
||
obj
==
Py_None
)
return
true
;
return
PyArg_Parse
(
obj
,
"iiii"
,
&
r
.
x
,
&
r
.
y
,
&
r
.
width
,
&
r
.
height
)
>
0
;
return
PyArg_Parse
Tuple
(
obj
,
"iiii"
,
&
r
.
x
,
&
r
.
y
,
&
r
.
width
,
&
r
.
height
)
>
0
;
}
static
inline
PyObject
*
pyopencv_from
(
const
Rect
&
r
)
...
...
@@ -383,7 +383,7 @@ static inline bool pyopencv_to(PyObject* obj, Range& r, const char* name = "<unk
r
=
Range
::
all
();
return
true
;
}
return
PyArg_Parse
(
obj
,
"ii"
,
&
r
.
start
,
&
r
.
end
)
>
0
;
return
PyArg_Parse
Tuple
(
obj
,
"ii"
,
&
r
.
start
,
&
r
.
end
)
>
0
;
}
static
inline
PyObject
*
pyopencv_from
(
const
Range
&
r
)
...
...
@@ -400,7 +400,7 @@ static inline bool pyopencv_to(PyObject* obj, CvSlice& r, const char* name = "<u
r
=
CV_WHOLE_SEQ
;
return
true
;
}
return
PyArg_Parse
(
obj
,
"ii"
,
&
r
.
start_index
,
&
r
.
end_index
)
>
0
;
return
PyArg_Parse
Tuple
(
obj
,
"ii"
,
&
r
.
start_index
,
&
r
.
end_index
)
>
0
;
}
static
inline
PyObject
*
pyopencv_from
(
const
CvSlice
&
r
)
...
...
@@ -419,7 +419,7 @@ static inline bool pyopencv_to(PyObject* obj, Point& p, const char* name = "<unk
p
.
y
=
saturate_cast
<
int
>
(
c
.
imag
);
return
true
;
}
return
PyArg_Parse
(
obj
,
"ii"
,
&
p
.
x
,
&
p
.
y
)
>
0
;
return
PyArg_Parse
Tuple
(
obj
,
"ii"
,
&
p
.
x
,
&
p
.
y
)
>
0
;
}
static
inline
bool
pyopencv_to
(
PyObject
*
obj
,
Point2f
&
p
,
const
char
*
name
=
"<unknown>"
)
...
...
@@ -433,7 +433,7 @@ static inline bool pyopencv_to(PyObject* obj, Point2f& p, const char* name = "<u
p
.
y
=
saturate_cast
<
float
>
(
c
.
imag
);
return
true
;
}
return
PyArg_Parse
(
obj
,
"ff"
,
&
p
.
x
,
&
p
.
y
)
>
0
;
return
PyArg_Parse
Tuple
(
obj
,
"ff"
,
&
p
.
x
,
&
p
.
y
)
>
0
;
}
static
inline
PyObject
*
pyopencv_from
(
const
Point
&
p
)
...
...
@@ -450,7 +450,7 @@ static inline bool pyopencv_to(PyObject* obj, Vec3d& v, const char* name = "<unk
{
if
(
!
obj
)
return
true
;
return
PyArg_Parse
(
obj
,
"ddd"
,
&
v
[
0
],
&
v
[
1
],
&
v
[
2
])
>
0
;
return
PyArg_Parse
Tuple
(
obj
,
"ddd"
,
&
v
[
0
],
&
v
[
1
],
&
v
[
2
])
>
0
;
}
static
inline
PyObject
*
pyopencv_from
(
const
Vec3d
&
v
)
...
...
modules/python/src2/gen2.py
View file @
30f9710d
...
...
@@ -571,7 +571,7 @@ class FuncInfo(object):
parse_arglist
=
", "
.
join
([
"&"
+
all_cargs
[
argno
][
1
]
for
aname
,
argno
in
v
.
py_arglist
]),
code_cvt
=
" &&
\n
"
.
join
(
code_cvt_list
))
else
:
code_parse
=
"if(PyObject_Size(args) == 0 &&
PyObject_Size(kw) == 0
)"
code_parse
=
"if(PyObject_Size(args) == 0 &&
(kw == NULL || PyObject_Size(kw) == 0)
)"
if
len
(
v
.
py_outlist
)
==
0
:
code_ret
=
"Py_RETURN_NONE"
...
...
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