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
bd2e0bc3
Commit
bd2e0bc3
authored
May 25, 2018
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Made skeleton(), in the python API, return the given image so
you can chain calls easily.
parent
61687a8f
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
4 deletions
+17
-4
image.cpp
tools/python/src/image.cpp
+17
-4
No files found.
tools/python/src/image.cpp
View file @
bd2e0bc3
...
@@ -603,6 +603,16 @@ numpy_image<T> py_hysteresis_threshold2 (
...
@@ -603,6 +603,16 @@ numpy_image<T> py_hysteresis_threshold2 (
// ----------------------------------------------------------------------------------------
// ----------------------------------------------------------------------------------------
numpy_image
<
unsigned
char
>
py_skeleton
(
numpy_image
<
unsigned
char
>&
img
)
{
skeleton
(
img
);
return
img
;
}
// ----------------------------------------------------------------------------------------
void
bind_image_classes
(
py
::
module
&
m
)
void
bind_image_classes
(
py
::
module
&
m
)
{
{
...
@@ -726,12 +736,15 @@ ensures \n\
...
@@ -726,12 +736,15 @@ ensures \n\
- all pixels in img are set to either 255 or 0.
- all pixels in img are set to either 255 or 0.
ensures
ensures
- This function computes the skeletonization of img and stores the result in
- This function computes the skeletonization of img and stores the result in
#img. That is, given a binary image, we progressively thin the binary blobs
img (i.e. it works in place and therefore modifies the supplied img). That
(composed of on_pixel values) until only a single pixel wide skeleton of the
is, given a binary image, we progressively thin the binary blobs (composed of
original blobs remains.
on_pixel values) until only a single pixel wide skeleton of the original
blobs remains.
- Doesn't change the shape or size of img.
- Doesn't change the shape or size of img.
- Returns img. Note that the returned object is the same object as the input
object.
!*/
!*/
m
.
def
(
"skeleton"
,
skeleton
<
numpy_image
<
unsigned
char
>>
,
docs
,
py
::
arg
(
"img"
));
m
.
def
(
"skeleton"
,
py_skeleton
,
docs
,
py
::
arg
(
"img"
));
...
...
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