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

Raspistill options and EXIF data are inconsistent #83

Closed
lingon opened this issue Sep 8, 2013 · 7 comments
Closed

Raspistill options and EXIF data are inconsistent #83

lingon opened this issue Sep 8, 2013 · 7 comments

Comments

@lingon
Copy link

lingon commented Sep 8, 2013

I'm testing a camera module on a Raspberry Pi Model A running with the latest available kernel
uname -a
Linux rpicam2 3.6.11+ #538 PREEMPT Fri Aug 30 20:42:08 BST 2013 armv6l GNU/Linux
vcgencmd version
Aug 30 2013 20:54:23
Copyright (c) 2012 Broadcom
version 634f1745cbadf6eb4d37135af471cbc7801eb60f (clean) (release)

I tested some of the raspistill options and found the following:

  1. Option -mm metering mode gives in the EXIF data
    -mm average: Metering Mode: center weight
    -mm spot: Metering Mode: spot
    -mm backlit: Metering Mode: other
    -mm matrix: Metering Mode: average
    This is a bit confusing in my opinion.

  2. Option -awb auto whitebalance does not seem to do anything and EXIF always reports
    Whitebalance : Auto

  3. Option -ex does change the picture but EXIF always reports
    Exposure : aperture priority (semi-auto)

  4. Option -ev does not seem to do anything and is not reported in the EXIF data.

It would be nice if these issues could be improved on in raspistill.

@ghost ghost assigned JamesH65 Sep 8, 2013
@JamesH65
Copy link
Collaborator

  1. Odd one. Trawling through the code this appears to be because we have to translate from MMAL to OpenMAX to ISP to EXIF and over that path, meaning are slightly different. Not sure there is anything I can do to change things here.

  2. I need to update ISP code - presently it always writes Auto. In factthe only two options are Auto and manual - that particular exif tag doesn't support identification of the type of manual WB used.

    1. Still investigating

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
@Ruffio
Copy link

Ruffio commented Jun 26, 2015

@JamesH65 how is the investigation going?

@Ruffio
Copy link

Ruffio commented Jul 30, 2016

@JamesH65 I can see that you are assigned to this issue since 2013. How is the investigation going?

@6by9
Copy link
Contributor

6by9 commented Jul 31, 2016

(I find http://www.awaresystems.be/imaging/tiff/tifftags/ the most useful resource for EXIF tags)

  1. The mapping came out of discussion between the imaging experts and the OpenMaxIL spec. IIRC IL and EXIF do not agree on the definition of the settings.

  2. As James has said, there are only settings for auto and manual - http://www.awaresystems.be/imaging/tiff/tifftags/privateifd/exif/whitebalance.html. You can now select manual white balance, but the gain in adding that to the EXIF is minimal as it is not a regular feature.

  3. The ExposureProgram tag has options of
    0 = Not defined
    1 = Manual
    2 = Normal program
    3 = Aperture priority
    4 = Shutter priority
    5 = Creative program (biased toward depth of field)
    6 = Action program (biased toward fast shutter speed)
    7 = Portrait mode (for closeup photos with the background out of focus)
    8 = Landscape mode (for landscape photos with the background in focus)
    That is not the same function as -ex provides.
    ExposureProgram is set to 3 as a default and will not change unless overridden by the application. 2/Normal program might be a better default, but it's not going to reflect the exposure mode as you're expecting. Won't change.

  4. -ev does adjust the Exposure Value (target luminance), but is in steps of 1/6 of a stop which wasn't well documented. The value could be written in to ExposureBiasValue, either by a firmware mod to make it automagic, or by making the client write the extra EXIF value. Currently the tag just isn't written at all.
    (It's also not stored other than after a conversion to gain inside the GPU code, so I'd stuff it into the raspistill app - a task anyone can do).

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
@JamesH65
Copy link
Collaborator

JamesH65 commented Dec 5, 2017

Is this still an issue?

@6by9
Copy link
Contributor

6by9 commented Dec 7, 2017

userland/interface/mmal/openmaxil/ isn't used within the firmware.

@JamesH65
Copy link
Collaborator

JamesH65 commented Dec 3, 2018

Closing due to lack of activity. Please request to be reopened if you feel this issue is still relevant.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants