Pass-through 4K Module

In this page will introduce the API and data you can use from See-through 4K module. This module will only support VIVE Cosmos.

Pass-through 4K module API

int ViveSR::SRWork::PassThrough4K::GetPassThrough4KData(PassThrough4KData *data)

Gets the PassThrough4KData from SRWorks engine.

Return

Indicates the resulting ViveSR::Error status of this method.

Parameters

int ViveSR::SRWork::PassThrough4K::Get4KCameraParams(double *camera_params)

Get the camera parameters from SRWorks engine.

Return

Indicates the resulting ViveSR::Error status of this method.

Parameters
  • [out] camera_params: The camera parameter array. The array of ViveSR::SRWork::PassThrough4K::CAMERA_Param

int ViveSR::SRWork::PassThrough4K::GetPassThroug4KParameterBool(int parameter_name, bool *param_value)

Get the Pass through 4K parameter boolean from module.

Return

Indicates the resulting ViveSR::Error status of this method.

Parameters
  • [in] parameter_name: ViveSR::SRWork::PassThrough4K::Param

  • [out] param_value: The parameter output value pointer.

int ViveSR::SRWork::PassThrough4K::GetPassThroug4KParameterInt(int parameter_name, int *param_value)

Get the Pass through 4K parameter integer from module.

Return

Indicates the resulting ViveSR::Error status of this method.

Parameters
  • [in] parameter_name: ViveSR::SRWork::PassThrough4K::Param

  • [out] param_value: The parameter output value pointer.

int ViveSR::SRWork::PassThrough4K::GetPassThroug4KParameterFloat(int parameter_name, float *param_value)

Get the Pass through 4K parameter float from module.

Return

Indicates the resulting ViveSR::Error status of this method.

Parameters
  • [in] parameter_name: ViveSR::SRWork::PassThrough4K::Param

  • [out] param_value: The parameter output value pointer.

int ViveSR::SRWork::PassThrough4K::GetPassThroug4KParameterDouble(int parameter_name, double *param_value)

Get the Pass through 4K parameter double from module.

Return

Indicates the resulting ViveSR::Error status of this method.

Parameters
  • [in] parameter_name: ViveSR::SRWork::PassThrough4K::Param

  • [out] param_value: The parameter output value pointer.

int ViveSR::SRWork::PassThrough4K::SetPassThrough4KMaxFps(int max_fps)

Set the Pass through 4K maximum update interval of SRWorks engine.

Return

Indicates the resulting ViveSR::Error status of this method.

Parameters
  • [in] max_fps: The maximum fps want to set.

Pass-through 4K module data type

struct PassThrough4KData

Public Members

char *distorted_4k_frame_left
char *distorted_4k_frame_right
char *undistorted_4k_frame_left
char *undistorted_4k_frame_right
unsigned int output4k_frameSeq
unsigned int output4k_timeStp
float *output4k_pose_left
float *output4k_pose_right
int output4k_lux_left
int output4k_lux_right
int output4k_color_temperature_left
int output4k_color_temperature_right
char *camera4k_params
char *d3d11_texture2d_shared_handle_left
char *d3d11_texture2d_shared_handle_right
unsigned int d3d11_texture2d_buffer_index

Pass-through 4K module enums type

enum ViveSR::PassThrough4K::Param

An enum type for pass through 4K parameters.

Values:

OUTPUT_DISTORTED_4K_WIDTH = 0
OUTPUT_DISTORTED_4K_HEIGHT
OUTPUT_DISTORTED_4K_CHANNEL
OUTPUT_UNDISTORTED_4K_WIDTH
OUTPUT_UNDISTORTED_4K_HEIGHT
OUTPUT_UNDISTORTED_4K_CHANNEL
OUTPUT_4K_OFFSET_HEAD_TO_CAMERA
CAMERA_4K_PARAMETERS
OFFSET_HEAD_TO_4K_CAMERA_x0
OFFSET_HEAD_TO_4K_CAMERA_y0
OFFSET_HEAD_TO_4K_CAMERA_z0
OFFSET_HEAD_TO_4K_CAMERA_x1
OFFSET_HEAD_TO_4K_CAMERA_y1
OFFSET_HEAD_TO_4K_CAMERA_z1
OUTPUT_4K_READY
D3D11_SHARED_HANDLE_4K_UNDISTORTED_LEFT
D3D11_SHARED_HANDLE_4K_UNDISTORTED_RIGHT
enum ViveSR::PassThrough4K::CAMERA_Param

An enum type for camera parameters.

Values:

CAMERA_4K_FCX_0 = 0
CAMERA_4K_FCX_1
CAMERA_4K_FCY_0
CAMERA_4K_FCY_1
CAMERA_4K_FLEN_0
CAMERA_4K_FLEN_1
CAMERA_4K_ROTATION_0
CAMERA_4K_ROTATION_1
CAMERA_4K_ROTATION_2
CAMERA_4K_ROTATION_3
CAMERA_4K_ROTATION_4
CAMERA_4K_ROTATION_5
CAMERA_4K_ROTATION_6
CAMERA_4K_ROTATION_7
CAMERA_4K_ROTATION_8
CAMERA_4K_TRANSLATION_0
CAMERA_4K_TRANSLATION_1
CAMERA_4K_TRANSLATION_2
UNDISTORTION_4K_CENTER_CX_L
UNDISTORTION_4K_CENTER_CY_L
UNDISTORTION_4K_CENTER_CX_R
UNDISTORTION_4K_CENTER_CY_R
CAMERA_4K_PARAMS_MAX
enum ViveSR::PassThrough4K::InitType

An enum type for VR initial type.

Values:

SCENE = 1
BACKGROUND = 3
enum ViveSR::PassThrough4K::OutputMask

An enum type for pass through 4K output data structure.

Values:

DISTORTED_4K_FRAME_LEFT = 0
DISTORTED_4K_FRAME_RIGHT = 1
UNDISTORTED_4K_FRAME_LEFT = 2
UNDISTORTED_4K_FRAME_RIGHT = 3
OUTPUT4K_FRAME_SEQ = 4
OUTPUT4K_TIME_STP = 5
OUTPUT4K_POSE_LEFT = 6
OUTPUT4K_POSE_RIGHT = 7
OUTPUT4K_LUX_LEFT = 8
OUTPUT4K_LUX_RIGHT = 9
OUTPUT4K_COLOR_TEMPERATURE_LEFT = 10
OUTPUT4K_COLOR_TEMPERATURE_RIGHT = 11
OUTPUT4K_CAMERA_PARAMS = 12
D3D11_TEXTURE2D_SHARED_HANDLE_LEFT = 13
D3D11_TEXTURE2D_SHARED_HANDLE_RIGHT = 14
D3D11_TEXTURE2D_BUFFER_INDEX = 15
MAX