The Following 8 Users Say Thank You to Copernicus For This Useful Post: | ||
![]() |
2015-01-09
, 00:24
|
|
Posts: 1,986 |
Thanked: 7,698 times |
Joined on Dec 2010
@ Dayton, Ohio
|
#2
|
The Following 7 Users Say Thank You to Copernicus For This Useful Post: | ||
![]() |
2015-01-09
, 08:31
|
|
Posts: 1,986 |
Thanked: 7,698 times |
Joined on Dec 2010
@ Dayton, Ohio
|
#3
|
The Following 7 Users Say Thank You to Copernicus For This Useful Post: | ||
![]() |
2015-01-09
, 11:05
|
|
Posts: 5,028 |
Thanked: 8,613 times |
Joined on Mar 2011
|
#4
|
I should note that, when you provide a focus value that is far away from the current value (say, 200 or more points distant), the camera makes an audible "click" noise as it changes the focus. I don't know if this is standard, but it kind of makes me nervous!For now, I'm first querying the current focus value (via VIDIOC_G_CTRL), and then incrementing (or decrementing) it stepwise by small amounts.
I haven't found any yet, but are there any reports out there of damaging the N900 camera by trying to change focus too quickly?
EDIT: Aha, yeah, this is definitely a problem: Bug 9085. Long story short, Maemo's camera focus driver moves the focus too quickly, and therefore can damage the camera. So, best to never assign values to V4L2_CID_FOCUS_ABSOLUTE that vary significantly from the current value.
Also, I should note that after closing my app, I can hear the camera make that clicking noise; so, it seems that you'll also need to reset the focus back to its original state (carefully!) before letting go control of the camera, if you're playing with manual focus.
The Following 5 Users Say Thank You to Estel For This Useful Post: | ||
I've been playing around with the N900 camera a bit, and wanted to manually control its focus. I have the Video4Linux interface to do it (using the V4L2_CID_FOCUS_ABSOLUTE control), which takes an integer value; but I'm not certain what values are valid. I took a look at the "lfocus" app's source code, and that seems to indicate that valid values are in the range 0 - 1023; however, I can't seem to find confirmation of that anywhere else.
So, questions: is this the best way to manually set the camera's focus? Are these the correct values? And (most importantly), am I likely to damage something if I set a value outside of the supported range?
Thanks!