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
34dc7303
"tools/python/git@developer.sourcefind.cn:OpenDAS/dlib.git" did not exist on "c1f5f32b2a6e8cae263a60609391858608269cbd"
Commit
34dc7303
authored
Dec 22, 2019
by
Davis King
Browse files
Fix opencv version check to work on all opencv versions
parent
131e4598
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletion
+6
-1
dlib/opencv/cv_image.h
dlib/opencv/cv_image.h
+6
-1
No files found.
dlib/opencv/cv_image.h
View file @
34dc7303
...
@@ -34,7 +34,12 @@ namespace dlib
...
@@ -34,7 +34,12 @@ namespace dlib
<<
"
\n\t
img.channels(): "
<<
img
.
channels
()
<<
"
\n\t
img.channels(): "
<<
img
.
channels
()
<<
"
\n\t
img.pixel_traits<pixel_type>::num: "
<<
pixel_traits
<
pixel_type
>::
num
<<
"
\n\t
img.pixel_traits<pixel_type>::num: "
<<
pixel_traits
<
pixel_type
>::
num
);
);
#if CV_VERSION_MAJOR > 3
// Note, do NOT use CV_VERSION_MAJOR because in OpenCV 2 CV_VERSION_MAJOR actually held
// CV_VERSION_MINOR and instead they used CV_VERSION_EPOCH. So for example, in OpenCV
// 2.4.9.1 CV_VERSION_MAJOR==4 and CV_VERSION_EPOCH==2. However, CV_MAJOR_VERSION has always
// (seemingly) held the actual major version number, so we use that to test for the OpenCV major
// version.
#if CV_MAJOR_VERSION > 3
IplImage
temp
=
cvIplImage
(
img
);
IplImage
temp
=
cvIplImage
(
img
);
#else
#else
IplImage
temp
=
img
;
IplImage
temp
=
img
;
...
...
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