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
3a51de83
Commit
3a51de83
authored
Apr 12, 2013
by
Davis King
Browse files
Clarified some requires clauses
parent
31ae7d58
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
dlib/image_transforms/equalize_histogram.h
dlib/image_transforms/equalize_histogram.h
+2
-2
dlib/image_transforms/equalize_histogram_abstract.h
dlib/image_transforms/equalize_histogram_abstract.h
+2
-2
dlib/image_transforms/thresholding_abstract.h
dlib/image_transforms/thresholding_abstract.h
+4
-3
No files found.
dlib/image_transforms/equalize_histogram.h
View file @
3a51de83
...
@@ -28,7 +28,7 @@ namespace dlib
...
@@ -28,7 +28,7 @@ namespace dlib
COMPILE_TIME_ASSERT
(
pixel_traits
<
typename
in_image_type
::
type
>::
is_unsigned
==
true
);
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
;
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
)
);
COMPILE_TIME_ASSERT
(
sizeof
(
in_image_basic_pixel_type
)
<
=
2
);
// make sure hist is the right size
// make sure hist is the right size
if
(
R
==
1
)
if
(
R
==
1
)
...
@@ -68,7 +68,7 @@ namespace dlib
...
@@ -68,7 +68,7 @@ namespace dlib
COMPILE_TIME_ASSERT
(
pixel_traits
<
typename
out_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
;
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
)
);
COMPILE_TIME_ASSERT
(
sizeof
(
in_image_basic_pixel_type
)
<
=
2
);
typedef
typename
in_image_type
::
type
in_pixel_type
;
typedef
typename
in_image_type
::
type
in_pixel_type
;
typedef
typename
out_image_type
::
type
out_pixel_type
;
typedef
typename
out_image_type
::
type
out_pixel_type
;
...
...
dlib/image_transforms/equalize_histogram_abstract.h
View file @
3a51de83
...
@@ -27,7 +27,7 @@ namespace dlib
...
@@ -27,7 +27,7 @@ namespace dlib
- pixel_traits<typename out_image_type::type>::has_alpha == false
- pixel_traits<typename out_image_type::type>::has_alpha == false
- pixel_traits<typename in_image_type::type>::is_unsigned == true
- pixel_traits<typename in_image_type::type>::is_unsigned == true
- pixel_traits<typename out_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()
- pixel_traits<typename in_image_type::type>::max() <
= 65535
ensures
ensures
- #out_img == the histogram equalized version of in_img
- #out_img == the histogram equalized version of in_img
- #out_img.nc() == in_img.nc()
- #out_img.nc() == in_img.nc()
...
@@ -63,7 +63,7 @@ namespace dlib
...
@@ -63,7 +63,7 @@ namespace dlib
requires
requires
- in_image_type == is an implementation of array2d/array2d_kernel_abstract.h
- 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>::is_unsigned == true
- pixel_traits<typename in_image_type::type>::max() <
std::numeric_limits<long>::max()
- pixel_traits<typename in_image_type::type>::max() <
= 65535
- hist must be capable of representing a column vector of length
- 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
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.
then they must be values that don't conflict with the previous sentence.
...
...
dlib/image_transforms/thresholding_abstract.h
View file @
3a51de83
...
@@ -67,10 +67,11 @@ namespace dlib
...
@@ -67,10 +67,11 @@ namespace dlib
requires
requires
- in_image_type == is an implementation of array2d/array2d_kernel_abstract.h
- in_image_type == is an implementation of array2d/array2d_kernel_abstract.h
- out_image_type == is an implementation of array2d/array2d_kernel_abstract.h
- out_image_type == is an implementation of array2d/array2d_kernel_abstract.h
- pixel_traits<typename
out
_image_type::type>::
grayscale == true
- pixel_traits<typename
in
_image_type::type>::
max() <= 65535
- pixel_traits<typename in_image_type::type>::has_alpha == false
- pixel_traits<typename in_image_type::type>::has_alpha == false
- pixel_traits<typename out_image_type::type>::has_alpha == false
- pixel_traits<typename in_image_type::type>::is_unsigned == true
- pixel_traits<typename in_image_type::type>::is_unsigned == true
- pixel_traits<typename out_image_type::type>::grayscale == true
- pixel_traits<typename out_image_type::type>::has_alpha == false
- pixel_traits<typename out_image_type::type>::is_unsigned == true
- pixel_traits<typename out_image_type::type>::is_unsigned == true
ensures
ensures
- #out_img == the thresholded version of in_img (in_img is converted to a grayscale
- #out_img == the thresholded version of in_img (in_img is converted to a grayscale
...
...
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