RVC  1.15.0
a product by RVBUST.
RVC::X1 Struct Reference

X1 struct. More...

#include <RVC.h>

Classes

struct  CalculationCallBackInfo
 X1 CalculationCallBackInfo. More...
 
struct  CaptureOptions
 Capture options. More...
 
struct  CollectionCallBackInfo
 X1 CollectionCallBackInfo. More...
 
struct  CustomTransformOptions
 Options when setting custom transformation. More...
 

Public Types

typedef void(* CollectionCallBackPtr) (X1::CollectionCallBackInfo, X1::CaptureOptions, UserPtr)
 X1 CallBackPtr.
 
typedef void(* CalculationCallBackPtr) (X1::CalculationCallBackInfo, X1::CaptureOptions, UserPtr)
 

Public Member Functions

bool IsValid ()
 Check X1 is valid or not before use X1. More...
 
bool Open ()
 Open X1 before you use it. More...
 
void Close ()
 Close X1 after you Open it. More...
 
bool IsOpen ()
 Check X1 is open or not. More...
 
bool IsPhysicallyConnected ()
 Check X1 is physically connected or not. More...
 
bool OpenProtectiveCover ()
 Open ProtectiveCover. More...
 
bool OpenProtectiveCoverAsync ()
 Open ProtectiveCover Async. More...
 
bool CloseProtectiveCover ()
 Close ProtectiveCover. More...
 
bool CloseProtectiveCoverAsync ()
 Close ProtectiveCover Async. More...
 
bool ResetProtectiveCover ()
 Reset ProtectiveCover. More...
 
bool GetProtectiveCoverStatus (ProtectiveCoverStatus &status)
 Get Status of ProtectiveCover. More...
 
bool SetCollectionCallBack (X1::CollectionCallBackPtr cb, UserPtr ctx)
 Provide a callback to RVC system and it will be called when collection finished. More...
 
bool SetCalculationCallBack (X1::CalculationCallBackPtr cb, UserPtr ctx)
 Provide a callback to RVC system and it will be called when calculation finished. More...
 
bool Capture (const CaptureOptions &opts)
 Capture one point map and one image. This function will save capture options into camera. More...
 
bool Capture ()
 Capture one point map and one image. This function will load capture options from camera. More...
 
bool Capture2D (const CaptureOptions &opts)
 Capture one image. This function will save capture options into camera. You can use GetImage() to obtain 2D imgae. More...
 
bool Capture2D ()
 Capture one image. This function will load capture options from camera. You can use GetImage() to obtain 2D imgae. More...
 
bool SetBandwidth (float percent)
 Set the camera band width ratio. More...
 
bool GetBandwidth (float &percent)
 Get the camera band width ratio. More...
 
bool SetCustomTransformation (const CustomTransformOptions &opts)
 Set the Transformation of output point cloud. More...
 
bool GetCustomTransformation (CustomTransformOptions &opts)
 Get the Custom Transformation object. More...
 
bool SaveEncodedImagesData (const char *addr)
 Save encoded map in txt. More...
 
Image GetImage ()
 Get the Image object. More...
 
DepthMap GetDepthMap ()
 Get the DepthMap object. More...
 
PointMap GetPointMap ()
 Get the Point Map object. More...
 
ConfidenceMap GetConfidenceMap ()
 Get the Confidence Map object. More...
 
bool GetExtrinsicMatrix (float *matrix)
 Get the extrinsic matrix (transformation from calibration board to specified camera) More...
 
bool GetIntrinsicParameters (float *instrinsic_matrix, float *distortion)
 Get intrinsic and distortion parameters. More...
 
bool GetProjectorTemperature (float &temperature)
 GetProjectorTemperature. More...
 
bool GetCameraTemperature (CameraTempSelector seletor, float &temperature)
 GetCameraTemperature. More...
 
bool SetBalanceRatio (BalanceSelector selector, float value)
 Set the white balance ratio value. More...
 
bool GetBalanceRatio (BalanceSelector selector, float *value)
 Get the white balance ratio value. More...
 
bool GetBalanceRange (BalanceSelector selector, float *min_value, float *max_value)
 Get the white balance ratio value range. More...
 
bool AutoWhiteBalance (int wb_times=10, const CaptureOptions &opts=CaptureOptions(), const RVC::ROI &roi=RVC::ROI())
 Only Color Camera can use this function. This function can get suitable white balance paramters. More...
 
