目录
3.枚举类型CameraTempSelector和SmoothnessLevel
嵌套结构体CaptureOptions和 CustomTransformOptions
嵌套结构体CaptureOptions和 CustomTransformOptions
前言
总结RVC.h文件主要内容。参考文档:(RVC SDK Documentaion.html)
RVC->File->File List->RVC.h
一、声明
1.结构体Projector
代码如下:
#ifndef NOT_EXPORT_TO_USER
struct RVC_EXPORT Projector {
static Projector Create(const Device &d);
static void Destroy(Projector &p);
bool IsValid();
bool Open();
bool IsOpen();
bool Close();
bool GetStatus(int *status);
bool SetBrightness(uint8_t val);
bool GetBrightness(uint8_t *val);
bool SetIlluminationTime(const uint32_t us);
bool GetIlluminationTime(uint32_t *us);
bool SetProjectorColor(const ProjectorColor color);
bool GetProjectorColor(ProjectorColor *color);
bool GetProjectorTemperature(float *temp);
bool Project(const uint16_t &rounds, const uint16_t *imgs, const uint16_t &img_num);
bool StopProject();
bool ProjectAndTrigger(const uint16_t &rounds, const uint16_t *cams, const uint16_t &cam_num, const uint16_t *imgs,
const uint16_t &img_num);
Handle m_handle;
};
#endif
这段代码定义了一个名为 Projector 的结构体,代表投影仪的一个类。该结构体包含以下成员函数:
- 静态函数 Create(),用于创建一个 Projector 实例,返回值类型为 Projector。
- 静态函数 Destroy(),用于销毁一个 Projector 实例,参数类型为 Projector 引用。
- 成员函数 IsValid(),用于判断该 Projector 实例是否有效。
- 成员函数 Open(),用于打开该 Projector 实例,并返回打开操作是否成功的 bool 类型的值。
- 成员函数 IsOpen(),用于检查该 Projector 实例是否已经打开,并返回结果的 bool 类型值。
- 成员函数 Close(),用于关闭该 Projector 实例,并返回关闭操作是否成功的 bool 类型的值。
- 成员函数 GetStatus(),用于获取该 Projector 实例的状态,并将结果存储到指针类型变量 status 中,返回结果的 bool 类型值表示是否成功。
- 成员函数 SetBrightness(),用于设置该 Projector 实例的亮度值(取值范围为 0~255),返回结果的 bool 类型值表示是否成功。
- 成员函数 GetBrightness(),用于获取该 Projector 实例的亮度值,并将结果存储到指针类型变量 val 中,返回结果的 bool 类型值表示是否成功。
- 成员函数 SetIlluminationTime(),用于设置该 Projector 实例的光照时间(单位:微秒),返回结果的 bool 类型值表示是否成功。
- 成员函数 GetIlluminationTime(),用于获取该 Projector 实例的光照时间,并将结果存储到指针类型变量 us 中,返回结果的 bool 类型值表示是否成功。
- 成员函数 SetProjectorColor(),用于设置该 Projector 实例的投影颜色,参数类型为 ProjectorColor,返回结果的 bool 类型值表示是否成功。
- 成员函数 GetProjectorColor(),用于获取该 Projector 实例的投影颜色,并将结果存储到指针类型变量 color 中,返回结果的 bool 类型值表示是否成功。
- 成员函数 GetProjectorTemperature(),用于获取该 Projector 实例的温度,并将结果存储到指针类型变量 temp 中,返回结果的 bool 类型值表示是否成功。
- 成员函数 Project(),用于启动投影操作,参数为轮数 rounds、图像数组 imgs 和图像数量 img_num,返回操作是否成功的 bool 类型值。
- 成员函数 StopProject(),用于停止投影操作,返回操作是否成功的 bool 类型值。
- 成员函数 ProjectAndTrigger(),用于启动投影和触发操作,参数为相机数组 cams、图像数组 imgs 和相关数目 cam_num 和 img_num,返回操作是否成功的 bool 类型值。
- Handle m_handle,代表该 Projector 的句柄。
其中,RVC_EXPORT 宏用于导出该结构体。#ifndef NOT_EXPORT_TO_USER 和 #endif 之间所列举的成员函数是只在某个特定的环境中可见的,不能被用户访问。
2.结构体Camera
代码如下:
#ifndef NOT_EXPORT_TO_USER
struct RVC_EXPORT Camera {
static Camera Create(const Device &d, enum CameraID camid = CameraID_Left);
static void Destroy(Camera camera);
bool IsValid();
bool Open();
bool Close();
bool StartGrabbing(const int num);
bool StopGrabbing();
Image GetGrabbingImg(int idx);
int GetGrabbingImgBufferCount();
int GetFailedGrabbingCount();
bool SetBandwidth(float percent);
private:
Image m_captureImage;
Image m_grabbingImage;
unsigned char *m_grabbing_imgs{nullptr};
public:
bool IsOpen();
bool Capture();
Image GetCaptureImg();
bool IsColorCamera();
int GetWidth();
int GetHeight();
bool SetExposureTime(float exposure_time);
float GetExposureTime();
float GetGain();
bool SetGain(float gain);
int GetGainRange(float *min_value, float *max_value);
float GetGamma();
bool SetGamma(float gamma);
int GetGammaRange(float *min_value, float *max_value);
Handle m_handle;
};
#endif
这段代码定义了一个名为 Camera 的结构体,用于代表相机的一个类。该结构体包含以下成员函数:
- 静态函数 Create(),用于创建一个 Camera 实例,返回值类型为 Camera。
- 静态函数 Destroy(),用于销毁一个 Camera 实例,参数类型为 Camera。
- 成员函数 IsValid(),用于判断该 Camera 实例是否有效。
- 成员函数 Open(),用于打开该 Camera 实例,并返回打开操作是否成功的 bool 类型的值。
- 成员函数 Close(),用于关闭该 Camera 实例,并返回关闭操作是否成功的 bool 类型的值。
- 成员函数 StartGrabbing(),用于启动相机捕获图像过程,参数为捕获的数量 num,返回操作是否成功的 bool 类型的值。
- 成员函数 StopGrabbing(),用于停止相机捕获图像过程,并返回操作是否成功的 bool 类型的值。
- 成员函数 GetGrabbingImg(),用于获取正在抓取的第 idx 张图像,返回类型为 Image。
- 成员函数 GetGrabbingImgBufferCount(),用于获取当前正在抓取的图像数量。
- 成员函数 GetFailedGrabbingCount(),用于获取抓取失败的图像数量。
- 成员函数 SetBandwidth(),用于设置相机的带宽占用率(百分比),返回操作是否成功的 bool 类型的值。
- 成员变量 m_captureImage,表示捕获的图像。
- 成员变量 m_grabbingImage,表示正在抓取的图像。
- 成员变量 m_grabbing_imgs,表示正在抓取的图像数据指针。
- 成员函数 IsOpen(),用于检查相机是否已经打开,并返回结果的 bool 类型值。
- 成员函数 Capture(),用于捕获一帧图像,并返回操作是否成功的 bool 类型的值。
- 成员函数 GetCaptureImg(),用于获取捕获的图像,返回类型为 Image。
- 成员函数 IsColorCamera(),用于检查相机是否为彩色相机,并返回结果的 bool 类型值。
- 成员函数 GetWidth(),用于获取图像的宽度,并返回结果的 int 类型值。
- 成员函数 GetHeight(),用于获取图像的高度,并返回结果的 int 类型值。
- 成员函数 SetExposureTime(),用于设置相机的曝光时间(单位:秒),返回操作是否成功的 bool 类型的值。
- 成员函数 GetExposureTime(),用于获取相机的曝光时间,并返回结果的 float 类型值。
- 成员函数 GetGain(),用于获取相机的增益值,并返回结果的 float 类型值。
- 成员函数 SetGain(),用于设置相机的增益值,参数类型为 float,返回操作是否成功的 bool 类型的值。
- 成员函数 GetGainRange(),用于获取相机的增益范围,并将最小值和最大值存储到指针类型变量 min_value 和 max_value 中,返回结果的 int 类型值。
- 成员函数 GetGamma(),用于获取相机的 gamma 值,并返回结果的 float 类型值。
- 成员函数 SetGamma(),用于设置相机的 gamma 值,参数类型为 float,返回操作是否成功的 bool 类型的值。
- 成员函数 GetGammaRange(),用于获取相机的 gamma 范围,并将最小值和最大值存储到指针类型变量 min_value 和 max_value 中,返回结果的 int 类型值。
- Handle m_handle,代表该 Camera 的句柄。
其中,RVC_EXPORT 宏用于导出该结构体。#ifndef NOT_EXPORT_TO_USER 和 #endif 之间所列举的成员函数是只在某个特定的环境中可见的,不能被用户访问。
3.枚举类型CameraTempSelector和SmoothnessLevel
代码如下:
enum CameraTempSelector {
CameraTempSelector_Camera,
CameraTempSelector_CoreBoard,
CameraTempSelector_FpgaCore,
CameraTempSelector_Framegrabberboard,
CameraTempSelector_Sensor,
CameraTempSelector_SensorBoard,
};
enum SmoothnessLevel { SmoothnessLevel_Off, SmoothnessLevel_Weak, SmoothnessLevel_Normal, SmoothnessLevel_Strong };
enum CameraTempSelector 枚举类型包含以下成员:
- CameraTempSelector_Camera,表示获取相机温度。
- CameraTempSelector_CoreBoard,表示获取核心板温度。
- CameraTempSelector_FpgaCore,表示获取FPGA核心温度。
- CameraTempSelector_Framegrabberboard,表示获取抓帧板温度。
- CameraTempSelector_Sensor,表示获取传感器温度。
- CameraTempSelector_SensorBoard,表示获取传感器板温度。
这里的每个成员都代表了一个选项,用于选择需要获取温度的设备或部件。
enum SmoothnessLevel 枚举类型包含以下成员:
- SmoothnessLevel_Off,表示关闭平滑处理。
- SmoothnessLevel_Weak,表示启用轻微的平滑处理。
- SmoothnessLevel_Normal,表示启用正常的平滑处理。
- SmoothnessLevel_Strong,表示启用强烈的平滑处理。
这里的每个成员都代表了一种图像处理的平滑程度,用于控制图像的模糊程度。
4.结构体X1 :
嵌套结构体CaptureOptions和 CustomTransformOptions
代码如下:
struct RVC_EXPORT X1 {
struct CaptureOptions {
CaptureOptions() {
calc_normal = false;
transform_to_camera = false;
filter_range = 0;
noise_removal_distance = 0;
noise_removal_point_number = 40;
light_contrast_threshold = 3;
phase_filter_range = 0;
projector_brightness = 240;
exposure_time_2d = 11;
exposure_time_3d = 11;
gain_2d = 0.f;
gain_3d = 0.f;
hdr_exposure_times = 0;
hdr_exposuretime_content[0] = 11;
hdr_exposuretime_content[1] = 20;
hdr_exposuretime_content[2] = 50;
calc_normal_radius = 5;
gamma_2d = 1.f;
gamma_3d = 1.f;
use_projector_capturing_2d_image = true;
smoothness = SmoothnessLevel_Off;
downsample_distance = -1;
capture_mode = CaptureMode_Normal;
confidence_threshold = 0;
roi = RVC::ROI();
}
bool calc_normal;
bool transform_to_camera;
[[deprecated]] int filter_range;
double noise_removal_distance;
int noise_removal_point_number;
int light_contrast_threshold;
int phase_filter_range;
int exposure_time_2d;
int exposure_time_3d;
int projector_brightness;
float gain_2d;
float gain_3d;
int hdr_exposure_times;
int hdr_exposuretime_content[3];
unsigned int calc_normal_radius;
float gamma_2d;
float gamma_3d;
bool use_projector_capturing_2d_image;
SmoothnessLevel smoothness;
double downsample_distance;
CaptureMode capture_mode;
double confidence_threshold;
RVC::ROI roi;
};
struct CustomTransformOptions {
enum CoordinateSelect {
CoordinateSelect_Disabled,
CoordinateSelect_Camera,
CoordinateSelect_CaliBoard,
};
CustomTransformOptions()
: coordinate_select(CoordinateSelect_Disabled), transform{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1} {}
CoordinateSelect coordinate_select;
double transform[16];
};
static X1 Create(const Device &d, enum CameraID camid = CameraID_Left);
static void Destroy(X1 &x);
bool IsValid();
bool Open();
void Close();
bool IsOpen();
bool IsPhysicallyConnected();
bool Capture(const CaptureOptions &opts = CaptureOptions());
bool Capture2D(const CaptureOptions &opts = CaptureOptions());
bool SetBandwidth(float percent);
bool GetBandwidth(float& percent);
bool SetCustomTransformation(const CustomTransformOptions &opts);
bool GetCustomTransformation(CustomTransformOptions &opts);
#ifndef NOT_EXPORT_TO_USER
bool GenerateEncodedMap();
bool SaveEncodedImagesData(const std::string addr);
Image GetEncodeMap();
Image GetEncodedRawImage(uint16_t pos);
#endif
Image GetImage();
#ifndef NOT_EXPORT_TO_USER
Image GetRawImage(uint16_t pos, const bool useHDR = false);
bool GetRawImage(Image &img, uint16_t pos);
#endif
DepthMap GetDepthMap();
PointMap GetPointMap();
ConfidenceMap GetConfidenceMap();
bool GetExtrinsicMatrix(float *matrix);
bool GetIntrinsicParameters(float *instrinsic_matrix, float *distortion);
bool GetCameraTemperature(CameraTempSelector seletor, float &temperature);
bool SetBalanceRatio(BalanceSelector selector, float value);
bool GetBalanceRatio(BalanceSelector selector, float *value);
bool GetBalanceRange(BalanceSelector selector, float *min_value, float *max_value);
bool AutoWhiteBalance(int wb_times = 10, const CaptureOptions &opts = CaptureOptions(),
const RVC::ROI &roi = RVC::ROI());
#ifndef NOT_EXPORT_TO_USER
Projector GetProjector();
Camera GetCamera();
#endif
bool GetExposureTimeRange(int *min_value, int *max_value);
bool GetGainRange(float *min_value, float *max_value);
bool GetGammaRange(float *min_value, float *max_value);
bool SaveCaptureOptionParameters(const X1::CaptureOptions &opts);
bool LoadCaptureOptionParameters(X1::CaptureOptions &opts);
bool GetAutoCaptureSetting(CaptureOptions &opts, const ROI &roi = ROI());
bool GetAutoHdrCaptureSetting(CaptureOptions &opts, const ROI &roi);
bool GetAutoNoiseRemovalSetting(CaptureOptions &opts);
bool LoadSettingFromFile(const char* filename);
bool SaveSettingToFile(const char* filename);
bool CheckRoi(ROI roi);
ROI AutoAdjustRoi(ROI roi = ROI());
bool GetRoiRange(ROIRange& range);
Handle m_handle;
};
这段代码定义了一个名为 X1 的结构体,表示联合体设备。其中包含一个名为 CaptureOptions 的嵌套结构体和一个名为 CustomTransformOptions 的嵌套结构体,并且定义了一系列成员函数:
- Create:创建一个 X1 类对象。
- Destroy:销毁一个 X1 类对象。
- IsValid:判断 X1 类对象是否有效。
- Open:打开联合体设备。
- Close:关闭联合体设备。
- IsOpen:判断联合体设备是否打开。
- IsPhysicallyConnected:判断联合体设备是否物理连接正常。
- Capture:采集图像和深度点云。
- Capture2D:仅采集二维图像。
- SetBandwidth:设置带宽占用的百分比。
- GetBandwidth:获取当前带宽占用的百分比。
- SetCustomTransformation:设置自定义变换矩阵。
- GetCustomTransformation:获取当前自定义变换矩阵。
- GenerateEncodedMap:生成编码地图。
- SaveEncodedImagesData:保存编码图像数据。
- GetEncodeMap:获取编码地图。
- GetEncodedRawImage:获取编码后的原始图像。
- GetImage:获取采集的图像。
- GetRawImage:获取采集的原始图像。
- GetDepthMap:获取深度图。
- GetPointMap:获取点云信息。
- GetConfidenceMap:获取置信度图。
- GetExtrinsicMatrix:获取相机外参矩阵。
- GetIntrinsicParameters:获取相机内参矩阵和失真系数。
- GetCameraTemperature:获取相机温度。
- SetBalanceRatio:设置白平衡系数。
- GetBalanceRatio:获取当前白平衡系数。
- GetBalanceRange:获取白平衡系数的取值范围。
- AutoWhiteBalance:自动白平衡操作。
- GetExposureTimeRange:获取曝光时间范围。
- GetGainRange:获取增益范围。
- GetGammaRange:获取Gamma校正范围。
- SaveCaptureOptionParameters:保存采集选项参数。
- LoadCaptureOptionParameters:加载采集选项参数。
- GetAutoCaptureSetting:获取自动采集设置。
- GetAutoHdrCaptureSetting:获取自动HDR采集设置。
- GetAutoNoiseRemovalSetting:获取自动去噪设置。
- LoadSettingFromFile:从文件中加载设置。
- SaveSettingToFile:将设置保存到文件。
- CheckRoi:验证感兴趣区域。
- AutoAdjustRoi:自动调整感兴趣区域。
- GetRoiRange:获取感兴趣区域的取值范围。
CaptureOptions 结构体包含了一系列参数,用于设置采集过程中的相关选项,包括:
- calc_normal:是否计算法线信息。
- transform_to_camera:是否将深度图转换到相机坐标系。
- filter_range:已过时的参数,不再使用。
- noise_removal_distance:去噪的距离阈值。
- noise_removal_point_number:去噪的最小点数。
- light_contrast_threshold:光照对比度阈值。
- phase_filter_range:相位差滤波的范围。
- exposure_time_2d:二维采集的曝光时间。
- exposure_time_3d:三维采集的曝光时间。
- projector_brightness:投影仪亮度。
- gain_2d:二维采集的增益。
- gain_3d:三维采集的增益。
- hdr_exposure_times:HDR模式下曝光时间的档次数。
- hdr_exposuretime_content:HDR模式下不同时间档次的曝光时间值。
- calc_normal_radius:计算法线信息的半径值。
- gamma_2d:二维采集的gamma校正参数。
- gamma_3d:三维采集的gamma校正参数。
- use_projector_capturing_2d_image:是否使用投影仪采集二维图像。
- smoothness:平滑程度的选项。
- downsample_distance:降采样的距离阈值。
- capture_mode:采集模式的选项。
- confidence_threshold:置信度的阈值。
- roi:感兴趣区域的参数。
CustomTransformOptions 结构体包含了自定义坐标系的一些设置,包括:
- coordinate_select:选择用于变换的坐标系。
- transform:变换矩阵。
X1 类还包含了一个名为 m_handle 的数据成员,表示联合体设备的操作句柄。
5.图像编解码相关的函数声明
代码如下:
#ifndef NOT_EXPORT_TO_USER
bool RVC_EXPORT LoadEncodedX1ImagesData(const std::string addr, std::vector<Image> &image_queue, int *frame_info,
double *camera_param, double *analy_params);
bool RVC_EXPORT LoadEncodedX2ImagesData(const std::string addr, std::vector<Image> &image_queue_l,
std::vector<Image> &image_queue_r, int *frame_info_l, int *frame_info_r,
double *camera_param_l, double *camera_param_r);
Image RVC_EXPORT GetDecodedRawImage(Image src_img, Image decode_map);
#endif
这段代码是一些与图像编解码相关的函数声明,包含了以下三个函数:
- LoadEncodedX1ImagesData:从文件中加载编码后的 X1 类型图像数据,并转换为 Image 类型存储在 image_queue 中;frame_info 存储帧信息,camera_param 存储相机参数,analy_params 存储分析参数。
- LoadEncodedX2ImagesData:从文件中加载编码后的 X2 类型图像数据,并分别转换为 Image 类型存储在 image_queue_l 和 image_queue_r 中;frame_info_l 和 frame_info_r 存储左右相机的帧信息,camera_param_l 和 camera_param_r 存储左右相机的相机参数。
- GetDecodedRawImage:对给定的原始图像 src_img 和对应的编码地图 decode_map 进行解码,得到未编码的原始图像。
这些函数被标注为 ifndef NOT_EXPORT_TO_USER,说明它们不是用于向用户导出的。
6.结构体X2:
嵌套结构体CaptureOptions和 CustomTransformOptions
代码如下:
struct RVC_EXPORT X2 {
struct CaptureOptions {
CaptureOptions() {
transform_to_camera = CameraID_NONE;
projector_brightness = 240;
calc_normal = false;
calc_normal_radius = 5;
noise_removal_distance = 0;
noise_removal_point_number = 40;
light_contrast_threshold = 3;
edge_noise_reduction_threshold = 2;
exposure_time_2d = 11;
exposure_time_3d = 11;
gain_2d = 0.f;
gain_3d = 0.f;
hdr_exposure_times = 0;
hdr_exposuretime_content[0] = 11;
hdr_exposuretime_content[1] = 20;
hdr_exposuretime_content[2] = 50;
gamma_2d = 1.f;
gamma_3d = 1.f;
projector_color = ProjectorColor_Blue;
use_projector_capturing_2d_image = true;
smoothness = SmoothnessLevel_Off;
downsample_distance = -1;
capture_mode = CaptureMode_Normal;
confidence_threshold = 0;
}
CameraID transform_to_camera;
int projector_brightness;
bool calc_normal;
unsigned int calc_normal_radius;
int light_contrast_threshold;
int edge_noise_reduction_threshold;
int exposure_time_2d;
int exposure_time_3d;
float gain_2d;
float gain_3d;
int hdr_exposure_times;
int hdr_exposuretime_content[3];
float gamma_2d;
float gamma_3d;
ProjectorColor projector_color;
bool use_projector_capturing_2d_image;
SmoothnessLevel smoothness;
double noise_removal_distance;
int noise_removal_point_number;
double downsample_distance;
CaptureMode capture_mode;
double confidence_threshold;
};
struct CustomTransformOptions {
enum CoordinateSelect {
CoordinateSelect_Disabled,
CoordinateSelect_CameraLeft,
CoordinateSelect_CameraRight,
CoordinateSelect_CaliBoard,
};
CustomTransformOptions()
: coordinate_select(CoordinateSelect_Disabled), transform{1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1} {}
CoordinateSelect coordinate_select;
double transform[16];
};
static X2 Create(const Device &d);
static void Destroy(X2 &x);
bool IsValid();
bool Open();
void Close();
bool IsOpen();
bool IsPhysicallyConnected();
bool Capture(const CaptureOptions &opts = CaptureOptions());
bool Capture2D(const CameraID cid, const CaptureOptions &opts = CaptureOptions());
bool SetBandwidth(float percent);
bool GetBandwidth(float& percent);
bool SetCustomTransformation(const CustomTransformOptions &opts);
bool GetCustomTransformation(CustomTransformOptions &opts);
PointMap GetPointMap();
Image GetImage(const CameraID cid);
DepthMap GetDepthMap();
ConfidenceMap GetConfidenceMap();
bool GetExtrinsicMatrix(const CameraID cid, float *matrix);
bool GetIntrinsicParameters(const CameraID cid, float *instrinsicMatrix, float *distortion);
bool GetCameraTemperature(const CameraID cid, CameraTempSelector seletor, float &temperature);
bool AutoWhiteBalance(int wb_times = 10, const CaptureOptions &opts = CaptureOptions(),
const RVC::ROI &roi = RVC::ROI());
bool GetExposureTimeRange(int *min_value, int *max_value);
bool GetGainRange(float *min_value, float *max_value);
bool GetGammaRange(float *min_value, float *max_value);
#ifndef NOT_EXPORT_TO_USER
Image GetRawImage(const CameraID cid, const int imgid);
bool GetRawImage(Image &img, const CameraID cid, const int imgid);
bool GenerateEncodedMap();
bool SaveEncodedImagesData(const std::string addr);
Image GetEncodeMap();
Image GetEncodedRawImage(uint16_t pos, const int index);
Projector GetProjector();
Camera GetCamera(enum CameraID camid = CameraID_Left);
#endif
bool SaveCaptureOptionParameters(const X2::CaptureOptions &opts);
bool LoadCaptureOptionParameters(X2::CaptureOptions &opts);
bool GetAutoCaptureSetting(CaptureOptions &opts, const ROI &roi = ROI());
bool GetAutoHdrCaptureSetting(CaptureOptions &opts, const ROI &roi);
bool GetAutoNoiseRemovalSetting(CaptureOptions &opts);
bool LoadSettingFromFile(const char* filename);
bool SaveSettingToFile(const char* filename);
Handle m_handle;
};
这段代码定义了一个名为 X2 的结构体,类似X1。X2 结构体包含了多个嵌套的结构体类型和成员函数,具体如下:
- CaptureOptions:用于设置相机捕获时的各种选项,包括转换到相机、投影仪亮度、角点法向量计算、噪声移除等等。
- CustomTransformOptions:用于设置自定义的坐标变换选项。
- Create 和 Destroy:静态成员函数,分别用于创建和销毁 X2 实例。
- IsValid、Open、Close、IsOpen 和 IsPhysicallyConnected:实例方法,用于检查设备状态、打开和关闭设备以及检查设备是否已经打开或物理连接。
- Capture 和 Capture2D:实例方法,用于捕获 3D 和 2D 数据。
- SetBandwidth 和 GetBandwidth:实例方法,用于设置和获取带宽占用率的百分比。
- SetCustomTransformation 和 GetCustomTransformation:实例方法,用于设置和获取自定义坐标变换。
- GetPointMap、GetImage、GetDepthMap 和 GetConfidenceMap:实例方法,用于获取点云、彩色图像、深度图像和置信度图像。
- GetExtrinsicMatrix 和 GetIntrinsicParameters:实例方法,用于获取相机内外参数。
- GetCameraTemperature:实例方法,用于获取相机温度。
- AutoWhiteBalance:实例方法,用于自动调节白平衡。
- GetExposureTimeRange、GetGainRange 和 GetGammaRange:实例方法,用于获取曝光时间、增益和 gamma 值的范围。
- GetRawImage、GetEncodedMap、SaveEncodedImagesData、GetEncodeMap、GetEncodedRawImage、GetProjector 和 GetCamera:在条件编译指令 #ifndef NOT_EXPORT_TO_USER 包含的代码块中定义了一些额外的成员函数,用于获取原始图像、编码的图像映射、保存编码后的图像数据、获取编码的图像数据、获取投影仪实例和获取相机实例。
- SaveCaptureOptionParameters、LoadCaptureOptionParameters、GetAutoCaptureSetting、GetAutoHdrCaptureSetting、GetAutoNoiseRemovalSetting、LoadSettingFromFile 和 SaveSettingToFile:实例方法,用于保存和加载设备配置文件以及获取自动调节捕获选项的设置。
- m_handle:成员变量,用于存储设备句柄。
总结
简单总结了RVC.h代码的913~2249行。