Hi Erwan, Could you please do a reply to on the original thread in future, so that people following the thread can view all the posts in sequence - this post starts a new thread so looses the continuity.
As for your explanation, I'm afraid it fill in a few missing pieces in the jigsaw, but also leaves many more answered. Rather than write pseudo code please just post your segments of your code itself. You mention embedded use of the viewer, but embedded in what? Do you explictly specify single threaded? The call to image->dirty() is suspicious - this shouldn't be required and suggests that something else is wrong with your setup. Your call to updateTraversal() is also superfluous as frame() calls updateTraversal(). Robert. On Mon, Mar 9, 2009 at 1:46 PM, Erwan Bigorgne <[email protected]> wrote: > > >>How are you setting up your scene + viewer to >>render to the image? > > basically : > > mesh (readnodefile) -> PAT (internal) -> PAT (external) > ------------------> Rootnode -> viewer > |_____> > MyCam _____________| > > |_____> Depth Map (osg::Image) > > >>Is your rendering just for the purpose of >>generating an osg::Image as output? > > Actually, I just need a depth map, so the image is the only output for the > "osg part" > >>How you are testing the results >>of the image? > > my eyes (considering the next answer) > >> What threading model have you used? > no thread I think... this basic osg structure is "embedded" and called once > at each iteration : > > something like : > mp_ExternalPAT->setPosition > mp_ExternalPAT->setAttitude > mp_Image->dirty(); > m_Viewer.updateTraversal(); > m_Viewer.frame(); > > ---->access to the current Depth Map (osg::Image attached to the camera) > > >>As a general note, can you do the processing in shaders instead on the >>CPU? Avoiding the readback from the GPU to main memory can be a big >>save in performance. > > Although i handle a little Comp.Vision, I 'm really newborn in Comp Graph > area. > Are you telling me that if i'd define a chain camera -> texture -> image, my > depth map would be would be computed by the CPU? > > If not, what I have to do ? > > erwan > > > > > > Robert. > > On Mon, Mar 9, 2009 at 12:52 PM, Erwan Bigorgne > > <[email protected]> wrote: >> Hello, > >> I'm currently using (and learning) osg in order to manage an implicite 3D- >> model in an computer vision task. >> for that purpose, i need to compute a reliable depth map, that i intend to >> update at each step of the algorithm. >> I've almost reach that goal, but sometimes, the generated osg::Image (i.e. >> the depth map) is either corrupt (two geometrical states of the model are >> partially rendered), or just not updated at all. >> osg::Image->dirty() makes things better but not perfect. >> Any Idea about what i should do next or about what I should care? > >> thanks, > >> (btw, excuse my poor english) > >> _______________________________________________ >> osg-users mailing list >> [email protected] >>http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph... > > _______________________________________________ > osg-users mailing list > [email protected]http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph... > > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > > _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

