Problems setting brightness value to a v4l2 stream

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Problems setting brightness value to a v4l2 stream

Steffen Liebscher
Hi guys,

I'm recently having a project running, concerning an application that
aquires images from a video4linux2 source. First of all, I tried both of
following commands:

gst-launch-0.10 videotestsrc ! xvimagesink hue=1000 saturation=1000
brightness=1000
gst-launch-0.10 videotestsrc ! xvimagesink

Here's the URL I took the example from:
http://www.gstreamer.net/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-xvimagesink.html#gst-plugins-base-plugins-xvimagesink.synopsis 


Both images show the exact same image. I tried different values for hue,
saturation and brightness but none of the values I set had any effect to
the output image. Am I getting something wrong here?
Corresponding to these results, any changes concerning hue, saturation
and brightness to my v4l2 parameters, using the gst-launch tool, had any
effect. I also tried both versions, gst-launch and gst-launch-0.10.

Another question I like to ask is: How do I change the brightness value
of my v4l2 stream in my source code? As I understand the gstreamer
pipeline structure, I need an imagesink to aquire an
GstColorBalanceChannel. But if I do so, only my output on screen will be
changed, not my frame object that I can access using my playbin which I
use for further image processing in my application. Is there a way to
set up my video grabber using v4l2 with my desired brightness values?
I've been searching for examples and reading the API reference for the
past two days but I couldn't find any suitable result.

Thanks in advance,

Steffen

------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems setting brightness value to a v4l2 stream

Lukas Ruetz
Hi,

Am Freitag 15 Oktober 2010, um 13:42:13 schrieb Steffen Liebscher:

> Hi guys,
>
> I'm recently having a project running, concerning an application that
> aquires images from a video4linux2 source. First of all, I tried both of
> following commands:
>
> gst-launch-0.10 videotestsrc ! xvimagesink hue=1000 saturation=1000
> brightness=1000
> gst-launch-0.10 videotestsrc ! xvimagesink
>
> Here's the URL I took the example from:
> http://www.gstreamer.net/data/doc/gstreamer/head/gst-plugins-base-plugins/h
> tml/gst-plugins-base-plugins-xvimagesink.html#gst-plugins-base-plugins-xvim
> agesink.synopsis
>
>
> Both images show the exact same image. I tried different values for hue,
> saturation and brightness but none of the values I set had any effect to
> the output image. Am I getting something wrong here?
> Corresponding to these results, any changes concerning hue, saturation
> and brightness to my v4l2 parameters, using the gst-launch tool, had any
> effect. I also tried both versions, gst-launch and gst-launch-0.10.
>
> Another question I like to ask is: How do I change the brightness value
> of my v4l2 stream in my source code? As I understand the gstreamer
> pipeline structure, I need an imagesink to aquire an
> GstColorBalanceChannel. But if I do so, only my output on screen will be
> changed, not my frame object that I can access using my playbin which I
> use for further image processing in my application. Is there a way to
> set up my video grabber using v4l2 with my desired brightness values?
> I've been searching for examples and reading the API reference for the
> past two days but I couldn't find any suitable result.
>
> Thanks in advance,
>
> Steffen

To your last question:
The "videobalance" element can do this for you, what is propably the easiest
way. If you place it after your source-element you get modified frames in your
pipeline.
If you prefer you can also set this values with external tools like dov4l
or v4lctl before starting your pipeline (or directly call the V4L API in
your code).

Greets,
Lukas


------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: Problems setting brightness value to a v4l2 stream

Stefan Sauer
In reply to this post by Steffen Liebscher
Am 15.10.2010 14:42, schrieb Steffen Liebscher:
> Hi guys,
>
> I'm recently having a project running, concerning an application that
> aquires images from a video4linux2 source. First of all, I tried both of
> following commands:
>
> gst-launch-0.10 videotestsrc ! xvimagesink hue=1000 saturation=1000
> brightness=1000
> gst-launch-0.10 videotestsrc ! xvimagesink


with the latest gst-plugin-good you can change those parameters on the source
(if the v4l2-device supports it).

>
> Here's the URL I took the example from:
> http://www.gstreamer.net/data/doc/gstreamer/head/gst-plugins-base-plugins/html/gst-plugins-base-plugins-xvimagesink.html#gst-plugins-base-plugins-xvimagesink.synopsis 
>

check with "xvinfo" that your xvideo adaptor implements "XV_BRIGHTNESS",
"XV_HUE", ...

>
> Both images show the exact same image. I tried different values for hue,
> saturation and brightness but none of the values I set had any effect to
> the output image. Am I getting something wrong here?
> Corresponding to these results, any changes concerning hue, saturation
> and brightness to my v4l2 parameters, using the gst-launch tool, had any
> effect. I also tried both versions, gst-launch and gst-launch-0.10.

gst-launch is a wrapper to selectively use gst-launch-0.10 and gst-launch-0.8,
which not matters these days as everyone should use 0.10.

>
> Another question I like to ask is: How do I change the brightness value
> of my v4l2 stream in my source code? As I understand the gstreamer
> pipeline structure, I need an imagesink to aquire an
> GstColorBalanceChannel. But if I do so, only my output on screen will be
> changed, not my frame object that I can access using my playbin which I
> use for further image processing in my application. Is there a way to
> set up my video grabber using v4l2 with my desired brightness values?
> I've been searching for examples and reading the API reference for the
> past two days but I couldn't find any suitable result.

Try using gst-plugins-good from git. As I mentioned above, you can set it
directly on the source. In older versions v4l2src should still implement the
colorbalance interface if your v4l2device has them. Unfortunately the
colorbalance interface cannot be used via gst-launch, so you need to write a
script/app.

Stefan

>
> Thanks in advance,
>
> Steffen
>
> ------------------------------------------------------------------------------
> Download new Adobe(R) Flash(R) Builder(TM) 4
> The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
> Flex(R) Builder(TM)) enable the development of rich applications that run
> across multiple browsers and platforms. Download your free trials today!
> http://p.sf.net/sfu/adobe-dev2dev
> _______________________________________________
> gstreamer-devel mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gstreamer-devel


------------------------------------------------------------------------------
Download new Adobe(R) Flash(R) Builder(TM) 4
The new Adobe(R) Flex(R) 4 and Flash(R) Builder(TM) 4 (formerly
Flex(R) Builder(TM)) enable the development of rich applications that run
across multiple browsers and platforms. Download your free trials today!
http://p.sf.net/sfu/adobe-dev2dev
_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gstreamer-devel