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
PCL 1.7.2 breaks OpenCV 3.1 highgui #1519
Comments
PCL has an image viewer class, I'd recommend using it. Otherwise you are mixing different visualization frameworks (vtk from PCL side and whatever from OpenCV side), which never goes well. |
thanks for fast reply. On the other hand, I found many tutorials and examples, which use both frameworks. PCL is used for 3D PointClouds and OpenCV for 2D images. OpenCV should only be used to display the input image, which was caputered by the camera. |
I'm using PCL master and opencv 3.1.0 and getting no problem for now. Perhaps disabling Complete stack traces would be great to track down the issue. |
Your example code works fine for me on osx 10.10.4. It showed two windows without segfaults. EDIT: I'm using vtk trunk (v7.1), but as far as I remember, it also worked with vtk v6.3.0. |
opencv without viz also doesn't work. stack trace isn't that maningful, but here it is:
|
I wonder where Qt meta types come from? |
The window backend used by OpenCV is Qt. |
OpenCV is compiled with QT support. But I compiled it now without Qt and then it works. thanks |
Hi,
Can you give me some advice? Thanks a lot! |
Hi,
I want to use PCL and OpenCV in one project. PCL is used to visualize the point clouds, which I calculate with OpenCV.
But I also want to show my input images using OpenCV with its highgui.
But this is not working with PCL 1.7.2 and OpenCV 3.1
If PCL is used in my code I can't call namedWindow, imshow or waitKey from OpenCV anymore. The application terminates before executing any other line of code. There is no error message or something else.
If I debug this, I see in the stack trace, that there is an access to adress 0x0.
If either the PCL code is commented out or the OpenCV highgui the application works. Otherwise not.
Example code:
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <iostream>
#include <boost/thread/thread.hpp>
#include <pcl/common/common_headers.h>
#include <pcl/visualization/pcl_visualizer.h>
int main(int argc, char* argv[])
{
std::cout << "Started" << std::endl;
boost::shared_ptr<pcl::visualization::PCLVisualizer> viewer(new pcl::visualization::PCLVisualizer("Viewer"));
cv::namedWindow("image", cv::WINDOW_AUTOSIZE);
cv::Mat img = cv::Mat::eye(640, 480, CV_64FC1);
cv::imshow("image", img);
cv::waitKey(0);
return 0;
}
Thanks for help
(tested on Ubuntu 14.04)
The text was updated successfully, but these errors were encountered: