urgent: how to set imageFile to tracker

Community support forum for users of the GPL-licensed osgART Standard Edition v1.0 and proprietary-licensed osgART Professional Edition v1.1
shiragiku
Posts: 2
Joined: Thu May 19, 2011 2:30 am

urgent: how to set imageFile to tracker

Postby shiragiku » Thu May 19, 2011 2:37 am

I do not want to get the image from video by using tracker.setImage(video.get());
however, I need to set a image from a file.
So osg::<ref_ptr>osg::Image image=osgDB::readImageFile("c:\\.....jpg");
tracker.setImage(image.get());
however, it shows the tracker prints the image has imcompartible pixel format.
I have tried several image format: bmp, gif, png. jpg. none of them compartible with the pixel format.
How can I solve the problem?

retrakker
Posts: 125
Joined: Mon Dec 18, 2006 5:00 pm
Contact:

Re: urgent: how to set imageFile to tracker

Postby retrakker » Wed May 25, 2011 7:19 am

Which version of osgART and OpenSceneGraph is that? With 2.0 it should work exactly as you describe.

shiragiku
Posts: 2
Joined: Thu May 19, 2011 2:30 am

Re: urgent: how to set imageFile to tracker

Postby shiragiku » Fri Jun 03, 2011 12:39 am

retrakker wrote:Which version of osgART and OpenSceneGraph is that? With 2.0 it should work exactly as you describe.

i.m using osgart2.0 and the setimage method of tracker print incompatible pixel format when I try to set a image file to it

retrakker
Posts: 125
Joined: Mon Dec 18, 2006 5:00 pm
Contact:

Re: urgent: how to set imageFile to tracker

Postby retrakker » Fri Aug 05, 2011 2:22 pm

Yes, that's possible, because OpenSceneGraph image loaders might load it in a format not working with the tracking module. The ARToolkit Tracker needs an RGB (non-Windows) or BGRA (Windows) format. If you are using ARToolkit the problem is that these are the only formats it understands. We will need to address that issue in a later revision of osgART.


Return to “[ARCHIVED] osgART Standard & Professional Editions”

Who is online

Users browsing this forum: No registered users and 2 guests