Updating CSI camera frame is very slow using OpenGL ES 2.0 or 3.0

I’m using dragon board 410c with MIPI Adapter Mezzanine (Board and Camera bundle) to connect OV5645 camera to it. (operating system is debian 16.06)

I developed the application to read the camera frame (camera format=UYVY, res=1920*1080) in c language and transfer it to gpu to render it (using opengl es 2.0 or 3.0)
everything is working fine but it is very slow (2 frame per second)

After digging in the program ,I found the bottle neck(it’s transferring frame from cpu to gpu
(using glTexImage2D or glTexSubImage2D) ,which takes 380ms to 390ms for every frame.

so My question is how I can improve transferring data from cpu to gpu in dragon board
I appreciate any guide or help
thanx , Ali
I will put the whole application on my github very soon for more details

I checked a few articles, they were suggesting to use Pixel Buffer Object (PBO) to improve performance.
I tried , it improved the loading camera frame from 390 ms to 370 ms which is far away from what is acceptable.

I believe something is really wrong, any help would be useful

I’m not sure with this much delay to copy camera frame to opengl texture, Can we ever use Dragon board 410c for any computer vision project?

The only solution that I can think of for eliminating this delay is to memory mapping, I mean mapping the camera frame memory to opengl texture object memory (it’s called Shared Virtual Memory) , Does anyone has such an experience, or Does anyone know how we can modify any opengl es function?


unfortunately i don’t have much time to look into the details, but i recommend you have a look at Gstreamer ‘glimagesink’ plugin, i know for sure that

gst-launch-1.0 v4l2src ! glimagesink

would work very well, and renders the images from Camera into an X window (at the proper speed).