Discussion Board

Page 2 of 2 FirstFirst 12
Results 16 to 19 of 19
  1. #16
    Super Contributor
    Join Date
    Mar 2009

    Re: AR applications on N900 (OpenCV, Gstreamer, QGLWidget)

    Quote Originally Posted by zr_yao View Post
    I'm a bit confused here, The package in post #1 and #2 use gles2, I add port of gles1 for convenience, why you say port to gles2? if you just mean to write the drawbackground() function in gles2, then it should be trival but I did not do it since again I use gles1.

    In my case my N900 by default use gles2, so I can run i.e. hellogl_es2, not hellogl_es1, by reinstall my own build of qtgl I revert it to gles1 and did my work there, I lose performance in fact, so I suggest you to use DistanceQt (the original package in this thread)directly from gles2. I did porting simply avoid the shader programming that I'm too lazy to learn.

    Hope that helps
    BR/ zr_yao
    What we said is that the following code:
    glBegin (GL_POINTS);
      for (i = 0; i < ret_num_corners; i ++){
         glVertex2f (result[i].x, result[i].y);
    glEnd ();
    cannot be built in Maemo since it's OpenGL and not OpenGL ES2. I was not talking about DistanceQt.

  2. #17
    Super Contributor
    Join Date
    Mar 2009

    Re: AR applications on N900 (OpenCV, Gstreamer, QGLWidget)

    Quote Originally Posted by Dorfmeister View Post
    Oh, dear. I really got confused - thanks for clarifying the matter. I bought the book you recommended and will dive into it soon. However, I'm still confused that my conventional OpenGL approach to plot points didn't work out. If anybody should know right away what mistake I made in my attempt and how to draw points from an array properly (probably drawLine methods), a short hint would be appreciated. Otherwise I'll try to figure it out myself as soon as I find time.

    Best regards,
    I think that's a very good book. Code you wrote won't work in OpenGL because glBegin/XXX/glEnd has been dropped in OpenGL ES 2.
    With the new framework you have to:
    1) Define a fragment shader
    2) Define a vertex shader
    3) create a shader program, attach the fragment and the vertex shader to it
    4) link the program

    As you can see you have 4 steps more than in the convetional OpenGL.
    And actually you have to run glDrawArrays to draw primitives.

    Take a look to the first example in the book.
    You can easily embed the gles2 code in Qt using QGLWidget

  3. #18
    Regular Contributor
    Join Date
    Nov 2009

    Re: AR applications on N900 (OpenCV, Gstreamer, QGLWidget)

    Quote Originally Posted by zr_yao View Post
    to use opencv you can simple use cvcapture to get the camera frame, it in fact in turn use its own gstreamer library built in the highgui library, so Opencv help to wrap the gstreamer pipeline for you already.

    That says if you like to incooperate your opencv into the DistanceQt, you can strip away all the gstreamer pipeline codes. I would guess the performance should be the same as Klen's version (I have not done any test) but use your own pipeline gives a lot more flexibility.
    I have tried both the camera capture apps with gstreamer and Opencv, which uses cvCapture function. I could feel that the playback of the camera capture is much more fluent than the OpenCV one. So I wonder using the pipeline created by my own will make the image processing more robust.

    PS: Klen's example doesn't show us how to combine Gstreamer with Opencv, but it's a good tutorial teaching how to use Gstreamer + OpenGL ES + Qt.

  4. #19
    Registered User
    Join Date
    Dec 2009

    Re: AR applications on N900 (OpenCV, Gstreamer, QGLWidget)

    Anyone knows how to install opencv on an N950 ? The opencv packages are not in the default repositories, any help ?

Similar Threads

  1. how to list installed applications in N900?
    By trandinhduy in forum Nokia N9
    Replies: 3
    Last Post: 2010-05-10, 14:53
  2. Applications crashing in Cingular-branded 6682. Feedback appreciated.
    By Razor1973 in forum General Development Questions
    Replies: 3
    Last Post: 2006-01-27, 13:11

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts