Lens Information Files

< Previous | Contents | Manuals Home | Boris FX | Next >

Lens Information Files

Lens information files may be modified by hand or written by Sizzle scripts or other tools using this information. They are XML files but have an extension of .lni. They are automatically found by SynthEyes within the system and user scripts folders.

Each file uses this general format:

<Lens title="Zeiss UP-10 @ Infinity" mm="1">

<Info>

<creator>c:\Viken\bin\scripts\Lens\zeiss1.szl</creator>

<date>Fri, Apr 03, 2009 10:57:30 PM</date>

<lin>0.058108</lin>

<sq>-0.128553</sq>

<cub>0.01099</cub>

<quar>-0.0002606</quar>

<maxAperture>20</maxAperture>

</Info>

<DATA>

<sample rin="0" rout="0"/>

<sample rin="0.425532" rout="0.425542"/>

<sample rin="0.851064" rout="0.850749"/>

<sample rin="1.2766" rout="1.27515"/>

<sample rin="1.70213" rout="1.69836"/>

<sample rin="2.12766" rout="2.12005"/>

</DATA>

</Lens>

The root tag must be Lens. The title attribute is the human-readable name of the preset.

Important : XML tag and attribute names are case-sensitive, Lens is not the same as LENS or lens. And quotes are required for attribute values.

The Info block (or any other unrecognized blocks) are not read; here they are used to record, in a standard way, details of the file creation by a script.

After that comes a block of data with samples of the distortion table. They must be sorted by rin and will be spline-interpolated. The last line above says that pixels

2.128 mm from the center will be distorted to appear only 2.12 mm from the lens center.

This is an “absolute” file with radii measured in millimeters from the optic center: the optional “mm” attribute on the root Lens tag makes it absolute (1), by default it is a “relative” file(mm=”0”).

Relative files measure radii in terms of a unit that goes from 0 at the center of the image (when it is properly centered) vertically to 1.0 at the center of the top (or bottom) edge of the image. Literally, that is the “V” coordinate of trackers; it is resolution- and aspect-independent.

For both file types, there is the question of how far the table should go, what the maximum value should be. For an absolute file, this is determined by the maximum image size of the lens. For a relative file, the maximum value is determined from the maximum aspect ratio: sqrt(max_aspect*max_aspect + 1). This value is required as an input to relative-type lni generator scripts, but is essentially arbitrary as long as it is large enough.

With some distortion profiles, if large-enough radii are fed in, the radius will bend back on itself, so that increasing the radius decreases the distorted radius. SynthEyes ignores the superfluous rest of the file when this happens without error.

Two other tags can appear in the file at the top level with Info and DATA: a tag BPW with value 8.1 would say that the recommended nominal sensor (back plate) width is 8.1 mm, and a tag of FLEN with value 10.5 would say that the nominal focal length is

10.5 mm. These values are presented for display only on the image processor’s Lens tab for the user’s convenience, if the table was generated for a specific camcorder model.


©2024 Boris FX, Inc. — UNOFFICIAL — Converted from original PDF.