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
enum class Type : intShutter type.
| Enumerator | Value | Description |
|---|---|---|
GLOBAL | 0 | Every pixel at the capture time. |
ROLLING | 1 | Rows (or columns) exposed one after another over readoutTime. |
ReadoutDirection
enum class ReadoutDirection : intOrder in which a rolling shutter reads the image.
| Enumerator | Value | Description |
|---|---|---|
TOP_TO_BOTTOM | 0 | First row at the top. |
BOTTOM_TO_TOP | 1 | First row at the bottom. |
LEFT_TO_RIGHT | 2 | First column at the left. |
RIGHT_TO_LEFT | 3 | First column at the right. |
Public member functions
isRolling
bool isRolling() constReturns true for a rolling shutter with a positive readout time.
pixelTimeOffset
double pixelTimeOffset(int column, int row, int width, int height) constParameters
| Parameter | Description |
|---|---|
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
static bool parseType(const std::string &name, Type &out)Parameters
| Parameter | Description |
|---|---|
name (in) | "global" or "rolling" (case-sensitive, lower case). |
out (out) | Parsed type. |
Returns false for an unknown name.
parseReadoutDirection static
static bool parseReadoutDirection(
const std::string &name,
ReadoutDirection &out)Parameters
| Parameter | Description |
|---|---|
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
Type typeShutter type.
readoutTime
double readoutTimeTime 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
ReadoutDirection readoutDirectionReadout order of a rolling shutter.
bands
int bandsNumber 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).