Skip to content

raisim::CameraShutter ​

struct · #include <raisim/sensors/SensorModels.hpp>

Shutter of a camera sensor. A global shutter exposes every pixel at the capture time. A rolling shutter exposes the rows (or columns) one after another: the capture timestamp is the exposure start of the first row (Kalibr convention) and the last row starts readoutTime later.

Public types ​

Type ​

cpp
enum class Type : int

Shutter type.

EnumeratorValueDescription
GLOBAL0Every pixel at the capture time.
ROLLING1Rows (or columns) exposed one after another over readoutTime.

ReadoutDirection ​

cpp
enum class ReadoutDirection : int

Order in which a rolling shutter reads the image.

EnumeratorValueDescription
TOP_TO_BOTTOM0First row at the top.
BOTTOM_TO_TOP1First row at the bottom.
LEFT_TO_RIGHT2First column at the left.
RIGHT_TO_LEFT3First column at the right.

Public member functions ​

isRolling ​

cpp
bool isRolling() const

Returns true for a rolling shutter with a positive readout time.

pixelTimeOffset ​

cpp
double pixelTimeOffset(int column, int row, int width, int height) const

Parameters

ParameterDescription
column (in)Pixel column.
row (in)Pixel row.
width (in)Image width.
height (in)Image height.

Returns Exposure start of the pixel relative to the capture timestamp, in seconds (0 for a global shutter).

Static member functions ​

parseType static ​

cpp
static bool parseType(const std::string &name, Type &out)

Parameters

ParameterDescription
name (in)"global" or "rolling" (case-sensitive, lower case).
out (out)Parsed type.

Returns false for an unknown name.

parseReadoutDirection static ​

cpp
static bool parseReadoutDirection(
    const std::string &name,
    ReadoutDirection &out)

Parameters

ParameterDescription
name (in)"top_to_bottom", "bottom_to_top", "left_to_right" or "right_to_left".
out (out)Parsed direction.

Returns false for an unknown name.

Public attributes ​

type ​

cpp
Type type

Shutter type.

readoutTime ​

cpp
double readoutTime

Time from the exposure start of the first row to that of the last row, in seconds. Kalibr's line delay is readoutTime / (rows - 1).

readoutDirection ​

cpp
ReadoutDirection readoutDirection

Readout order of a rolling shutter.

bands ​

cpp
int bands

Number of bands a renderer splits a rolling-shutter image into (0: 16, at most one per line). Each band is rendered at the exposure time of its middle line, so a line is off by up to half a band's readout time (readoutTime / bands / 2).

RaiSim — physics for robotics and AI.