[meta-freescale] Using OpenCV and OpenGL together

Marek Vasut marek.vasut at gmail.com
Wed Dec 18 09:49:24 PST 2013


On Wednesday, December 11, 2013 at 03:18:33 PM, Fikret Alim wrote:
> Hello,
> 
> 
> 
> I am trying to use OpenCV and OpenGL together for some image processing
> tasks. I have already run OpenCV examples on IMX6, I can also compile and
> run the examples under gpu sdk of Freescale with X11, but when I try to use
> them together I have some problems.
> 
> 
> 
> Actually, what I am trying to make has already been done by Freescale
> 
> http://imxcv.blogspot.com/2012/03/gesture-recognition-on-imx6.html
> 
> http://cache.freescale.com/files/32bit/doc/app_note/AN4629.pdf
> 
> 
> 
> I have tried many times by using these examples in order to create a simple
> working binary, but unfortunately I could not achieve that. I have attached
> one of my trials (the source code, Makefile and the binary). I have
> modified the 06_Texturing example given under GLES2_0 folder of gpu sdk. I
> have compiled it without any problem, but when I load the binary to IMX6
> board and run the example, I see a black cube rotating.

Your texturing is broken, right ?

> I am waiting for
> the video instead of black screen. I have attached the output of the
> screen, also. If I add an imshow function after I get the image from the
> camera, I can see it without any problem. But when it is used by OpenGL, I
> can only see black screen as I said.

The examples are broken, they don't check GL errors etc. Find attached patch, it 
should give you an idea how to fix your glplane.cpp in the examples.

glEGLImageTargetTexture2DOES() usually returns GL error because the fragment 
shader is completely bonkers.

Best regards,
Marek Vasut
-------------- next part --------------
A non-text attachment was scrubbed...
Name: glplane.cpp.diff
Type: text/x-patch
Size: 4562 bytes
Desc: not available
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20131218/7c93759b/attachment.bin>


More information about the meta-freescale mailing list