bool GetExposureTimeRange (int *min_value, int *max_value)
 Get the Exposure Time Range. More...
 
bool GetGainRange (float *min_value, float *max_value)
 Get the Gain Range. More...
 
bool GetGammaRange (float *min_value, float *max_value)
 Get the Gamma Range. More...
 
bool SaveCaptureOptionParameters (const X1::CaptureOptions &opts)
 Save capture option parameters. More...
 
bool LoadCaptureOptionParameters (X1::CaptureOptions &opts)
 Get capture option parameters. More...
 
bool GetAutoCaptureSetting (CaptureOptions &opts, const ROI &roi=ROI())
 Get auto capture setting. Exposure_time_2d, exposure_time_3d, projector_brightness, light_contrast_threshold will be adjusted automatically. automatically. More...
 
bool GetAutoHdrCaptureSetting (CaptureOptions &opts, const ROI &roi)
 adjust 3D capturing parameters More...
 
bool GetAutoNoiseRemovalSetting (CaptureOptions &opts)
 Automatically calculates and applies the optimal point cloud noise removal parameters. More...
 
bool LoadSettingFromFile (const char *filename)
 Load camera setting from local file . More...
 
bool SaveSettingToFile (const char *filename)
 Save camera setting to local file. More...
 
bool CheckRoi (ROI roi)
 Check whether the parameters of ROI comply with the rules of Device. More...
 
ROI AutoAdjustRoi (ROI roi=ROI())
 Automatically correct the parameters of ROI. You need to correct ROI before Capture/Captrue2D. More...
 
bool GetRoiRange (ROIRange &range)
 Get the range of ROI.
 
bool GetCameraResolution (Size &resolution)
 Get Camera Resolution. More...
 
bool GetAuto2DExposureTime (CaptureOptions &opts, const ROI &roi=ROI())
 Get auto 2d exposure time automatically. More...
 
Mesh GetMesh ()
 Get the Mesh object. More...
 
bool SetCurrentUserSet (const int &id)
 Set Current User Set by id. The user can utilize a total of 10 parameters groups to quickly adjust camera settings for different 3d imaging scenarios. More...
 
bool GetCurrentUserSet (int &id)
 Get Current User Set's id. More...
 
bool SetUserSetName (const int &id, const char *name)
 Set User Set's name with id. The user can briefly describe the usage scenario of this parameters groups by using a name. More...
 
bool GetUserSetName (const int &id, char *name)
 Get Current User Set's name with id. More...
 

Static Public Member Functions

static X1 Create (const Device &d, enum CameraID camid=CameraID_Left)
 Create a RVC X Camera and choose the CameraID which you desire before you use X1. More...
 
static void Destroy (X1 &x)
 Release all X1 resources after you use X1. More...
 

Public Attributes

Handle m_handle
 RVC Handle.
 

Detailed Description

X1 struct.

Member Function Documentation

◆ AutoAdjustRoi()

ROI RVC::X1::AutoAdjustRoi ( ROI  roi = ROI())

Automatically correct the parameters of ROI. You need to correct ROI before Capture/Captrue2D.

Parameters
roi[in] If you want to get a maximum ROI, you can pass in the default value.
Returns
ROI Corrected ROI.

◆ AutoWhiteBalance()

bool RVC::X1::AutoWhiteBalance ( int  wb_times = 10,
const CaptureOptions opts = CaptureOptions(),
const RVC::ROI roi = RVC::ROI() 
)

Only Color Camera can use this function. This function can get suitable white balance paramters.

Parameters
wb_timeshow many images used for calculate the white balance paramters
optscapture options. exposure_time_2d, gain_2d, gamma_2d will be used. use_projector_capturing_2d_image == true, brightness will be used too.
roiauto white balance will be operated here
Returns
true
false

◆ Capture() [1/2]

bool RVC::X1::Capture ( const CaptureOptions opts)

Capture one point map and one image. This function will save capture options into camera.

Parameters
optsCaptureOptions
Returns
true Success
false Failed

◆ Capture() [2/2]

bool RVC::X1::Capture ( )

Capture one point map and one image. This function will load capture options from camera.

Returns
true Success
false Failed

◆ Capture2D() [1/2]

