[libcamera-devel] [PATCH 0/3] Initial EXIF metadata support
Umang Jain
email at uajain.com
Mon Aug 24 22:46:53 CEST 2020
Hi all,
This patch series targets adding initial EXIF metadata support
for the frames captured in Android/Libcamera framework.
It is initial in the sense, it adds the base infrastructure for
Exif metadata support via 'libexif' and also encodes a initial
set of metadata tags into the frames.
Testing:
The testing of this work was carried out via vivid pipeline-handler
in conjunction with patch in `cam` using EncoderLibJpeg as the
file sink [1]. That way we could see what EXIF metadata could be written
and inspect that `exif` or `exiv2` commandline tools.
($) ./build/src/cam/cam -c vivid -C5 -F -s pixelformat=NV12
Sample output (1): exif frame-stream0-000000.jpg
EXIF tags in 'frame-stream0-000000.jpg' ('Intel' byte order):
--------------------+----------------------------------------------------------
Tag |Value
--------------------+----------------------------------------------------------
Image Width |1280
Image Length |720
Manufacturer |Libcamera
Model |Camera2111
Orientation |Bottom-left
X-Resolution |72
Y-Resolution |72
Resolution Unit |Inch
Date and Time |Sun Oct 13 07:03:20 734137
YCbCr Positioning |Centered
Exif Version |Exif Version 2.1
Date and Time (Origi|Sun Oct 13 07:03:20 734137
Date and Time (Digit|Sun Oct 13 07:03:20 734137
Components Configura|Y Cb Cr -
FlashPixVersion |FlashPix Version 1.0
Color Space |Internal error (unknown value 65535)
Pixel X Dimension |1280
Pixel Y Dimension |720
Sample output (2): exiv2 frame-stream0-000000.jpg
File name : frame-stream0-000000.jpg
File size : 38787 Bytes
MIME type : image/jpeg
Image size : 1280 x 720
Camera make : Libcamera
Camera model : Camera2111
Image timestamp : Sun Oct 13 07:03:20 734137
Image number :
Exposure time :
Aperture :
Exposure bias :
Flash :
Flash bias :
Focal length :
Subject distance:
ISO speed :
Exposure mode :
Metering mode :
Macro mode :
Image quality :
Exif Resolution : 1280 x 720
White balance :
Thumbnail : None
Copyright :
Exif comment :
There are still a lot of tags that needs to be populated,
that can be built on top of this groundwork.
[1]: https://github.com/kbingham/libcamera/commit/10ed8ec
Kieran Bingham (1):
libcamera: android: Add EXIF infrastructure
Umang Jain (2):
android: jpeg: Pass a Exif object while encoding
android: Support initial set of EXIF metadata tags
src/android/camera_device.cpp | 12 +-
src/android/jpeg/encoder.h | 5 +-
src/android/jpeg/encoder_libjpeg.cpp | 15 +-
src/android/jpeg/encoder_libjpeg.h | 3 +-
src/android/jpeg/exif.cpp | 210 +++++++++++++++++++++++++++
src/android/jpeg/exif.h | 53 +++++++
src/android/meson.build | 2 +
7 files changed, 296 insertions(+), 4 deletions(-)
create mode 100644 src/android/jpeg/exif.cpp
create mode 100644 src/android/jpeg/exif.h
--
2.25.1
More information about the libcamera-devel
mailing list