CameraBin start-capture triggers auto-focus, making captured image blurry

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

CameraBin start-capture triggers auto-focus, making captured image blurry

Robert Hailey

Greetings.

I'm trying to understand what is causing an auto-focus event in
response to the CameraBin receiving a 'start-capture' (or
'capture-start') signal.

Fedora 22
gstreamer1-1.4.5-1.fc22.x86_64
Ziggi HD Plus Document Camera
kernel-4.3.6-201.fc22.x86_64

Does anyone know off-hand:

* if-or-where there is an intentional focus being done in gstreamer,

* if-or-where there is any re-initialization needed during still image
  capture (e.g. when handling different view-finder & capture output
  pixel sizes), or

* if this (or a similar) issue has been addressed between 1.4.x and
  1.6.x ?

Thanks in advance!

--
Robert Hailey


More details/narrative from cheese-list:
https://mail.gnome.org/archives/cheese-list/2016-March/msg00000.html

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: CameraBin start-capture triggers auto-focus, making captured image blurry

Dimitrios Katsaros
Hello,

The camerabin in its self does not have support for autofocus, at least none that I am aware of. Are you using v4l2src with wrappercamerabinsrc? If that is the case I would suspect that the problem is renegotiation on capture. When a new capture is performed, the pipeline is dynamically changed to feed the image output path. That procs a renegotiaion. If the caps on the video/image output are different than the viewfinder, a new set_fmt is performed in v4l2, which resets the v4l2 controls and in turn resets the focus. to verify/fix that you can do something like:

  g_object_set (camerabin_object,
    "viewfinder-caps", gst_caps_from_string(caps),
    "image-capture-caps", gst_caps_from_string(caps),
    "video-capture-caps", gst_caps_from_string(caps),
    NULL);


Make sure the caps string is the same for all 3.


Dimitrios

On Wed, Mar 16, 2016 at 5:07 PM, Robert Hailey <[hidden email]> wrote:

Greetings.

I'm trying to understand what is causing an auto-focus event in
response to the CameraBin receiving a 'start-capture' (or
'capture-start') signal.

Fedora 22
gstreamer1-1.4.5-1.fc22.x86_64
Ziggi HD Plus Document Camera
kernel-4.3.6-201.fc22.x86_64

Does anyone know off-hand:

* if-or-where there is an intentional focus being done in gstreamer,

* if-or-where there is any re-initialization needed during still image
  capture (e.g. when handling different view-finder & capture output
  pixel sizes), or

* if this (or a similar) issue has been addressed between 1.4.x and
  1.6.x ?

Thanks in advance!

--
Robert Hailey


More details/narrative from cheese-list:
https://mail.gnome.org/archives/cheese-list/2016-March/msg00000.html

_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel
Reply | Threaded
Open this post in threaded view
|

Re: CameraBin start-capture triggers auto-focus, making captured image blurry

Robert Hailey
On Fri, 18 Mar 2016 09:10:43 +0100
Dimitrios Katsaros <[hidden email]> wrote:

> Hello,
>
> The camerabin in its self does not have support for autofocus, at
> least none that I am aware of. Are you using v4l2src with
> wrappercamerabinsrc? If that is the case I would suspect that the
> problem is renegotiation on capture. When a new capture is performed,
> the pipeline is dynamically changed to feed the image output path.
> That procs a renegotiaion. If the caps on the video/image output are
> different than the viewfinder, a new set_fmt is performed in v4l2,
> which resets the v4l2 controls and in turn resets the focus. to
> verify/fix that you can do something like:
>
>   g_object_set (camerabin_object,
>     "viewfinder-caps", gst_caps_from_string(caps),
>     "image-capture-caps", gst_caps_from_string(caps),
>     "video-capture-caps", gst_caps_from_string(caps),
>     NULL);
>
>
> Make sure the caps string is the same for all 3.

Thank you, Dimitrios... I think that was *THE* missing key to my
understanding. I think that I will be able to come up with a solution
because of your help/time.

--
Robert Hailey


--
Robert Hailey


_______________________________________________
gstreamer-devel mailing list
[hidden email]
https://lists.freedesktop.org/mailman/listinfo/gstreamer-devel