Points

Types

struct CeptonSensorImagePoint

Point in pinhole image coordinates (focal length = 1).

To convert to 3d point, use cepton_sdk::util::convert_sensor_image_point_to_point.

Public Members

int64_t timestamp

Unix time [microseconds].

float image_x

x image coordinate.

float distance

Distance [meters].

float image_z

z image coordinate.

float intensity

Diffuse reflectance (normal: [0-1], retroreflective: >1).

CeptonSensorReturnType return_type

Return type flags.

uint8_t flags

Bit flags.

uint8_t valid

If false, then distance and intensity are invalid.

uint8_t saturated

If true, then intensity is invalid, and the distance is innacurate.

union CeptonSensorImagePoint::[anonymous] [anonymous]
uint8_t segment_id
uint8_t reserved[1]

Methods

typedef void (*FpCeptonSensorImageDataCallback)(CeptonSensorHandle handle, size_t n_points, const struct CeptonSensorImagePoint *c_points, void *user_data)

Callback for receiving image points.

Set the frame options to control the callback rate.

Parameters
  • handle: Sensor handle.

  • n_points: Points array size.

  • c_points: Points array. Owned by SDK.

  • user_data: User instance pointer.

CeptonSensorErrorCode cepton_sdk_listen_image_frames(FpCeptonSensorImageDataCallback cb, void *const user_data)

Sets image frame callback.

Returns points at frequency specified by cepton_sdk::FrameOptions::mode. Each frame contains all possible points (use cepton_sdk::SensorImagePoint::valid to filter points). Points are ordered by measurement, segment, and return:

measurement_count = n_points / (segment_count * return_count)
idx = ((i_measurement) * segment_count + i_segment) * return_count + i_return

Returns error if callback already registered.

CeptonSensorErrorCode cepton_sdk_unlisten_image_frames(void)

Clears image frame callback.