[maemo-developers] N900 camera control - focus movement, white balance, auto-focus calcs, etc.

From: Simon Pickering S.G.Pickering at bath.ac.uk
Date: Tue Sep 22 12:50:39 EEST 2009
Hello everyone,

I'm looking into how to use the camera on the N900 when it is released,
I would like to be able to write some code in Python if at all possible,
but I guess I can move my app back to C if needs must.

Anyway, the camera will need to be focused, so I have been trawling
through the kernel code and gstreamer source to try and work out how to
do this, but I thought I may as well just ask as it may save me some
time.

I see there are ioctls for the ad5820 focus piezo controller which could
be used (though I've not looked to see if there's a dev entry for that
device yet), and Qole pointed out that the /dev/video0 device reports
that it has v4l2 extended controls, including the ability to move the
focus (though no mention of autofocus there afaict).

I understand I should be able to adjust the focus through a gstreamer
element such as camerabin or the photography interfaces, but ideally I'd
like to do this from Python. Is v4l2camsrc linked to these btw?

The other option (which means I don't have to wrap one of the gstreamer
elements for Python) is to use the v4l2 extended control command ioctls
directly on the /dev/video0 device. I'm assuming that should be possible
anyway, certainly the Python part looks pretty straight forward (see
e.g. FMRadio.py).

While we're on the subject, I see some header files for what I presume
is a Ti binary blob named isp_*.h. isp_af.h contains header information
for autofocus functionality afaict. Is this functionality exposed to
userspace anywhere?

Looking through the package list, I came across a libgdigicam, might
this be involved...?

Anyway I'm going to keep experimenting with the above, but thought I'd
see if anyone else has any bright ideas.

Cheers,


Simon


More information about the maemo-developers mailing list