Skip to content

Camera lens

David Cardinal edited this page Jan 28, 2022 · 11 revisions

Relevant tutorials

  • t_piIntro_lens - Illustrates how to create and modify parameters of an omni camera

The lens file format is a json file.

  • To work with lenses beyond the features implemented in isetcam, use the isetlens toolbox

Lens and depth of field

The t_piIntro_lens creates an omni camera using the dgauss.22deg.50.0mm lens. The script renders the image. You can try adjusting a lens parameter, such as the aperture, to achieve different effects. The images below were rendered at high resolution with three different aperture sizes. Notice that the small pawn on the right becomes out of focus. As the lens aperture increases, the depth of field narrows.

For more detail, paste the image into PowerPoint or Keynote.

The lens specification

The lenses are stored in data/lens. That directory includes both lens files and information about how their focal length varies with object distance.

Set the focus

To set the focus at a particular distance in the image you can use this type of call

thisR.set('focus distance',0.45); % meters

This is the distance to the pawn. The film distance is derived by PBRT from this parameter.


Lens Chromatic aberration

Lightfield camera

Clone this wiki locally