Sorry Attila, i was just checking to see that the source wasn't in the source package as he had said, and typed "apt-get source mirror" in the SDK, which most likely grabbed the -devel version.
Silly mistake. I missed the part that I am looking for phython script and was searching for "src" dir with ".c" and ".h" files instead. The sources are there, but are not the way forward for me.
Yeah,
Atleast I can control the focus with the ioctls. Dont know the units though. Something in the range of 550 seams to be focusing very close, whereas something like 150 means infinite.
But when I try to set V4L2_CID_EXPOSURE nothing happens. I tried fiddling with the V4L2_CID_EXPOSURE_AUTO control as you suggested but the driver doesnt seem to support this.
Davost, thank you very much for your post. I am finally getting somwhere.
Now I also manage to gain access to the V4L2_CID_FOCUS_ABSOLUTE value and can manually control the focus of the camera.
The aim of my application is to only access the value of V4L2_CID_FOCUS_ABSOLUTE that is set by the auto focusing feature. If I use native camera app to focus on different objects, V4L2_CID_FOCUS_ABSOLUTE parameter changes.
Now I would like to write my own application that auto focuses on an object like the native camera. I managed to open a GStreamer pipeline, but can not activate auto focusing option.
The Question:
Does the native camera app implement the auto focusing algorithms, or, there is a library or hardware option that enables auto focus functionality?
Bellow are all the values that are supported by the N900 main camera.
The Question:
Does the native camera app implement the auto focusing algorithms, or, there is a library or hardware option that enables auto focus functionality?
That would be the camera daemon. As per the dev guide:
Originally Posted by
The camera daemon is holding imaging specific extensions to the v4l2 interface. Specifically it runs the so called 3A algorithms – AutoFocus (AF), AutoWhitebalance (AWB) and AutoExposure (AE).
Davost, thank you very much for your post.
Now I would like to write my own application that auto focuses on an object like the native camera. I managed to open a GStreamer pipeline, but can not activate auto focusing option.
The Question:
Does the native camera app implement the auto focusing algorithms, or, there is a library or hardware option that enables auto focus functionality?
I'm following a very similar path as you are. My purpose is to make HDR pics. When I was researching this I finally found out that the mbarcode does autofocus using the gstreamer photography api. I guess this is also the proper way to do exposure control.
Example on how to set up the pipe line and do autofocus in:
maemo-barcode/trunk/maemo-barcode/camera_n900.c
Yes, gstreamer is the proper way, but there are a few things that are supported on lower levels but are not implemented in gstreamer. Apparently, they take patches
¿Do you know how to obtain the focal distance to the objetive? or in other case, how can be changed the zone wheres is the autofocus applied? For example, If I want to focus one object in the corner that isn't in the center or isn't the nearest object, how can we do that?
I've searched on the web, but I can't seem to find any existing free software that could be used as a base for contrast-based autodetection.
Basically, if you can detect the total contrast of a scene, you play with the focus until you get the contrast to a maximum. That is your focused point. you could do selective focus by using a bounding box around the area you wish to focus...
Does anyone know of a library that supports getting the overall image contrast level?