Skip to content

Coded Perspective Camera and Coded Orthographic Camera

jiatiansun edited this page Jul 22, 2019 · 1 revision

Coded Perspective Camera

Parameter Type Description
toWorld transform or animation Specifies an optional camera-to-world transformation.
(Default: none(i.e. camera space = world space))
focalLength string Denotes the camera’s focal length specified using 35mm film equivalent units. See the description below for further details. (Default:50mm)
fov float An alternative to focalLength: denotes the camera’s field of view in degrees—must be between 0 and 180,
excluding the extremes.
fovAxis string When the parameter fov is given (and only then), this parameter further specifies the image axis, to which it applies.
(i) x: fov maps to the x-axis in screen space.
(ii) y: fov maps to the y-axis in screen space.
(iii) diagonal: fov maps to the screen diagonal.
(iv) smaller: fov maps to the smaller dimension (e.g. x when width<height)
(v) larger: fov maps to the larger dimension (e.g. y when width<height)
The default is x.
nearClip,
farClip
float Distance to the near/far clip planes.
(Default: nearClip=1e-2 (i.e. 0.01) and farClip=1e4 (i.e. 10000)
filename string Path to the radiance-valued input image to be projected (Required for initialization)

This plugin implements a coded perspective pinhole camera, which simply applies a mask to a pinhole of a perspective camera.
. Thus, coded perspective camera reserves most of parameters of Mitsbua's perspective camera plugin. An additional parameter "filename(string)" is added to the coded camera compared to its version without masks. The filename is used as a path to the image file that contains the mask that filters the image rendered by the camera. If the image has resolution inconsistent with the camera film, the mask will be scaled to fit the size of the film. There is no default value for filename, so this is a required parameter for coded cameras.

Below is sample configuration needed for instantiating a coded perspective camera in a scene file.

	<sensor type="codedPerspective">
		 <!-- .... other coded perspective camera parameters (that has counterpart in persepective camera) .... -->
		<string name="filename" value="PathToProjectionImage"/>
	</sensor>

For example application of this plugin, you can look into the file examples/cornellbox/cbox_coded_persp_proj.xml.

Coded Orthographic Camera

Parameter Type Description
toWorld transform or animation Specifies an optional camera-to-world transformation.
(Default: none(i.e. camera space = world space))
nearClip,
farClip
float Distance to the near/far clip planes.
(Default: nearClip=1e-2 (i.e. 0.01) and farClip=1e4 (i.e. 10000)
filename string Path to the radiance-valued input image to be projected (Required for initialization)

This plugin implements a coded orthographic camera, which simply applies a mask to a pinhole of a orthographic camera.
. Thus, coded orthographic camera reserves most of parameters of Mitsbua's orthographic camera plugin. An additional parameter "filename(string)" is added to the coded camera compared to its version without masks. The filename is used as a path to the image file that contains the mask that filters the image rendered by the camera. If the image has resolution inconsistent with the camera film, the mask will be scaled to fit the size of the film. There is no default value for filename, so this is a required parameter for coded cameras.

Below is sample configuration needed for instantiating a coded perspective camera in a scene file.

	<sensor type="codedOrthographic">
		 <!-- .... other coded perspective camera parameters (that has counterpart in persepective camera) .... -->
		<string name="filename" value="PathToProjectionImage"/>
	</sensor>

For example application of this plugin, you can look into the file examples/cornellbox/cbox_coded_ortho_proj.xml.

"filename" parameter is required for all extended features, so please make sure to always include it scene files for using projectors or coded cameras.