Skip to content

Squeezing the Meta-Data out of an MPO file

by werner on January 6th, 2010

I bought myself a Fujifilm Finepix Real 3D W1 camera for christmas. 🙂

This camera shoots stereo pictures and stores them in a Multi-Picture (MPO) file.

Fuji did  a very fine job by standardizing and publishing the details of this format with the Japanese Camera & Imaging Products association (CIPA).

MPO files created by my camera consist of two concatenated JFIF streams. The meta-data is stored in TIFF Image File Directories (IFD) within APP1- and APP2-segments of the JFIF data streams.

The meta-data consists of Exif data sets and Multi-Picture Format (MPF) data sets.   Exif provides information about the camera settings and the picture taking conditions. The MPF data set is crucial for interpreting the contents of the MPO file. It tells as how the images in the file are related to each other.

Not all important meta data for viewing stereo images is stored in the MPF data set though. Some additional data is provided by the Fujifilm MakerNote of the second image.

The important parts of the MPF data for stereo image viewing are:

  • Number of images. Tells us how many images are in the MPO file (2 for a stereo image).
  • MP Entry Information. Contains information about each image in the MPO file. Such as MP Type Code which is set to  MultiFrameDisparityImage for a stereo image.
  • Convergence Angle. Is the angle formed by the line of sights between the base viewpoint and the current viewpoint. On the Fujifilm camera, the left eye is the base viewpoint and the right eye has a convergence angle of 2.2 degrees.
  • Baseline Length. The distance between the two camera eyes. This is 7.7 cm on the Fujfilm camera. The average human eye distance is around 6.3 cm.

Important meta data for stereo image viewing stored in the Fujifilm MakerNote of the second image:

  • Parallax. Controls the horizontal overlap of the two images. This is used to adjust the 3D effect of an image displayed on the monitor on the back of the camera. The value stored in the MakerNote is -2 times the value displayed by the camera.

The picture below shows how I worked my way through the file format. In the window at the top you can see a stereo picture I shot with the camera. The second window shows a binary representation of the Exif data. The Exif IFD is marked in yellow and green. The window below shows the parsed structures of the IFD. The fourth window shows the parsed information from the MPF data set. The MPTypeCode states that I shot a Multi-Frame Disparity Image, which is – well – the technical term for a stereo image.

Exif-Data shown in MultiShow

I have integrated the code into MultiShow. If you have MPO files of your own, you can use it to inspect their meta-data.

Now, what is left to do, is shooting more pictures, and trying to make something useful with all this data…

Update 2010-7-7: Added information about the important bits of data for stereo viewing.

From → Image & Video, Java

  1. Bill Costa permalink

    Werner — thank you for adding the MPO features to your MultiShow application. I am impressed with the native look-and-feel of your application on the Mac; I wouldn’t have guessed that was possible using Java. Guess I should look more closely at Java since I’m basically opposed to creating applications that run on only one platform, but I still don’t want to give up the native goodness of the host UI.

  2. Hi Bill,

    Thank you for your kind words about MultiShow.
    You may also want to take a look at my CubeTwister application, which uses more Mac-specific user interface components than MultiShow.

    Both applications are written in Java and make use of the following Mac-specific libraries and tools:

    – Apple JAR bundler
    – Apple Java Extensions (EAWT)
    – Quaqua Look and Feel (written by myself)
    – JHotDraw 7 application framework (also made by me)

    I believe Java is a very good option for cross-platform applications, if one is ready to invest some extra work into platform-integration. Of course, Java is not the only good solution. Qt and Flex are good solutions too.

Comments are closed.