bool RVC::X1::Capture2D ( const CaptureOptions opts)

Capture one image. This function will save capture options into camera. You can use GetImage() to obtain 2D imgae.

Parameters
optsCaptureOptions
Returns
true Success
false Failed

◆ Capture2D() [2/2]

bool RVC::X1::Capture2D ( )

Capture one image. This function will load capture options from camera. You can use GetImage() to obtain 2D imgae.

Returns
true Success
false Failed

◆ CheckRoi()

bool RVC::X1::CheckRoi ( ROI  roi)

Check whether the parameters of ROI comply with the rules of Device.

Parameters
roi[in] .
Returns
true
false

◆ Close()

void RVC::X1::Close ( )

Close X1 after you Open it.

◆ CloseProtectiveCover()

bool RVC::X1::CloseProtectiveCover ( )

Close ProtectiveCover.

Returns
true if success
false if failed

◆ CloseProtectiveCoverAsync()

bool RVC::X1::CloseProtectiveCoverAsync ( )

Close ProtectiveCover Async.

Returns
true if success
false if failed

◆ Create()

static X1 RVC::X1::Create ( const Device d,
enum CameraID  camid = CameraID_Left 
)
static

Create a RVC X Camera and choose the CameraID which you desire before you use X1.

Parameters
dOne RVC X Camera
camidChoose CameraID_Left or CameraID_Left
Returns
X1 RVC X object

◆ Destroy()

static void RVC::X1::Destroy ( X1 x)
static

Release all X1 resources after you use X1.

Parameters
xRVC X object to be released

◆ GetAuto2DExposureTime()

bool RVC::X1::GetAuto2DExposureTime ( CaptureOptions opts,
const ROI roi = ROI() 
)

Get auto 2d exposure time automatically.

Parameters
opts[in]
roi[in]
Returns
true
false

◆ GetAutoCaptureSetting()

bool RVC::X1::GetAutoCaptureSetting ( CaptureOptions opts,
const ROI roi = ROI() 
)

Get auto capture setting. Exposure_time_2d, exposure_time_3d, projector_brightness, light_contrast_threshold will be adjusted automatically. automatically.

Parameters
opts
Returns
CaptureOptions

◆ GetAutoHdrCaptureSetting()

bool RVC::X1::GetAutoHdrCaptureSetting ( CaptureOptions opts,
const ROI roi 
)

adjust 3D capturing parameters

Parameters
opts[in,out] capture options. if hdr_exposure_times > 1, hdr_exposure_times and hdr_exposuretime_content will be adjusted. If hdr_exposure_times equals to 1, exposure_time_3d will be adjusted.
roi[in] if width or height equal to 0, all image will be used.
Returns
true
false

◆ GetAutoNoiseRemovalSetting()

bool RVC::X1::GetAutoNoiseRemovalSetting ( CaptureOptions opts)

Automatically calculates and applies the optimal point cloud noise removal parameters.

WARNING: This is a time-consuming operation as it triggers actual camera captures. This function evaluates the current scene to determine the best cluster-based noise removal settings and applies them to the current point cloud.

Parameters
[in,out]optsCapture options. Upon successful execution, the following parameters inside this struct will be modified and overwritten:
  • opts.noise_removal_distance
  • opts.noise_removal_point_number
Returns
true The automatic noise removal parameters were successfully calculated and applied.
false The operation failed (e.g., camera not ready or capture failed).

◆ GetBalanceRange()

bool RVC::X1::GetBalanceRange ( BalanceSelector  selector,
float *  min_value,
float *  max_value 
)

Get the white balance ratio value range.

Parameters
selectorsupport BalanceSelector_Red, BalanceSelector_Green and BalanceSelector_Blue
min_valueselector's minimum value
max_valueselector's maximum value
Returns
true Success
false Failed

◆ GetBalanceRatio()

bool RVC::X1::GetBalanceRatio ( BalanceSelector  selector,
float *  value 
)

Get the white balance ratio value.

Parameters
selectorsupport BalanceSelector_Red, BalanceSelector_Green and BalanceSelector_Blue
valuebalance ratio value
Returns
true Success
false Failed

◆ GetBandwidth()

bool RVC::X1::GetBandwidth ( float &  percent)

Get the camera band width ratio.

Parameters
percentBand width ratio
Returns
true Success
false Failed

