Refocus: Linux Tool to Process Raw Lytro Images

Refocus: Linux Tool to Process Raw Lytro Images In our Forums, there’s now something for Linux users: User ebina1 has shared a small Linux tool that allows the processing and refocusing of Lytro RAW images (which can be extracted via lfpsplitter).

I wrote a short program to process the raw data the lfpsplitter extracts from the .lfp file (not the -stk.lfp).
It lets you generate individual images focused at different depths. The pictures aren’t quite as good as what you get out of the Mac software, but still fun if you want to play with refocusing images.
The source is here:

  Refocus (Linux tool) (19.3 KiB, 1,729 hits)
Small Linux program to refocus extracted Lytro RAW image files.

Join the discussion and let us know what you think!

Readme file information after the break:

Refocus Program.

Read a raw data file as generated by lfpsplitter when run on the .lfp file from your lytro camera.
So first parameter is image.raw.
Second parameter is the focus that you want on the image.
Ren Ng’s dissertation has a focusing formula of u(1 – 1/a), v(1 – 1/a) where a is the alpha value. That alpha value is the third parameter to refocus.

So “refocus image.raw 1.0” would show you the image focused on the camera’s true focus plane.
To move the focus plane further from the camera, a has to decrease towards 0.0.
Likewise to focus towards the camera, you start at -1.0, and the closer you get to -0.0 the closer your focus plane is to the camera.

You may also like...

2 Responses

Leave a Reply

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