[meta-freescale] Using OpenCV and OpenGL together

Fikret Alim fikret.alim at gmail.com
Wed Dec 18 23:39:51 PST 2013

Dear Marek,

Thank you for your answer,

I will check the file you sent. I have solved the problem in a different
way, I am not sure if this is the correct way or not, but at least it
worked after this change:

I have only moved the following two lines from PlaneCreateTex function to
PlaneSetTex function.


Then, PlaneSetTex function will be;

void PlaneSetTex (Mat texture_data)
 cvtColor (texture_data, _texture_data, CV_BGR2RGB);
 glBindTexture(GL_TEXTURE_2D, _texture);
 glTexImage2D (GL_TEXTURE_2D, 0, GL_RGB, 320, 240, 0, GL_RGB,
GL_UNSIGNED_BYTE, _texture_data.data);

With this change, now I can run Andre's gesture recognition example, and
also I have tried some GLSL shaders for image processing like sobel

But, let me ask a different question: Is there a limition for the webcam
resolution? I can only use 320x240 resolution for both Andre's example and
gpu sdk examples. If I set a higher resolution, then I get segmentation
fault error. I am sure that my webcam supports higher resolutions, since I
can get video with openCV at higher resolutions. What can be wrong? Is
there a limitation, or do I need to perform some other operations for
higher resolutions?

Thanks&Best Regards,

On Wed, Dec 18, 2013 at 8:18 PM, Fabio Estevam <festevam at gmail.com> wrote:

> On Wed, Dec 11, 2013 at 12:18 PM, Fikret Alim <fikret.alim at gmail.com>
> 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
> Adding Andre.
> Regards,
> Fabio Estevam
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-freescale/attachments/20131219/d982dc7f/attachment.html>

More information about the meta-freescale mailing list