◆ GetCameraResolution()

bool RVC::X1::GetCameraResolution ( Size resolution)

Get Camera Resolution.

Parameters
resolution
Returns
true
false

◆ GetCameraTemperature()

bool RVC::X1::GetCameraTemperature ( CameraTempSelector  seletor,
float &  temperature 
)

GetCameraTemperature.

Note
TODO:
Parameters
seletor
&temperature
Return values

◆ GetConfidenceMap()

ConfidenceMap RVC::X1::GetConfidenceMap ( )

Get the Confidence Map object.

Returns
ConfidenceMap

◆ GetCurrentUserSet()

bool RVC::X1::GetCurrentUserSet ( int &  id)

Get Current User Set's id.

Parameters
id[out] 0~9
Returns
true
false

◆ GetCustomTransformation()

bool RVC::X1::GetCustomTransformation ( CustomTransformOptions opts)

Get the Custom Transformation object.

Parameters
opts
Returns
true
false

◆ GetDepthMap()

DepthMap RVC::X1::GetDepthMap ( )

Get the DepthMap object.

Returns
DepthMap A DepthMap

◆ GetExposureTimeRange()

bool RVC::X1::GetExposureTimeRange ( int *  min_value,
int *  max_value 
)

Get the Exposure Time Range.

Parameters
min_valueexposure time minimum value
max_valueexposure time maxinum value
Returns
true Success
false Failed

◆ GetExtrinsicMatrix()

bool RVC::X1::GetExtrinsicMatrix ( float *  matrix)

Get the extrinsic matrix (transformation from calibration board to specified camera)

Parameters
matrix[out] 4x4 transformation matrix stored as a 16-element array in row-major order. The matrix represents the transformation from the calibration board coordinate system to the specified camera coordinate system. Format: [R11, R12, R13, T1, R21, R22, R23, T2, R31, R32, R33, T3, 0, 0, 0, 1] Where R is the 3x3 rotation matrix and T is the 3x1 translation vector.
Returns
true Success
false Failed

◆ GetGainRange()

bool RVC::X1::GetGainRange ( float *  min_value,
float *  max_value 
)

Get the Gain Range.

Parameters
min_valuegain minimum value
max_valuegain minimum value
Returns
true Success
false Failed

◆ GetGammaRange()

bool RVC::X1::GetGammaRange ( float *  min_value,
float *  max_value 
)

Get the Gamma Range.

Parameters
min_valuegamma minimum value
max_valuegamma minimum value
Returns
true Success
false Failed

◆ GetImage()

Image RVC::X1::GetImage ( )

Get the Image object.

Returns
Image

◆ GetIntrinsicParameters()

bool RVC::X1::GetIntrinsicParameters ( float *  instrinsic_matrix,
float *  distortion 
)

Get intrinsic and distortion parameters.

Parameters
instrinsicMatrix[out] Output intrinsic matrix. This is a 9-element array storing a 3x3 matrix in row-major order: [fx, 0, cx, 0, fy, cy, 0, 0, 1]
  • fx, fy: Focal lengths in x and y directions (in pixels)
  • cx, cy: Principal point coordinates (in pixels)
distortion[out] Output distortion coefficients. This is a 5-element array containing: [k1, k2, k3, p1, p2]
  • k1, k2, k3: Radial distortion coefficients
  • p1, p2: Tangential distortion coefficients Note: This order is different from OpenCV's default order (k1,k2,p1,p2,k3).
Returns
true if successful
false if failed

◆ GetMesh()

Mesh RVC::X1::GetMesh ( )

Get the Mesh object.

Returns
Mesh A Mesh

◆ GetPointMap()

PointMap RVC::X1::GetPointMap ( )

Get the Point Map object.

Returns
PointMap

◆ GetProjectorTemperature()

bool RVC::X1::GetProjectorTemperature ( float &  temperature)

GetProjectorTemperature.

Parameters
&temperature
Returns
true Success
false Failed

◆ GetProtectiveCoverStatus()

bool RVC::X1::GetProtectiveCoverStatus ( ProtectiveCoverStatus status)

Get Status of ProtectiveCover.

Returns
ProtectiveCoverStatus

◆ GetUserSetName()

bool RVC::X1::GetUserSetName ( const int &  id,
char *  name 
)

Get Current User Set's name with id.

