Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression in Kinetic with OpenCV 3.3 #17

Open
tfoote opened this issue Nov 15, 2017 · 8 comments
Open

Regression in Kinetic with OpenCV 3.3 #17

tfoote opened this issue Nov 15, 2017 · 8 comments

Comments

@tfoote
Copy link

tfoote commented Nov 15, 2017

Re: ros-infrastructure/rep#140 @vrabaud @mikaelarguedas FYI

http://build.ros.org/view/Kbin_uX64/job/Kbin_uX64__bag_tools__ubuntu_xenial_amd64__binary/25/console

00:04:39.904 In file included from /opt/ros/kinetic/include/opencv-3.3.1/opencv2/core.hpp:59:0,
00:04:39.904                  from /opt/ros/kinetic/include/opencv-3.3.1/opencv2/core/core.hpp:48,
00:04:39.904                  from /opt/ros/kinetic/include/image_proc/processor.h:37,
00:04:39.904                  from /opt/ros/kinetic/include/stereo_image_proc/processor.h:37,
00:04:39.904                  from /tmp/binarydeb/ros-kinetic-bag-tools-0.0.3/src/process_stereo.cpp:34:
00:04:39.904 /opt/ros/kinetic/include/opencv-3.3.1/opencv2/core/mat.hpp: In instantiation of ‘class cv::Mat_<unsigned int>’:
00:04:39.904 /opt/ros/kinetic/include/stereo_image_proc/processor.h:180:30:   required from here
00:04:39.904 /opt/ros/kinetic/include/opencv-3.3.1/opencv2/core/mat.hpp:2150:50: error: no type named ‘channel_type’ in ‘class cv::DataType<unsigned int>’
00:04:39.904      typedef typename DataType<_Tp>::channel_type channel_type;
00:04:39.904     
@miquelmassot
Copy link
Contributor

Thanks for reporting, I'll take a look into it.

@miquelmassot
Copy link
Contributor

@tfoote I can't see the issue here. In case you know, please shed some light.

@tfoote
Copy link
Author

tfoote commented Nov 29, 2017

I think that the underlying issue is that it does not have a channel type unsigned int defined https://github.com/ros-gbp/opencv3-release/blob/debian/kinetic/xenial/opencv3/modules/core/include/opencv2/core/traits.hpp

There appears to be an option OPENCV_TRAITS_ENABLE_DEPRECATED to enable deprecated functionality to do most datatypes: https://github.com/ros-gbp/opencv3-release/blob/debian/kinetic/xenial/opencv3/modules/core/include/opencv2/core/traits.hpp#L115

This flag looks new. Perhaps we need to turn it back on for Kinetic. @vrabaud

@miquelmassot
Copy link
Contributor

Looks like there is no cv::Mat_<uint32_t>, from here:
http://docs.ros.org/kinetic/api/stereo_image_proc/html/c++/processor_8h_source.html#l00180
There are 8bit and 16bit unsigned int, but no 32bit.

@miquelmassot
Copy link
Contributor

miquelmassot commented Nov 30, 2017

Issue here: opencv/opencv#7599
Is it possible to change stereo_image_proc speckle removal to use signed 32bit integers instead?

@MyNameIsCosmo
Copy link

Is there any update to this?

@jj-tetraquark
Copy link

I am also experiencing this in ROS kinetic. The problem, as others have noted, is due to image_proc and stereo_image_proc packages using deprecated cv matrix types. However I did find a workaround.

Adding
#define OPENCV_TRAITS_ENABLE_DEPRECATED

to the top of extract_images.cpp, extract_stereo_images.cpp and process_stereo.cpp will allow bag_tools to build.

It's a little bit hacky but this might be an acceptable solution for ROS Kinetic. I don't know if this reliance on deprecated OpenCV types for image_proc stereo_image_proc is present in ROS Hydro and beyond.

@ziyanghong
Copy link

@jonnydark Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants