lfpsplitter: Update for Images processed with Lytro Desktop 2.x

Lytro’s recent upgrade to Lytro Desktop 2.0 entailed some file format changes that rendered light field files incompatible with lfpsplitter.

An update to lfpsplitter, provided by Elissa Weidaw, now accommodates for these changes and makes lfpsplitter usable again. The author has made sure to keep the lfpsplitter syntax unchanged.

Since Lytro Desktop 2.0, LFP image stacks are encoded as H264 frame sequences – used to compress files and speed up loading times. Due to “legal issues swirling around H264 decoding”, lfpsplitter does not decode said sequences. There are, however, other tools (e.g. ffmpeg) that will do the extra step for you.

More information and download link: lfpsplitter at GitHub

Here are the official README_V2 contents:

Date: January 13, 2013
Author: Elissa Weidaw

The accompanying code contains modifications to Nirav Patel’s
original lfpsplitter utility in an attempt to accommodate the
Lytro file format changes after the Lytro processing software
update that added shift perspective viewing and living filters.
(This Lytro update became available in December 2012.)

The syntax of the lfpsplitter command as described in the
original README file has not changed.

The Lytro Version 2 software generates three .lfp files instead of two
as in Version 1. These files are

1. IMG_nnnn.lfp

This file seems to be pretty much the same as Version 1. I have
not done a full analysis, however.

2. IMG_nnnn-dm.lfp

This file is new in Version 2. It contains an expanded depth
map (330 x 330) as well as a confidence map of the same
dimensions. I will wait for someone else to explain what
the confidence map is used for. The depth map represents
lambda values, as in Version 1, but at a much finer
granularity than in Version 1.

3. IMG_nnnn-stk.lfp

A file with this name was also generated by Lytro Version 1 software,
but with the Version 2 format the contents have changed. The most
significant difference is that the image stacks are encoded as H264 frame
sequences. The -stk.lfp file may contain one or two image stacks (H264
frame sequences), depending on whether the user has performed
additional processing for shift perspective viewing using the
option provided in the Lytro processing software.

An example of running the new lfpsplitter on Lytro files generated
with Lytro’s version 2 software is shown below.

$ lfpsplitter IMG_0008.lfp
Saved IMG_0008_table.json
Saved IMG_0008_imageRef0.raw
Saved IMG_0008_metadataRef0.json
Saved IMG_0008_privateMetadataRef1.json

$ lfpsplitter IMG_0008-dm.lfp
Saved IMG_0008-dm_table.json
Saved IMG_0008-dm_lut_depth.txt
Saved IMG_0008-dm_lut_confidence.txt

$ lfpsplitter IMG_0008-stk.lfp
Saved IMG_0008-stk_table.json
Saved IMG_0008-stk_blockOfImagesRef_00.h264
Saved IMG_0008-stk_lut_depth.txt
Saved IMG_0008-stk_blockOfImagesRef_01.h264

The example shown above was run on an image where
perspective shift processing had been performed. If it
had not been performed, only one .h264 file would
have been output for IMG_0008-stk.lfp.

Note tha lfpsplitter does NOT decode the H264 blocks into individual
images. There are legal issues swirling around H264 decoding, so you
will need to find another utility to accomplish this. You might
try ffmpeg (ffmpeg.org). Using that utility, you could try the
following command line to generate JPEGs:

ffmpeg -format h265 -i IMG_0008-stk_blockOfImagesRef_00.h264
-an -qscale 1 IMG_0008-stk_blockOfImagesRef_00_%04d.jpg

You may also like...

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.