Debayering (bayer 2 rgb) with opengl glshader gst-1.5.1

Hamdi Rakkez hamdi.rakez.selotec at gmail.com
Wed Aug 19 04:26:22 PDT 2015


Great explanation Christian.

   - Actually I am using only the pixel shader file.
   - The source is successfully entered from gstreamer to the shader.
   - SourceSize and first red are in the vertex shader which I am not using.

Question :

   - Is it necessary, for the debayering to work, to use both files (vertex
   and pixel shader). If yes, is it possible to have them both in one file so
   I can deal with input parameters statically.

thanks.

Best,
Hamdi


On Wed, Aug 19, 2015 at 12:15 PM, Christian Sell <christian at gsvitec.com>
wrote:

> Hello,
>
> I am not sure how the glshader element works, but I do know how that
> shader program works, because we are successfully using it. Actually, we
> are using the GL variant for client-side debayering (outside of gstreamer,
> immediately before the data is displayed) and the CL variant for debayering
> inside the gstreamer pipeline with a custom element.
>
> There are 2 things I am doubtful with regard to the glshader element:
>
> 1. the debayering code consists of a vertex and a pixel (aka fragment)
> shader. How are these integrated into glshader?
> 2. the code expects several parameters to be set from the outside, namely
> "source" (input buffer), "sourceSize" (an array with values width, height,
> 1/width, 1/height) and "firstRed" (a 0/1 combination describing the bayer
> pattern in use)
>
> I dont see how these prerequistes would be met by glshader..
>
> regards,
> Chris
>
>
> Hamdi Rakkez <hamdi.rakez.selotec at gmail.com> hat am 19. August 2015 um
> 12:06 geschrieben:
>
>
> Hi,
>
> I am trying to use *shaders* to decode *bayer* images to *RGB* images.
>
> I don't want to use the *bayer2rgb* element.
>
> So, according to this *http://graphics.cs.williams.edu/papers/BayerJGT09/#shaders
> <http://graphics.cs.williams.edu/papers/BayerJGT09/#shaders>* it is
> possible to user gl shaders for demosaicing a bayer image.
>
> I have used the shader file along with glshader in a pipeline like this :
>
>
> ​gst-launch-1.0 -v filesrc location=bayer_file.avi ! avidemux ! ​glupload
> ! glshader location=bayerRGB.GLSL ! glimagesink​
>
>
>
> But, I have a very noisy result, and an image of the result is attached to
> this Email.​
>
> Any ideas why such behavior.
>
> Thank you
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
> _______________________________________________
> gstreamer-devel mailing list
> gstreamer-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20150819/05da6869/attachment.html>


More information about the gstreamer-devel mailing list