Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

raspicam --ev -10..10 is not EV #34

Closed
towolf opened this issue May 21, 2013 · 13 comments
Closed

raspicam --ev -10..10 is not EV #34

towolf opened this issue May 21, 2013 · 13 comments
Assignees

Comments

@towolf
Copy link
Contributor

towolf commented May 21, 2013

I don’t know what this is doing but what it is setting is not EV, i.e., log_2 scale. It’s quite small increments. Please clarify

@ghost ghost assigned JamesH65 May 22, 2013
@JamesH65
Copy link
Collaborator

I don't believe EV has to be measured in particular increments. We simply specify it from -10 to +10, giving a finer grained measure than, for example, 3rds, or halves. You can assume (I think) that -10 would be, for example, max -ve on a actual camera (independent on whether the camera is set up for EV increments in 1/3rds or 1/2's), and +10 will be the max positive EV.

@towolf
Copy link
Contributor Author

towolf commented May 30, 2013

The definition of Ev is that an increment of 1 corresponds to 1 stop.

For example, if you want to lower ISO from 400 to 100 (-2 stops) and have a correct exposure you would have to compensate with Ev +2, which ought to increase exposure time by 2 stops since aperture is fixed.

So the question is, does the camera use a conventional exposure calculation internally, and there is some evidence that it does.

@JamesH65
Copy link
Collaborator

The camera code need to be suitable for multiple customer, who often require different EV increments. My DSLR allows you to specify the increment. This means that the range needs to be fine grained enough to cope with that. So our -10 to +10 corresponds, I think, to to -3 to +3 stops. I'll need to double check the code.

@6by9
Copy link
Contributor

6by9 commented Mar 26, 2014

The command-line/MMAL value for EV is counting in 1/6ths of a stop. Therefore ev=6 would be +1 stop. The range is up to +/- 24, or +/- 4 stops.

I would update the API, that would break any app that is expecting the current behaviour.
(I can switch MMAL to take either an int32 or a MMAL_RATIONAL_T, as the difference can be deduced by the different size of the parameter structure - I'll add it to the to-do list, but it won't change raspistill).

@waveform80
Copy link
Contributor

Ah, sounds like this might be related to an issue I've run across in picamera before: waveform80/picamera#71 - when setting certain +ve EV values, if you subsequently query the EV value it comes back as the value specified minus one.

However, an eagle eyed user noticed (in the linked issue) that values where %3==0, always come back correct. Sounds like there's some sort of floor rounding going on (which would explain why the -ve values always work).

@6by9
Copy link
Contributor

6by9 commented Mar 26, 2014

Groan. That rounding bug was fixed on our main dev branch a year ago, but never got pulled to the Pi tree. Time for another cherry-pick.

@towolf
Copy link
Contributor Author

towolf commented Mar 26, 2014

Thanks for the info.

If you don’t want to change the range mapping, please at least document the step size of 1/6 EV in the help and the usage string of raspi{vid,still}.

@6by9
Copy link
Contributor

6by9 commented Mar 26, 2014

Firmware change for fixing the EV rounding has been pushed internally. It will be released when Dom does his next release cycle.
I'll leave the help text update to JamesH.

popcornmix pushed a commit to raspberrypi/firmware that referenced this issue Mar 27, 2014
See: raspberrypi/linux#550

kernel: V4L2: Add manual white balance control

firmware: audio_mixer: Fix bug that loses second channel with 8-bit input
See: http://forum.xbmc.org/showthread.php?tid=184866&pid=1664162#pid1664162

firmware: MMAL: Add parameter to enable SEI on the encoder.
See: raspberrypi/userland#144

firmware: MMAL: Correct rounding for EV steps
See: raspberrypi/userland#34

firmware: camera: Correct EXIF handling to always update
See: raspberrypi/userland#83
popcornmix pushed a commit to Hexxeh/rpi-firmware that referenced this issue Mar 27, 2014
See: raspberrypi/linux#550

kernel: V4L2: Add manual white balance control

firmware: audio_mixer: Fix bug that loses second channel with 8-bit input
See: http://forum.xbmc.org/showthread.php?tid=184866&pid=1664162#pid1664162

firmware: MMAL: Add parameter to enable SEI on the encoder.
See: raspberrypi/userland#144

firmware: MMAL: Correct rounding for EV steps
See: raspberrypi/userland#34

firmware: camera: Correct EXIF handling to always update
See: raspberrypi/userland#83
@6by9
Copy link
Contributor

6by9 commented Mar 27, 2014

Firmware change for fixing the EV rounding has been released with commit raspberrypi/firmware@9c7c2cd
MMAL_PARAMETER_EXPOSURE_COMP will now take either a MMAL_PARAMETER_INT32_T or MMAL_PARAMETER_RATIONAL_T, and do the appropriate thing based on the size of the parameter.

I'll leave the help text update to JamesH.

@Ruffio
Copy link

Ruffio commented Jun 26, 2015

@towolf is this still an issue?

6by9 added a commit to 6by9/userland that referenced this issue Jan 5, 2016
raspberrypi#34
Step size is 1/6ths to support either 1/3rds or 1/2 steps.
6by9 added a commit to 6by9/userland that referenced this issue Jan 5, 2016
raspberrypi#34
Step size is 1/6ths to support either 1/3rds or 1/2 steps.
popcornmix added a commit that referenced this issue Jan 7, 2016
@6by9
Copy link
Contributor

6by9 commented Jan 7, 2016

PR #279 now merged which adds help text stating that EV is in steps of 1/6 stop.
Please close unless you think there is something further to do.

TheSin- pushed a commit to TheSin-/userland that referenced this issue Jan 7, 2016
raspberrypi#34
Step size is 1/6ths to support either 1/3rds or 1/2 steps.
@Ruffio
Copy link

Ruffio commented Jun 27, 2016

@towolf is this still an issue? It looks like it has been solved.

@towolf
Copy link
Contributor Author

towolf commented Jun 27, 2016

No

@towolf towolf closed this as completed Jun 27, 2016
neuschaefer pushed a commit to neuschaefer/raspi-binary-firmware that referenced this issue Feb 27, 2017
See: raspberrypi/linux#550

kernel: V4L2: Add manual white balance control

firmware: audio_mixer: Fix bug that loses second channel with 8-bit input
See: http://forum.xbmc.org/showthread.php?tid=184866&pid=1664162#pid1664162

firmware: MMAL: Add parameter to enable SEI on the encoder.
See: raspberrypi/userland#144

firmware: MMAL: Correct rounding for EV steps
See: raspberrypi/userland#34

firmware: camera: Correct EXIF handling to always update
See: raspberrypi/userland#83
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants