<div dir="ltr"><div>Dear Marek,</div><div> </div><div>Thank you for your answer,</div><div> </div><div>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:</div>
<div> </div><div>I have only moved the following two lines from PlaneCreateTex function to PlaneSetTex function.</div><div> </div><div> glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);<br> glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);</div>
<div> </div><div>Then, PlaneSetTex function will be;</div><div> </div><div>void PlaneSetTex (Mat texture_data)<br>{<br> cvtColor (texture_data, _texture_data, CV_BGR2RGB); <br> //imshow("_texture_data",_texture_data);<br>
 glBindTexture(GL_TEXTURE_2D, _texture);<br> glTexImage2D (GL_TEXTURE_2D, 0, GL_RGB, 320, 240, 0, GL_RGB, GL_UNSIGNED_BYTE, _texture_data.data);<br> glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);<br> glTexParameterf (GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);<br>
}</div><div> </div><div>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 detection. </div><div> </div><div>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?</div>
<div> </div><div>Thanks&Best Regards,</div><div>Fikret</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Dec 18, 2013 at 8:18 PM, Fabio Estevam <span dir="ltr"><<a href="mailto:festevam@gmail.com" target="_blank">festevam@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Dec 11, 2013 at 12:18 PM, Fikret Alim <<a href="mailto:fikret.alim@gmail.com">fikret.alim@gmail.com</a>> wrote:<br>

> Hello,<br>
><br>
><br>
><br>
> I am trying to use OpenCV and OpenGL together for some image processing<br>
> tasks. I have already run OpenCV examples on IMX6, I can also compile and<br>
> run the examples under gpu sdk of Freescale with X11, but when I try to use<br>
> them together I have some problems.<br>
><br>
><br>
><br>
> Actually, what I am trying to make has already been done by Freescale<br>
><br>
> <a href="http://imxcv.blogspot.com/2012/03/gesture-recognition-on-imx6.html" target="_blank">http://imxcv.blogspot.com/2012/03/gesture-recognition-on-imx6.html</a><br>
<br>
</div>Adding Andre.<br>
<br>
Regards,<br>
<br>
Fabio Estevam<br>
</blockquote></div><br></div>