Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
dlib
Commits
d7644ef2
Unverified
Commit
d7644ef2
authored
Nov 22, 2020
by
Frankie Robertson
Committed by
GitHub
Nov 21, 2020
Browse files
Expose get_face_chip_details to Python (#2238)
parent
96a75568
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
0 deletions
+18
-0
tools/python/src/image2.cpp
tools/python/src/image2.cpp
+18
-0
No files found.
tools/python/src/image2.cpp
View file @
d7644ef2
...
@@ -372,6 +372,11 @@ ensures \n\
...
@@ -372,6 +372,11 @@ ensures \n\
.
def_readwrite
(
"rows"
,
&
chip_details
::
rows
)
.
def_readwrite
(
"rows"
,
&
chip_details
::
rows
)
.
def_readwrite
(
"cols"
,
&
chip_details
::
cols
);
.
def_readwrite
(
"cols"
,
&
chip_details
::
cols
);
{
typedef
std
::
vector
<
chip_details
>
type
;
py
::
bind_vector
<
type
>
(
m
,
"chip_detailss"
,
"An array of chip_details objects."
)
.
def
(
"extend"
,
extend_vector_with_python_list
<
type
>
);
}
m
.
def
(
"extract_image_chip"
,
&
py_extract_image_chip
<
uint8_t
>
,
py
::
arg
(
"img"
),
py
::
arg
(
"chip_location"
));
m
.
def
(
"extract_image_chip"
,
&
py_extract_image_chip
<
uint8_t
>
,
py
::
arg
(
"img"
),
py
::
arg
(
"chip_location"
));
m
.
def
(
"extract_image_chip"
,
&
py_extract_image_chip
<
uint16_t
>
,
py
::
arg
(
"img"
),
py
::
arg
(
"chip_location"
));
m
.
def
(
"extract_image_chip"
,
&
py_extract_image_chip
<
uint16_t
>
,
py
::
arg
(
"img"
),
py
::
arg
(
"chip_location"
));
...
@@ -447,6 +452,19 @@ ensures \n\
...
@@ -447,6 +452,19 @@ ensures \n\
!*/
!*/
);
);
m
.
def
(
"get_face_chip_details"
,
static_cast
<
chip_details
(
*
)(
const
full_object_detection
&
,
const
unsigned
long
,
const
double
)
>
(
&
get_face_chip_details
),
py
::
arg
(
"det"
),
py
::
arg
(
"size"
)
=
200
,
py
::
arg
(
"padding"
)
=
0.2
,
"Given a full_object_detection det, returns a chip_details object which can be
\n
\
used to extract an image of given size and padding."
);
m
.
def
(
"get_face_chip_details"
,
static_cast
<
std
::
vector
<
chip_details
>
(
*
)(
const
std
::
vector
<
full_object_detection
>&
,
const
unsigned
long
,
const
double
)
>
(
&
get_face_chip_details
),
py
::
arg
(
"dets"
),
py
::
arg
(
"size"
)
=
200
,
py
::
arg
(
"padding"
)
=
0.2
,
"Given a list of full_object_detection dets, returns a chip_details object which can be
\n
\
used to extract an image of given size and padding."
);
}
}
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
...
...
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