[osg-users] Advice on Rendering Streaming video
J.P. Delport
jpdelport at csir.co.za
Thu Jun 26 23:56:12 PDT 2008
Hi,
some code snippets:
spowers at gdrs.com wrote:
> Hey uli,
>
> What do you mean by "getting a nice image from that is a b??ch"? Is the
> image quality reduced?
>
> Not sure what de-bayer algorithm I'm going to use. I have the source for
> one that we have used before but I'm not sure how it will work on a
> shader.
>
> Is there an example of an osg::PixelBufferObject being used to stream to
> an Image?? How is one attached to the image?
_VideoImage[i]->setImage(cameraImageWidth, cameraImageHeight, 1, 1,
GL_LUMINANCE, GL_UNSIGNED_BYTE, gImage[i], osg::Image::NO_DELETE);
_VideoImage[i]->setPixelBufferObject(new
osg::PixelBufferObject(_VideoImage[i].get()));
>
> Also, about the non-power of 2 textures.... can I make the texture
> scaled to the nearest power of two and just modify the texture
> coordinates on the quad? Will doing this avoid the CPU scalling of the
> texture?
I just turn the scaling on CPU off:
_VideoTexture[i]->setImage(_VideoImage[i].get());
_VideoTexture[i]->setResizeNonPowerOfTwoHint(false);
>
>
> -Steve
jp
>
>
> -----Original Message-----
> From: osg-users-bounces at lists.openscenegraph.org
> [mailto:osg-users-bounces at lists.openscenegraph.org] On Behalf Of Ulrich
> Hertlein
> Sent: Wednesday, June 25, 2008 10:19 PM
> To: OpenSceneGraph Users
> Subject: Re: [osg-users] Advice on Rendering Streaming video
>
> spowers at gdrs.com wrote:
>> I've already set up an orthographic2D view that will look at a quad
>> which will display the texture. The shader will then convert the
> texture
>> into RGB and do the whitebalance. I am also able to swap the texture
>> back and forth and maintain decent frame rates but the textures I'm
>> using to test are only 64x64 pixels (tank.rgba and water.rgba) and I'm
>> wondering if it would be too slow (<30fps) to use the same method for
>> 1000x1000 pixel images.
>
> The texture bandwidth isn't likely to be a problem, keep in mind that
> bayer
> images are only 1/3 of an RGB image of the same size.
>
> Things to look out for is to use non-power-of-two textures or texture
> rectangles
> to avoid CPU scaling of the image.
>
> You'll also want to attach a osg::PixelBufferObject to the osg::Image.
>
> Unfortunately getting a nice image from that is a b??ch and the shaders
> can get
> complex pretty fast, the number of texture lookups is probably the most
> expensive op. What de-bayer algorithms are you looking at?
>
> Cheers,
> /uli
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.or
> g
> _______________________________________________
> osg-users mailing list
> osg-users at lists.openscenegraph.org
> http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org
>
--
This message is subject to the CSIR's copyright terms and conditions, e-mail legal notice, and implemented Open Document Format (ODF) standard.
The full disclaimer details can be found at http://www.csir.co.za/disclaimer.html.
This message has been scanned for viruses and dangerous content by MailScanner,
and is believed to be clean. MailScanner thanks Transtec Computers for their support.
More information about the osg-users
mailing list