Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dlib
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
钟尚武
dlib
Commits
1a3f8d5b
Commit
1a3f8d5b
authored
May 27, 2018
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added center() and more overloads of centered_rect() to the Python API.
parent
8516442a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
rectangles.cpp
tools/python/src/rectangles.cpp
+18
-0
No files found.
tools/python/src/rectangles.cpp
View file @
1a3f8d5b
...
@@ -271,6 +271,24 @@ ensures \n\
...
@@ -271,6 +271,24 @@ ensures \n\
m
.
def
(
"centered_rects"
,
[](
const
std
::
vector
<
point
>&
p
,
unsigned
long
width
,
unsigned
long
height
)
{
m
.
def
(
"centered_rects"
,
[](
const
std
::
vector
<
point
>&
p
,
unsigned
long
width
,
unsigned
long
height
)
{
return
centered_rects
(
p
,
width
,
height
);
},
return
centered_rects
(
p
,
width
,
height
);
},
py
::
arg
(
"pts"
),
py
::
arg
(
"width"
),
py
::
arg
(
"height"
));
py
::
arg
(
"pts"
),
py
::
arg
(
"width"
),
py
::
arg
(
"height"
));
m
.
def
(
"centered_rect"
,
[](
const
dpoint
&
p
,
unsigned
long
width
,
unsigned
long
height
)
{
return
centered_rect
(
p
,
width
,
height
);
},
py
::
arg
(
"p"
),
py
::
arg
(
"width"
),
py
::
arg
(
"height"
));
m
.
def
(
"centered_rect"
,
[](
const
rectangle
&
rect
,
unsigned
long
width
,
unsigned
long
height
)
{
return
centered_rect
(
rect
,
width
,
height
);
},
py
::
arg
(
"rect"
),
py
::
arg
(
"width"
),
py
::
arg
(
"height"
));
m
.
def
(
"centered_rect"
,
[](
const
drectangle
&
rect
,
unsigned
long
width
,
unsigned
long
height
)
{
return
centered_rect
(
rect
,
width
,
height
);
},
py
::
arg
(
"rect"
),
py
::
arg
(
"width"
),
py
::
arg
(
"height"
));
m
.
def
(
"center"
,
[](
const
rectangle
&
rect
){
return
center
(
rect
);
},
py
::
arg
(
"rect"
),
" returns the center of the given rectangle"
);
m
.
def
(
"center"
,
[](
const
drectangle
&
rect
){
return
center
(
rect
);
},
py
::
arg
(
"rect"
),
" returns the center of the given rectangle"
);
}
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
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