Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

failing to build opencv with opengl

Hello, I am following this script by JK Jung for installing opencv in Jetson Nano, just disabling qtand including opencv_contrib. Even though I build it with -D WITH_OPENGL=ON , After generating config, I am getting this

GUI: GTK+: YES (ver 3.22.30)
GThread : YES (ver 2.56.4)

GtkGlExt: NO
OpenGL support: NO
VTK support: NO

Is there any other way of building opencv with opengl support.

How ever when I did:

glxinfo | grep "OpenGL version"

OpenGL version string: 4.6.0 NVIDIA 32.1.0

glxinfo | grep rendering

direct rendering: Yes

GL_NV_path_rendering, GL_NV_path_rendering_shared_edge, GL_NV_path_rendering, GL_NV_path_rendering_shared_edge, GL_NV_packed_float_linear, GL_NV_path_rendering, GL_NV_path_rendering_shared_edge, GL_NV_pixel_buffer_object,

But still when I am building opencv with opengl, it shows -- GUI: -- GTK+: YES (ver 3.22.30)

-- GThread : YES (ver 2.56.4)

-- GtkGlExt: NO

-- OpenGL support: NO

-- VTK support: NO

I am using the following patch as suggested in that article,

  1. --- cuda_gl_interop.h.bak 2019-05-14 13:22:48.260006308 +0800
  2. +++ cuda_gl_interop.h 2019-05-14 13:42:50.488005850 +0800
  3. @@ -58,13 +58,13 @@
    1. #else /* __APPLE__ */
    1. -#if defined(__arm__) || defined(__aarch64__)
  4. -#ifndef GL_VERSION
  5. -#error Please include the appropriate gl headers before including cuda_gl_interop.h
  6. -#endif
  7. -#else
  8. +//#if defined(__arm__) || defined(__aarch64__)
  9. +//#ifndef GL_VERSION
  10. +//#error Please include the appropriate gl headers before including cuda_gl_interop.h
  11. +//#endif
  12. +//#else
  13. #include <gl gl.h="">
  14. -#endif
  15. +//#endif
    1. #endif /* __APPLE__ */

Every thing is building well, I am just stuck on this part, Any help ??