Camera¶
-
class
Camera
¶ Public Functions
-
std::vector<DeviceInfo>
GetDeviceInfos
() const¶ Get all device infos.
-
void
GetDeviceInfos
(std::vector<DeviceInfo> *dev_infos) const¶ Get all device infos.
-
void
GetStreamInfos
(const std::int32_t &dev_index, std::vector<StreamInfo> *color_infos, std::vector<StreamInfo> *depth_infos) const¶ Get all stream infos.
-
ErrorCode
Open
(const OpenParams ¶ms)¶ Open camera with params.
-
bool
IsOpened
() const¶ Whethor camera is opened or not.
-
OpenParams
GetOpenParams
() const¶ Get open params.
-
std::shared_ptr<device::Descriptors>
GetDescriptors
() const¶ Get all device descriptors.
-
std::string
GetDescriptor
(const Descriptor &desc) const¶ Get one device descriptor.
-
StreamIntrinsics
GetStreamIntrinsics
(const StreamMode &stream_mode) const¶ Get the intrinsics of camera.
-
StreamIntrinsics
GetStreamIntrinsics
(const StreamMode &stream_mode, bool *ok) const¶ Get the intrinsics of camera.
-
StreamExtrinsics
GetStreamExtrinsics
(const StreamMode &stream_mode) const¶ Get the extrinsics of camera.
-
StreamExtrinsics
GetStreamExtrinsics
(const StreamMode &stream_mode, bool *ok) const¶ Get the extriframensics of camera.
-
bool
WriteCameraCalibrationBinFile
(const std::string &filename)¶ Write camera calibration bin file.
-
bool
WriteCameraCalibration
(const struct CameraCalibration &data, const StreamMode &stream_mode)¶ Write camera calibration struct.
-
bool
WriteCameraCalibration
(const struct CameraCalibration &data)¶ Write camera calibration bin file.
-
std::shared_ptr<CameraCalibration>
GetCameraCalibration
(const StreamMode &stream_mode)¶ Get camera calibration calib struct.
-
MotionIntrinsics
GetMotionIntrinsics
() const¶ Get the intrinsics of motion.
-
MotionIntrinsics
GetMotionIntrinsics
(bool *ok) const¶ Get the intrinsics of motion.
-
MotionExtrinsics
GetMotionExtrinsics
() const¶ Get the extrinsics from left to motion.
-
MotionExtrinsics
GetMotionExtrinsics
(bool *ok) const¶ Get the extrinsics from left to motion.
-
bool
IsWriteDeviceSupported
() const¶ Whethor write device supported or not.
-
bool
WriteDeviceFlash
(device::Descriptors *desc, device::ImuParams *imu_params, Version *spec_version = nullptr)¶ Write device flash.
-
void
EnableProcessMode
(const ProcessMode &mode)¶ Enable process mode, e.g.
imu assembly, temp_drift
-
void
EnableProcessMode
(const std::int32_t &mode)¶ Enable process mode, e.g.
imu assembly, temp_drift
-
bool
IsImageInfoSupported
() const¶ Whethor image info supported or not.
-
void
EnableImageInfo
(bool sync)¶ Enable image infos.
If sync is false, indicates only can get infos from callback. If sync is true, indicates can get infos from callback or access it from StreamData.
-
void
DisableImageInfo
()¶ Disable imageframe info.
-
bool
IsImageInfoEnabled
() const¶ Whethor imageframe info enabled or not.
-
bool
IsImageInfoSynced
() const¶ Whethor imageframe info synced or not.
-
bool
IsStreamDataEnabled
(const ImageType &type) const¶ Whethor stream data of certain image type enabled or not.
-
bool
HasStreamDataEnabled
() const¶ Has any stream data enabled.
-
StreamData
GetStreamData
(const ImageType &type)¶ Get latest stream data.
-
std::vector<StreamData>
GetStreamDatas
(const ImageType &type)¶ Get cached stream datas.
-
bool
IsMotionDatasSupported
() const¶ Whethor motion datas supported or not.
-
void
EnableMotionDatas
(std::size_t max_size = std::numeric_limits<std::size_t>::max())¶ Enable motion datas.
If max_size <= 0, indicates only can get datas from callback. If max_size > 0, indicates can get datas from callback or using GetMotionDatas().
Note: if max_size > 0, the motion datas will be cached until you call GetMotionDatas().
-
void
DisableMotionDatas
()¶ Disable motion datas.
-
bool
IsMotionDatasEnabled
() const¶ Whethor motion datas enabled or not.
-
std::vector<MotionData>
GetMotionDatas
()¶ Get cached motion datas.
Besides, you can also get them from callback
-
void
SetImgInfoCallback
(img_info_callback_t callback, bool async = true)¶ Set image info callback.
-
void
SetStreamCallback
(const ImageType &type, stream_callback_t callback, bool async = true)¶ Set stream data callback.
-
void
SetMotionCallback
(motion_callback_t callback, bool async = true)¶ Set motion data callback.
-
void
Close
()¶ Close the camera.
-
void
SetExposureTime
(const float &value)¶ Set exposure time [1ms - 655ms] value exposure time value.
-
void
GetExposureTime
(float &value)¶ Get exposure time value return exposure time value.
-
void
SetGlobalGain
(const float &value)¶ Set global gain [1 - 16] value global gain value.
-
void
GetGlobalGain
(float &value)¶ Get global gain value return global gain value.
-
void
SetIRIntensity
(const std::uint16_t &value)¶ set infrared(IR) intensity [0, 10] default 4
-
bool
AutoExposureControl
(bool enable)¶ Auto-exposure enabled or not default enabled.
-
bool
AutoWhiteBalanceControl
(bool enable)¶ Auto-white-balance enabled or not default enabled.
-
float
GetSensorTemperature
()¶ Get sensor temperature.
-
bool
IsLocationDatasSupported
() const¶ Whethor location datas supported or not.
-
void
EnableLocationDatas
(std::size_t max_size = std::numeric_limits<std::size_t>::max())¶ ↩ Enable location datas.
If max_size <= 0, indicates only can get datas from callback. If max_size > 0, indicates can get datas from callback or using GetLocationDatas().
Note: if max_size > 0, the distance datas will be cached until you call GetLocationDatas().
-
void
DisableLocationDatas
()¶ Disable location datas.
-
bool
IsLocationDatasEnabled
() const¶ Whethor location datas enabled or not.
-
std::vector<LocationData>
GetLocationDatas
()¶ Get cached location datas.
Besides, you can also get them from callback
-
void
SetLocationCallback
(location_callback_t callback, bool async = true)¶ Set location data callback.
-
bool
IsDistanceDatasSupported
() const¶ Whethor distance datas supported or not.
-
void
EnableDistanceDatas
(std::size_t max_size = std::numeric_limits<std::size_t>::max())¶ Enable distance datas.
If max_size <= 0, indicates only can get datas from callback. If max_size > 0, indicates can get datas from callback or using GetDistanceDatas().
Note: if max_size > 0, the distance datas will be cached until you call GetDistanceDatas().
-
void
DisableDistanceDatas
()¶ Disable distance datas.
-
bool
IsDistanceDatasEnabled
() const¶ Whethor distance datas enabled or not.
-
std::vector<DistanceData>
GetDistanceDatas
()¶ Get cached distance datas.
Besides, you can also get them from callback
-
void
SetDistanceCallback
(distance_callback_t callback, bool async = true)¶ Set distance data callback.
-
std::shared_ptr<Colorizer>
GetColorizer
() const¶ Get colorizer for depth.
-
bool
AuxiliaryChipFirmwareUpdate
(const char *filepath)¶ Update auxiliary chip firmware.
-
void
ControlReconnectStatus
(const bool &status)¶ control status of reconnect default enabled
-
bool
Supports
(const Stream &stream) const¶ Supports the stream or not.
-
std::vector<DeviceInfo>