Embedding OpenCV Viz3d and Qt

asked 2015-03-10 11:18:39 -0500

johnmarinelli gravatar image

I'd like to have an OpenCv Viz3d window in my Qt application. I'm aware that there are other similar questions, but those are in regards to OpenCV's 2d imaging capabilities.

So far, my approach has been to create a class that inherits from QWidget and cv::viz::Viz3d. However, I can't figure out how to override cv::viz::Viz3d's paint event to display inside of the GUI rather than its own window.

If there's a way to retrieve a cv::Mat from cv::viz::Viz3d, that could potentially work as well; however, it doesn't seeem like I can get a cv::Mat from Viz3d.

edit retag flag offensive close merge delete

Comments

I don't know it either, but I think that you could use a QOpenGLWidget to display your 3D data (like in 2D case where you have to convert your Mat image to QPixmap). In this case you should implement the display function yourself. Check some tutorials, it's very intuitive.

kbarni gravatar imagekbarni ( 2015-03-11 08:01:48 -0500 )edit

@johnmarinelli. Did you find solution to embend Viz3d windows to qt gui based on widgets?

Bleach gravatar imageBleach ( 2018-08-30 06:15:22 -0500 )edit

@Bleach, please do not post answers here, if you have a question or comment, thank you.

berak gravatar imageberak ( 2018-08-30 06:22:57 -0500 )edit