Re: [linux-v4l] Some questions about v4l2 exposure control on camera device

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

 



Hi DongSoo,

On Wed, 7 Jan 2009 13:38:56 +0900
"DongSoo Kim" <dongsoo.kim@xxxxxxxxx> wrote:

> Hello V4L2 people.
> 
> I'm working on camera device drivers over 5M pixel and made drivers
> based on V4L2 API.
> 
> Actually I'm still working on it.

Good to hear!

> By the way, I have some questions in exposure control.
> 
> If my guess is right, V4L2_CID_EXPOSURE_* CIDs are what I'm looking for.
> 
> Control factors that I intend to handle for exposure are like following.
> 
>   1. Shutter speed
>   2. Iris (F-number)
>   3. ISO(sensor gain)
> 
> And found out using V4L2_CID_EXPOSURE_AUTO I could change exposure mode.
> 
> But here is the thing.
> 
> What should I supposed to do if I need to control iris F-number when I
> set V4L2_EXPOSURE_MANUAL or V4L2_EXPOSURE_APARTURE_PRIORITY?
> 
> I see that it is possible to control shutter speed using
> V4L2_CID_EXPOSURE_ABSOLUTE but what can I do for iris? cannot find
> out.
> 
> And one more thing.
> 
> If I set exposure mode to V4L2_EXPOSURE_MANUAL, it means that it is
> necessary to control in manual iris, shutter, and even ISO sometimes.
> 
> According to videodev2.h I guess we have only
> V4L2_CID_EXPOSURE_ABSOLUTE to control shutter speed.
> 
> Is there any cool way to set in manual way with shutter speed, iris,
> and even ISO at once?
> 
> If there is no way, how about making a new API for that?
> 
> At any rate, I need an API for exposure (a exposure like a real
> camera...shutter, iris things) so... I think I've gotta make something
> for that.
> 
> If somebody is working on it, can we discuss together about this
> issue? If you don't mind.

The proper places for such discussions is at linux-media ML. Since this is a
new list, it may be useful to copy also the previous development tree
(video4linux-list@xxxxxxxxxx). 

What happens with V4L2 API is that it is improved as new needs come (e.g. when
a new GPL driver requiring the new features is requested to be merged upstream).

Currently, most of V4L2_CID ioctls that affect cameras were conceived in order
to support webcams. As such, I'm sure that you'll find some missing features
that could be required for more sophisticated cameras.

As you've seen, we currently have only this to control the exposure:

#define V4L2_CID_EXPOSURE_AUTO                  (V4L2_CID_CAMERA_CLASS_BASE+1)
enum  v4l2_exposure_auto_type {
        V4L2_EXPOSURE_AUTO = 0,
        V4L2_EXPOSURE_MANUAL = 1,
        V4L2_EXPOSURE_SHUTTER_PRIORITY = 2,
        V4L2_EXPOSURE_APERTURE_PRIORITY = 3
};
#define V4L2_CID_EXPOSURE_ABSOLUTE              (V4L2_CID_CAMERA_CLASS_BASE+2)

This allows one manual adjustment, in order to control exposure time, a default
automatic mode, and two "programmed" automatic modes.

To get a full control of the iris, adjusting things like iso, apperture and
exposure time, we'll need to extend the API.

The way new API changes work is:

You should do a proposal at linux-media ML. People will review it and comment.
You should also propose the changes for the V4L2 API documentation.

After all guys being happy with your proposal, the API changes will be merged
at the development tree (and later at upstream kernel) together with your driver.

Cheers,
Mauro
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[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