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
083780d9
Commit
083780d9
authored
Apr 13, 2015
by
Davis King
Browse files
Improved assert error message in cv_image's constructor.
parent
7ce411c0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
1 deletion
+7
-1
dlib/opencv/cv_image.h
dlib/opencv/cv_image.h
+7
-1
No files found.
dlib/opencv/cv_image.h
View file @
083780d9
...
@@ -27,7 +27,13 @@ namespace dlib
...
@@ -27,7 +27,13 @@ namespace dlib
{
{
DLIB_CASSERT
(
img
.
depth
()
==
cv
::
DataType
<
typename
pixel_traits
<
pixel_type
>::
basic_pixel_type
>::
depth
&&
DLIB_CASSERT
(
img
.
depth
()
==
cv
::
DataType
<
typename
pixel_traits
<
pixel_type
>::
basic_pixel_type
>::
depth
&&
img
.
channels
()
==
pixel_traits
<
pixel_type
>::
num
,
img
.
channels
()
==
pixel_traits
<
pixel_type
>::
num
,
"The pixel type you gave doesn't match pixel used by the open cv Mat object."
);
"The pixel type you gave doesn't match pixel used by the open cv Mat object."
<<
"
\n\t
img.depth(): "
<<
img
.
depth
()
<<
"
\n\t
img.cv::DataType<typename pixel_traits<pixel_type>::basic_pixel_type>::depth: "
<<
cv
::
DataType
<
typename
pixel_traits
<
pixel_type
>::
basic_pixel_type
>::
depth
<<
"
\n\t
img.channels(): "
<<
img
.
channels
()
<<
"
\n\t
img.pixel_traits<pixel_type>::num: "
<<
pixel_traits
<
pixel_type
>::
num
);
IplImage
temp
=
img
;
IplImage
temp
=
img
;
init
(
&
temp
);
init
(
&
temp
);
}
}
...
...
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