Distortion camera

Description

../../../_images/distortioncam.jpg

Cornell box rendered with a distortion camera

Instrument This instrument is a rectilinear lens camera model, with optical aberrations. It provides similar images than the Ideal rectilinear camera, with spherical lens imperfections. If the distortion table is set to 0, it will provide the same image than the ideal rectilinear camera model.

Children Nodes

This node may have a variable number of output children with custom names.

Sensor sensor

List of channels defined by a sensitivity spectrum

Output user-defined

First output preset

Output user-defined

Second output preset

Output user-defined

Parameters

name

type

description

xresolution

integer

Horizontal buffer resolution

yresolution

integer

Vertical buffer resolution

pixelfilter

list

The ray pixel filter

shutter

real

Shutter time or exposure, in seconds

wlmin

real

Low bound of simulation wavelength range

wlmax

real

High bound of simulation wavelength range

pos

vec3

The camera position : center of pupils apertures, as well as principal points

forwards

vec3

The camera optical axis, or view direction. Should be orthogonal to up

up

vec3

The camera up axis. Should be orthogonal to forwards

focusdistance

real

The lens focusing distance in meters. Set to zero for infinite focus distance

autofocus

boolean

Set to true for setting the focus distance to the first geometry met in the forward direction

fnumber

real

The lens aperture F-number

focallength

real

The lens focal length in meters. Must be greater than 0

sensor_ar

real

The sensor aspect ratio. Physical width/height ratio of the recorded image, but not necessarily equal to pixel aspect ratio (xresolution/yresolution. Must be greater than 0

sensor_width

real

The sensor width in meters, such as 0.036 for 35mm film cameras. Must be greater than 0

lensshift_x

real

The sensor shift in horizontal direction. From 0 to 10 (in sensor length unit). WARNING, reset optical axis perpendicular to your object by reseting z coordinate of forwards direction.

lensshift_y

real

The sensor shift in vertical direction. From 0 to 10 (in sensor length unit).

distortion

table

The tabulated distribution of angular distortion. The first column is the angle of view (in degrees) and should be ordered. The second column is the distortion needs to be applied. The distortion values are decimal values and their range is between -1 and 1.

Ocean XML 5.0 example

<instrument type="distortioncam" name="distortioncam">
        <prm xresolution="512"/>
        <prm yresolution="512"/>
        <prm shutter="0.8"/>
        <prm wlmin="3.8e-07"/>
        <prm wlmax="7.8e-07"/>
        <prm pixelfilter="bilinear"/>
        <prm pos="0.278 0.273   -0.8"/>
        <prm forwards="0        0       1"/>
        <prm up="0      1       0"/>
        <prm focusdistance="2"/>
        <prm autofocus="true"/>
        <prm fnumber="5.6"/>
        <prm focallength="0.03"/>
        <prm sensor_ar="1"/>
        <prm sensor_width="0.025"/>
        <prm sensor_shift_x="0"/>
        <prm sensor_shift_y="0"/>
        <param name="distortion" type="list">
                <row angle="0" value="0"/>
                <row angle="0.5" value="-3e-06"/>
                <row angle="1" value="-1e-05"/>
        </param>
        <sensor type="ciexyz" name="sensor" y_only="false"/>
        <output type="rgbimage" name="output">
                <prm colorspace="srgb"/>
                <prm depth="8"/>
                <prm xwhite="0.3127"/>
                <prm ywhite="0.329"/>
                <prm hcc="0.4"/>
                <prm drawinfo="false"/>
                <filter type="reinhardglobal" name="filter2" enabled="true" stops="1" strength="0.8"/>
                <filter type="noisekiller" name="filter3" enabled="true" method="fuser" strength="4"/>
        </output>
</instrument>