First time here? Check out the FAQ!
answered 2013-08-10 03:11:41 -0600
you need to call
namedWindow("test",CV_WINDOW_OPENGL);
before imshow()