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
b3178059
Commit
b3178059
authored
May 13, 2018
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added overload of hysteresis_threshold() that uses partition_pixels()
to select thresholds.
parent
e340f1cb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
39 additions
and
0 deletions
+39
-0
thresholding.h
dlib/image_transforms/thresholding.h
+16
-0
thresholding_abstract.h
dlib/image_transforms/thresholding_abstract.h
+23
-0
No files found.
dlib/image_transforms/thresholding.h
View file @
b3178059
...
...
@@ -691,6 +691,22 @@ namespace dlib
}
}
template
<
typename
in_image_type
,
typename
out_image_type
>
void
hysteresis_threshold
(
const
in_image_type
&
in_img
,
out_image_type
&
out_img
)
{
using
basic_pixel_type
=
typename
pixel_traits
<
typename
image_traits
<
in_image_type
>::
pixel_type
>::
basic_pixel_type
;
basic_pixel_type
t1
,
t2
;
partition_pixels
(
in_img
,
t1
,
t2
);
hysteresis_threshold
(
in_img
,
out_img
,
t1
,
t2
);
}
// ----------------------------------------------------------------------------------------
}
...
...
dlib/image_transforms/thresholding_abstract.h
View file @
b3178059
...
...
@@ -167,6 +167,29 @@ namespace dlib
- #out_img.nr() == in_img.nr()
!*/
template
<
typename
in_image_type
,
typename
out_image_type
>
void
hysteresis_threshold
(
const
in_image_type
&
in_img
,
out_image_type
&
out_img
);
/*!
requires
- in_image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- out_image_type == an image object that implements the interface defined in
dlib/image_processing/generic_image.h
- pixel_traits<typename image_traits<out_image_type>::pixel_type>::grayscale == true
- pixel_traits<typename image_traits<in_image_type>::pixel_type>::has_alpha == false
- pixel_traits<typename image_traits<out_image_type>::pixel_type>::has_alpha == false
- is_same_object(in_img, out_img) == false
ensures
- performs: hysteresis_threshold(in_img, out_img, t1, t2) where the thresholds
are first obtained by calling partition_pixels(in_img, t1, t2).
!*/
// ----------------------------------------------------------------------------------------
}
...
...
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