OpenGL, openCV, compression and streaming


I’m actually doing my master’ thesis and I’d be very gratefull if someone can help me! Hope you understand what I mean…!

My task is to implement a parking assistant for an elctric car. There will be a camera in the back of the car which sends a video to a Car-PC (Win7, Intel i5). On this PC I have to process the video, draw some trajectories in it which depend on the actual steering angle, and finally encode the frames with ffmpeg and send it to an IPad in the front of the car via WLAN which streams the video via html5. So this is the plan… :wink:

Now I have some questions:
I capture my USB-cam with opencv, which already works. After that I will draw the trajectories with OpenGL in the video and compress it with ffmpeg.

Is it possible to do that with OpenGL??
Does anybody have experiences with this stuff? Or does anybody know a better/easier way?

Thanks for your help!

Totally doable.
But I am not sure if OpenGL is really useful.
If you wan tot draw simple lines and polygons, OpenCV can do that, unless you need fancy stuff.
You just have to transform the 3D points into 2D projections, and this is a simple projection matrix multiplication.

ZBuffer is right. If you just need lines and circles use OpenCV and keep all your drawing on RAM and that way you can send it directly to ffmpeg. If you draw with opengl, all the drawing it’s going to be on graphic RAM and read it back for encoding can be a bottleneck.
Do you have a project page?, it sounds very interesting my friend :).
One suggestion: Have you consider using lib x264 for encoding?, beacuse according to VLAN page looks very appropiate for realtime encoding, and the h.264 format is definetly supported on iPad.



Thanks a lot for your replys!
I wanted to use OpenGl because I thought that it would be faster.
But I will try to do the drawings with openCV. Is there a function in openCV to do the transformation 2D->3D or do I have to do it by hand?

I also will use the h.264 format. Thanks RGHP!
Sorry, I don’t have a project page yet.