Parameters
id[in]
name[out]
Returns
true
false

◆ IsOpen()

bool RVC::X1::IsOpen ( )

Check X1 is open or not.

Returns
true Is open
false Not open

◆ IsPhysicallyConnected()

bool RVC::X1::IsPhysicallyConnected ( )

Check X1 is physically connected or not.

Returns
true Is physically connected
false Not physically connected

◆ IsValid()

bool RVC::X1::IsValid ( )

Check X1 is valid or not before use X1.

Returns
true Available
false Not available

◆ LoadCaptureOptionParameters()

bool RVC::X1::LoadCaptureOptionParameters ( X1::CaptureOptions opts)

Get capture option parameters.

Parameters
optsCaptureOptions
Returns
true Success
false Failed

◆ LoadSettingFromFile()

bool RVC::X1::LoadSettingFromFile ( const char *  filename)

Load camera setting from local file .

Parameters
filename[in]
Returns
true the content of file is correctly .
false the content of file is not correctly .

◆ Open()

bool RVC::X1::Open ( )

Open X1 before you use it.

Returns
true Success
false Failed

◆ OpenProtectiveCover()

bool RVC::X1::OpenProtectiveCover ( )

Open ProtectiveCover.

Returns
true if success
false if failed

◆ OpenProtectiveCoverAsync()

bool RVC::X1::OpenProtectiveCoverAsync ( )

Open ProtectiveCover Async.

Returns
true if success
false if failed

◆ ResetProtectiveCover()

bool RVC::X1::ResetProtectiveCover ( )

Reset ProtectiveCover.

Returns
true if success
false if failed

◆ SaveCaptureOptionParameters()

bool RVC::X1::SaveCaptureOptionParameters ( const X1::CaptureOptions opts)

Save capture option parameters.

Parameters
optsCaptureOptions
Returns
true Success
false Failed

◆ SaveEncodedImagesData()

bool RVC::X1::SaveEncodedImagesData ( const char *  addr)

Save encoded map in txt.

Parameters
addrsave encoded images address
Returns
int num

◆ SaveSettingToFile()

bool RVC::X1::SaveSettingToFile ( const char *  filename)

Save camera setting to local file.

Parameters
filename[in]
Returns
true Successfully written to the file.
false Failed write to file.

◆ SetBalanceRatio()

bool RVC::X1::SetBalanceRatio ( BalanceSelector  selector,
float  value 
)

Set the white balance ratio value.

Parameters
selectorsupport BalanceSelector_Red, BalanceSelector_Green and BalanceSelector_Blue
valuebalance ratio value
Returns
true Success
false Failed

◆ SetBandwidth()

bool RVC::X1::SetBandwidth ( float  percent)

Set the camera band width ratio.

Parameters
percentBand width ratio
Returns
true Success
false Failed

◆ SetCalculationCallBack()

bool RVC::X1::SetCalculationCallBack ( X1::CalculationCallBackPtr  cb,
UserPtr  ctx 
)

Provide a callback to RVC system and it will be called when calculation finished.

Parameters
cbThe callback
ctxThe user-pointer
Returns
true when succeed to set
false when failed to set

◆ SetCollectionCallBack()

bool RVC::X1::SetCollectionCallBack ( X1::CollectionCallBackPtr  cb,
UserPtr  ctx 
)

Provide a callback to RVC system and it will be called when collection finished.

Parameters
cbThe callback
ctxThe user-pointer
Returns
true when succeed to set
false when failed to set

◆ SetCurrentUserSet()

bool RVC::X1::SetCurrentUserSet ( const int &  id)

Set Current User Set by id. The user can utilize a total of 10 parameters groups to quickly adjust camera settings for different 3d imaging scenarios.

Parameters
id[in] 0~9
Returns
true
false

◆ SetCustomTransformation()

bool RVC::X1::SetCustomTransformation ( const CustomTransformOptions opts)

Set the Transformation of output point cloud.

Parameters
optsCustom Transform Options
Returns
true
false

◆ SetUserSetName()

bool RVC::X1::SetUserSetName ( const int &  id,
const char *  name 
)

Set User Set's name with id. The user can briefly describe the usage scenario of this parameters groups by using a name.

Parameters
id[in]
name[in]
Returns
true
false

The documentation for this struct was generated from the following file: