viz3d error "Debug assertion failed"

asked 2018-01-21 14:06:26 -0600

stefan gravatar image

Dear reader,

I'm trying to build the tutorial examples related to OpenCV Viz.

I have Win7 x64 + Opencv3.3 + viz7.1 + Visual Studio 2015 Community.

I use this dummy code:

#include <opencv2/viz.hpp>
using namespace cv;
int main()
{
    viz::Viz3d myWindow("Viz Demo");    
    cv::viz::WLine line1(cv::Point3d(0., 0., 0.), cv::Point3d(0., 0., 1.), cv::viz::Color::green());
    myWindow.showWidget("Line1", line1);

    while (!myWindow.wasStopped())
        myWindow.spinOnce(1, true);     
    return 0;
}

Everythings works well in "Debug", but as soon as I select "Release" and run the code, the viz window appears and then when I push a key, for example 'q', I get an error: image description

Any idea what is wrong and how to write clean code which does not end up with error?

Thank you

edit retag flag offensive close merge delete

Comments

Please remove screenshot and put error in text.

If it works in debug check that in release all libs are in release too.

LBerger gravatar imageLBerger ( 2018-01-21 14:10:50 -0600 )edit