Ask Your Question
1

OpenCV Error: No OpenGL support

asked 2013-04-02 14:23:42 -0600

bccopencv gravatar image

I installed OpenCV using the OpenCV_2_4_4.exe and the OpenCV-2.4.4-CUDA-vc10 and then placed these extracted files under C:\opencv. I also have CUDA4.2 installed on my system.

I then tried running the sample program under C:\opencv\samples\alpha_comp.cpp and it crashes at line 19 -namedWindow("Result", WINDOW_OPENGL); giving the following error-

OpenCV Error: No OpenGL support (Library was built without OpenGL support)

Since I did not build OpenCV and was using the pre-built libraries I am not sure how to handle this error. I tried defining HAVE_OPENGL in the alpha_comp.cpp file but that did not help.

Thanks for any help in advance.

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
3

answered 2013-04-03 01:06:24 -0600

Vladislav Vinogradov gravatar image

OpenCV pre-built libraries were built without OpenGL support.

To enable OpenGL support you need to build OpenCV from sources (instructions) and turn on WITH_OPENGL flag in CMake configuration.

edit flag offensive delete link more

Comments

1

Thanks for the answer! I built the OpenCV from sources and that built fine. I built it with gpu and OpenGL support

Now, when I try to run the brox_optical_flow.cpp from the samples by creating a project for it, MS Visual Studio throws an error stating -

"Unable to start application 'c:..\opencv.2.exe' This application has failed to start because the application configuration is incorrect. Review the manifest files for possible errors. Reinstalling the application may fix this problem...."

Are you aware of such an issue? Or would this perhaps be a Visual Studio / VC++ related error?

bccopencv gravatar imagebccopencv ( 2013-04-05 13:40:23 -0600 )edit

Hi. I re-build opencv WITH_OPENGL=ON and I have the same error. Actually I can run OPENGL but not with opencv.

Morin gravatar imageMorin ( 2019-08-08 16:12:22 -0600 )edit

Question Tools

Stats

Asked: 2013-04-02 14:23:42 -0600

Seen: 7,818 times

Last updated: Apr 03 '13