M43RawAnalyzer

2012-11-30 12:50

M43RawAnalyzer in action

Download M43RawAnalyzer Version 1.0.0


View the Results Spreadsheet


While preparing a blog post about the electronic distortion and CA correction of recent mirrorless cameras in general and m43 in detail I found some interesting articles from people trying to reverse engineer those electronic corrections used by Micro Four Thirds (MFT).

What are those electronic corrections?

  • Part of the standard of Micro Four Thirds are electronic distortion and chromatic aberration (CA) corrections.
  • Most MFT lenses have it, only a small number of lenses do not utilize them.
  • The correction data is embedded in the raw file and used by Adobe Lightroom and Camera Raw, Silkypix, Olympus Studio 2.
  • The correction formula is currently unknown.

When looking at the reverse engineering work it appears only a few people are involved this. This blog post from “Matze” started it for Panasonic cameras, Raphaël Rigo built upon the results and since August 2012 Andrew Johnston is building a plugin for Bibble/AfterShotPro.

Here is the current state of the reverse engineering of the MFT electronic distortion and CA correction is (as far as I was able to find information for):

  • The location of the distortion correction data and possibly also the CA correction data is known for Panasonic raw (*.RW2) files (thanks to Matze and Raphaël).
  • It is currently not clear what the correct formula looks like, as Raphaël has proposed one, but Andrew Johnston “discovered that the algorithm is more complex than we thought, and seems to vary from lens to lens”.
  • The distortion correction data is dependent on the focal length. Images created with the same lens, but at different focal lengths contain different correction values.
  • For Olympus raw files (*.ORF) the location of the distortion correction data is not known and also it is unclear if the correction data is formatted similar to the Panasonic raw file.


M43RawAnalyzer

To aid these efforts I have created a program called M43RawAnalyzer, which is using the base algorithm of Raphaël ported from C to C#. The main purpose of this program is to extract the distortion correction information from Panasonic raw files to help to find the formula used. Maybe a pattern can be seen when more data is collected. To collect this data I have created a Google Spreadsheet. Everybody is invited to paste his results into the spreadsheet. I have initially populated it with data gathered from Photographyblog and from my personal files.

Goal

The goal of M43Analyzer is to gather data for all autofocus MFT lenses on Panasonic bodies. The more data the better. Maybe it is possible to see a pattern, which helps identify the algorithm(s). Everybody can let this program analyze his raw files and import the resulting data into the Google Docs Spreadsheet. However, if your “result.txt” file is multiple megabytes big, it is too big to be imported in the spreadsheet. So it would be best to just import data for lenses, which are not already in the Spreadsheet.

Usage

M43RawAnalyzer was just started
When you start the program the main window is shown.

  • First it is necessary to select a directory which contains Panasonic MFT RW2 files.
  • Check the checkbox “Analyze subdirectories”, if you want to analyze also the subdirectories.
  • When clicking on the “Analyze” button all RW2 files are analyzed.
  • A file named “result.txt” is created in the same directory as M43RawAnalyer.exe.

How To Insert The Data Into The Spreadsheet

  • Click on File|Import..
  • In the following dialog click “Choose File” to select the “result.txt” file created by M43RawAnalyzer.
  • Also click on “Append rows to current sheet”
  • Click on “Import” to start the import.

Result File Format

The result file has the following columns:

Camera The model of the camera used.
Lens The name of the lens used. If the name is only partly written in this column or completely garbage, than the offset of the lens name is different than in my samples. If you send me the file I can add this offset to M43RawAnalyzer. I suspect that different Firmware revisions produce a different offset.
FL The focal length used. This is important, because the correction data is dependent on the focal length.
n, sc, a, b, c The variables from Raphaël’s Algorithm.
n2, sc2, a2, b2, c2 The variables from Raphaël’s Algorithm, but calculated using a different byte order. Maybe it helps. If you do not know what byte order is, just ignore it.
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 The raw distortion correction data from the Panasonic raw file.
Filename The filename. Used to distinguish different samples.

Initial Findings

For the G1, G2, G10, GF1, GF2, GF3, GF5 and GH1 the variable n is 2500. For the G3, G5, and GH2 it is 2860. For the GX1 it is 2886 and for the GH3 it appears to be random, but I suspect it is a result of the non-final Firmware which was used to create the raw files.

About M43RawAnalyzer

  • The program only reads from the raw files and is not altering them in any way.
  • The program should work with all Panasonic raw files (*.RW2), but it can happen that the lens names are not always shown correctly. I suspect this is firmware related. If you send me the file I can add this offset to M43RawAnalyzer.
  • M43RawAnalyzer is written in C# and is developed on Windows 7 (64bit). It should run on all Windows version, which support .NET 3.5. It is untested on Mono.
  • The source code is released on GitHub.

< New Features of MirrorlessDB (12-12-2012)New Features of MirrorlessDB (21-11-2012) >


comments powered by Disqus