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
18083851
Commit
18083851
authored
Oct 08, 2011
by
Davis King
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing requirement to the equalize_histogram() and get_histogram() routines.
parent
7abc94b2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
0 deletions
+8
-0
equalize_histogram.h
dlib/image_transforms/equalize_histogram.h
+6
-0
equalize_histogram_abstract.h
dlib/image_transforms/equalize_histogram_abstract.h
+2
-0
No files found.
dlib/image_transforms/equalize_histogram.h
View file @
18083851
...
...
@@ -27,6 +27,9 @@ namespace dlib
{
COMPILE_TIME_ASSERT
(
pixel_traits
<
typename
in_image_type
::
type
>::
is_unsigned
==
true
);
typedef
typename
pixel_traits
<
typename
in_image_type
::
type
>::
basic_pixel_type
in_image_basic_pixel_type
;
COMPILE_TIME_ASSERT
(
sizeof
(
in_image_basic_pixel_type
)
<
sizeof
(
long
));
// make sure hist is the right size
if
(
R
==
1
)
hist
.
set_size
(
1
,
pixel_traits
<
typename
in_image_type
::
type
>::
max
()
+
1
);
...
...
@@ -64,6 +67,9 @@ namespace dlib
COMPILE_TIME_ASSERT
(
pixel_traits
<
typename
in_image_type
::
type
>::
is_unsigned
==
true
);
COMPILE_TIME_ASSERT
(
pixel_traits
<
typename
out_image_type
::
type
>::
is_unsigned
==
true
);
typedef
typename
pixel_traits
<
typename
in_image_type
::
type
>::
basic_pixel_type
in_image_basic_pixel_type
;
COMPILE_TIME_ASSERT
(
sizeof
(
in_image_basic_pixel_type
)
<
sizeof
(
long
));
typedef
typename
in_image_type
::
type
in_pixel_type
;
typedef
typename
out_image_type
::
type
out_pixel_type
;
...
...
dlib/image_transforms/equalize_histogram_abstract.h
View file @
18083851
...
...
@@ -27,6 +27,7 @@ namespace dlib
- pixel_traits<typename out_image_type::type>::has_alpha == false
- pixel_traits<typename in_image_type::type>::is_unsigned == true
- pixel_traits<typename out_image_type::type>::is_unsigned == true
- pixel_traits<typename in_image_type::type>::max() < std::numeric_limits<long>::max()
ensures
- #out_img == the histogram equalized version of in_img
- #out_img.nc() == in_img.nc()
...
...
@@ -49,6 +50,7 @@ namespace dlib
requires
- in_image_type == is an implementation of array2d/array2d_kernel_abstract.h
- pixel_traits<typename in_image_type::type>::is_unsigned == true
- pixel_traits<typename in_image_type::type>::max() < std::numeric_limits<long>::max()
- hist must be capable of representing a column vector of length
pixel_traits<typename in_image_type>::max(). I.e. if R and C are nonzero
then they must be values that don't conflict with the previous sentence.
...
...
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