Skip to content

raisim::BoundingBox2D ​

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

2D bounding box of one instance in a camera image. An instance is one body of one object, with the ids of the segmentation images (SegmentationCamera object and body images). Image coordinates are pixel indices: x is the column (0 at the left), y the row (0 at the top).

Public attributes ​

objectId ​

cpp
int32_t objectId

World index of the object (SegmentationCamera object image).

bodyId ​

cpp
int32_t bodyId

Body index within the object (SegmentationCamera body image).

label ​

cpp
int32_t label

Semantic label of the body (SegmentationCamera label image); -1 when the image has no labels.

xMin ​

cpp
int32_t xMin

Leftmost visible column (tight box, inclusive).

yMin ​

cpp
int32_t yMin

Topmost visible row (tight box, inclusive).

xMax ​

cpp
int32_t xMax

One past the rightmost visible column (tight box, exclusive).

yMax ​

cpp
int32_t yMax

One past the bottom visible row (tight box, exclusive).

visiblePixels ​

cpp
uint32_t visiblePixels

Number of pixels of the instance in the image.

looseXMin ​

cpp
float looseXMin

Loose box: the full projected extent of the instance including occluded parts, clipped to the image, in continuous pixel coordinates (pixel (x, y) covers [x, x + 1) x [y, y + 1), so the image spans [0, width] x [0, height]); NaN when not computed. Renderers compute it (rayrai: RayraiWindow::computeBoundingBoxes(), SensorBatchRenderer::segmentationBoundingBoxes()).

looseYMin ​

cpp
float looseYMin

See looseXMin.

looseXMax ​

cpp
float looseXMax

See looseXMin.

looseYMax ​

cpp
float looseYMax

See looseXMin.

truncation ​

cpp
float truncation

Fraction of the projected extent outside the image (KITTI truncation, 0 to 1); -1 when not computed.

occlusionRatio ​

cpp
float occlusionRatio

1 - visible pixels / pixels without occlusion (0 to 1); -1 when not computed.

RaiSim — physics for robotics and AI.