Active Topics

 


Reply
Thread Tools
Flandry's Avatar
Posts: 1,559 | Thanked: 1,786 times | Joined on Oct 2009 @ Boston
#11
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.
__________________

Unofficial PR1.3/Meego 1.1 FAQ

***
Classic example of arbitrary Nokia decision making. Couldn't just fallback to the no brainer of tagging with lat/lon if network isn't accessible, could you Nokia?
MAME: an arcade in your pocket
Accelemymote: make your accelerometer more joy-ful
 

The Following User Says Thank You to Flandry For This Useful Post:
Posts: 61 | Thanked: 77 times | Joined on Dec 2009 @ Lancaster
#12
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.

The V4l2ucp looks much more promising.

Thx
 
Posts: 45 | Thanked: 54 times | Joined on Oct 2009 @ Uppsala,Sweden
#13
Originally Posted by klen View Post
The V4l2ucp looks much more promising.
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.

EDIT: Wait, now it works. Strange

Last edited by davost; 2010-01-06 at 20:13.
 
Posts: 61 | Thanked: 77 times | Joined on Dec 2009 @ Lancaster
#14
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.

ID: Control Name: Value
9963776: Brightness:0
9963777: Contrast:16
9963793: Exposure time [us]:33000
9963795: Gain [0.1 EV]:28
9963807: Color Effects:0
10094858: Focus, Absolute:105
10094862: Flash timeout [us]:1000
10094863: Flash intensity:12
10094864: Torch intensity:0
10094865: Indicator intensity:0
10096766: Test pattern mode:0
10096815: Focus ramping time [us]:3200
10096816: Focus ramping mode:2
10096881: Short-circuit fault:0
10096882: Overtemperature fault:0
10096883: Timeout fault:0
10096884: Overvoltage fault:0
10160385: Frame width:1593
10160386: Frame height:504
10160387: Visible width:684
10160388: Visible height:492
10160389: Pixel clock [Hz]:96533333
10160390: Sensitivity:65536
 
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#15
Originally Posted by klen View Post
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:

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).
Unfortunately, that's a License: Nokia thing
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 

The Following 2 Users Say Thank You to attila77 For This Useful Post:
Posts: 45 | Thanked: 54 times | Joined on Oct 2009 @ Uppsala,Sweden
#16
Originally Posted by klen View Post
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
 

The Following 2 Users Say Thank You to davost For This Useful Post:
Posts: 3,319 | Thanked: 5,610 times | Joined on Aug 2008 @ Finland
#17
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
__________________
Blogging about mobile linux - The Penguin Moves!
Maintainer of PyQt (see introduction and docs), AppWatch, QuickBrownFox, etc
 
Posts: 61 | Thanked: 77 times | Joined on Dec 2009 @ Lancaster
#18
Great stuff guys!

Now I have all pieces of the puzzle for my app .

Many thanks to you and the rest of the community.

Cheers,
Klen
 
Posts: 5 | Thanked: 1 time | Joined on Apr 2010
#19
¿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?

Thanks in advance!
 
Posts: 82 | Thanked: 214 times | Joined on Jan 2010 @ Cape town
#20
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?
 

The Following 2 Users Say Thank You to cb22 For This Useful Post:
Reply


 
Forum Jump


All times are GMT. The time now is 21:38.