Re: [PATCH v3 1/2] v4l: Add camera voice coil lens control class, current control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi!

> > > Nevertheless, V4L2_CID_FOCUS_ABSOLUTE
> > > is documented as follows (emphasis mine):
> > > 
> > > 	This control sets the *focal point* of the camera to the specified
> > > 	position. The unit is undefined. Positive values set the focus
> > > 	closer to the camera, negative values towards infinity.
> > > 
> > > What you control in voice coil devices is current (in Ampères) and the
> > > current only has a relatively loose relation to the focal point.
> > 
> > The real problem I'm seeing here is that this control is already
> > used by voice coil motor (VCM). Several UVC-based Logitech cameras
> > come with VCM, like their QuickCam Pro-series webcams:
> > 
> > 	https://secure.logitech.com/en-hk/articles/3231
> > 
> > The voice coil can be seen on this picture:
> > 	https://photo.stackexchange.com/questions/48678/can-i-modify-a-logitech-c615-webcam-for-infinity-focus
> 
> There may be voice coil lens implementations that are indirectly controlled
> through this control. Those are hardware solutions that have been taken in
> UVC webcams, for instance. The UVC standard itself uses millimeters.
> 
> Lens systems based on voice coils generally cannot focus at a given exact
> distance for they have no concept of focussing at a particular distance.
> Instead, an auto focus algorithm analyses the image data (or statistics of
> image data) to control the lens --- in other words, to set current, not
> distance.

Well, you are right that voice coil does not focus on _exact_
distance. I guess nothing ever focuses on _exact_ distance ;-). (Ok,
voice coils may be worse then other systems.)

> As the auto focus algorithms require both image data (or statistics) and
> access to lens voice coil as well as for algorithmic complexity, they are
> typically implemented in user space.
> 
> In other words, the VOICE_COIL_CURRENT control is thus used by user space to
> implement what the user expects from FOCUS_AUTO control. It could be
> implemented in libv4l2 or a different user space component.
> VOICE_COIL_CURRENT control is not a control which is expected to be used by
> an end user application --- unlike FOCUS_AUTO.

End user application definitely _wants_ to control voice coil control
directly. Original Maemo application has landscape-mode, which
presumably just sets control to infinity. FCam application has full
manual focus. I'm writing SDLcam, it also has manual focus.

N900 camera has depth of field of 2 diopters. That means you can have
everything from 0.5m to infinity in focus... At normal range manual
focus makes a lot of sense. At macro range, yes, autofocus is needed.

Applications want to know focus in diopters... user wants to
know. Even when autofocus is active, it is good to know where the
camera is focused to monitor its progress.

> Additionally, there will be controls related to ringing compensation. The
> user (for an auto focus algorithm) still might want to disable the hardware
> ringing compensation so a menu control would be needed for the purpose.
> That's something that can well be addressed later on, just FYI.

Well, I don't see why we can't add ringing compensation controls to
the FOCUS_ABSOLUTE. Yes, userspace should know that it is the voice
coil. But userspace should be also able to get/set approximate focus
distance (diopters).

									Pavel
-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

Attachment: signature.asc
Description: Digital signature


[Index of Archives]     [Linux Input]     [Video for Linux]     [Gstreamer Embedded]     [Mplayer Users]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]
  Powered by Linux