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
2a9c8923
Commit
2a9c8923
authored
Nov 15, 2014
by
Davis King
Browse files
Fixed a compile time error that prevented auto_threshold_image() from being
used.
parent
9b9afc01
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
3 deletions
+4
-3
dlib/image_transforms/thresholding.h
dlib/image_transforms/thresholding.h
+4
-3
No files found.
dlib/image_transforms/thresholding.h
View file @
2a9c8923
...
@@ -87,11 +87,10 @@ namespace dlib
...
@@ -87,11 +87,10 @@ namespace dlib
COMPILE_TIME_ASSERT
(
pixel_traits
<
typename
image_traits
<
out_image_type
>::
pixel_type
>::
grayscale
);
COMPILE_TIME_ASSERT
(
pixel_traits
<
typename
image_traits
<
out_image_type
>::
pixel_type
>::
grayscale
);
const_image_view
<
in_image_type
>
in_img
(
in_img_
);
image_view
<
out_image_type
>
out_img
(
out_img_
);
image_view
<
out_image_type
>
out_img
(
out_img_
);
// if there isn't any input image then don't do anything
// if there isn't any input image then don't do anything
if
(
i
n_img
.
size
(
)
==
0
)
if
(
i
mage_size
(
in_img_
)
==
0
)
{
{
out_img
.
clear
();
out_img
.
clear
();
return
;
return
;
...
@@ -100,7 +99,9 @@ namespace dlib
...
@@ -100,7 +99,9 @@ namespace dlib
unsigned
long
thresh
;
unsigned
long
thresh
;
// find the threshold we should use
// find the threshold we should use
matrix
<
unsigned
long
,
1
>
hist
;
matrix
<
unsigned
long
,
1
>
hist
;
get_histogram
(
in_img
,
hist
);
get_histogram
(
in_img_
,
hist
);
const_image_view
<
in_image_type
>
in_img
(
in_img_
);
// Start our two means (a and b) out at the ends of the histogram
// Start our two means (a and b) out at the ends of the histogram
long
a
=
0
;
long
a
=
0
;
...
...
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