Basic concepts

Components

The Percipio depth camera, as a highly integrated intelligent device, houses multiple essential modules. These include but are not limited to: left and right infrared image, laser projector, color image sensor, Inertial Measurement Unit (IMU). All these tangible hardware modules are collectively categorized under the umbrella term “Components”.

Moreover, the camera also incorporates virtual components, such as the depth image sensor or histogram processing unit, which, while lacking physical form, can be interacted with and configured by users in a manner indistinguishable from tangible hardware modules.

As a complete device, the camera possesses a set of core configuration options, including but not limited to work mode settings, network configuration management and data resend configuration, and optical extrinsic parameter calibration. To facilitate unified access and control over these features, we have designed the entire camera system as an abstract “Device” Component. This allows users to efficiently manage and optimize various aspects of the camera’s performance.

The components are defined as follows:

typedef enum TY_DEVICE_COMPONENT_LIST
{
    TY_COMPONENT_DEVICE         = 0x80000000, ///< Abstract component stands for whole device, always enabled
    TY_COMPONENT_DEPTH_CAM      = 0x00010000, ///< Depth camera
    TY_COMPONENT_IR_CAM_LEFT    = 0x00040000, ///< Left IR camera
    TY_COMPONENT_IR_CAM_RIGHT   = 0x00080000, ///< Right IR camera
    TY_COMPONENT_RGB_CAM_LEFT   = 0x00100000, ///< Left RGB camera
    TY_COMPONENT_RGB_CAM_RIGHT  = 0x00200000, ///< Right RGB camera
    TY_COMPONENT_LASER          = 0x00400000, ///< Laser
    TY_COMPONENT_IMU            = 0x00800000, ///< Inertial Measurement Unit
    TY_COMPONENT_BRIGHT_HISTO   = 0x01000000, ///< virtual component for brightness histogram of ir
    TY_COMPONENT_STORAGE        = 0x02000000, ///< virtual component for device storage

    TY_COMPONENT_RGB_CAM        = TY_COMPONENT_RGB_CAM_LEFT ///< Some device has only one RGB camera, map it to left
}TY_DEVICE_COMPONENT_LIST;

where,

  • TY_COMPONENT_DEVICE represents the entity of an depth camera, hereinafter referred to as the depth camera.

  • TY_COMPONENT_DEPTH_CAM represents the depth image sensor component.

  • TY_COMPONENT_IR_CAM_LEFT represents the left infrared image sensor component.

  • TY_COMPONENT_IR_CAM_RIGHT represents the right infrared image sensor component.

  • TY_COMPONENT_RGB_CAM_LEFT represents the left color image sensor component. If the depth camera only has one color image sensor component, TY_COMPONENT_RGB_CAM represents TY_COMPONENT_RGB_CAM_LEFT by default.

  • TY_COMPONENT_RGB_CAM_RIGHT represents the right color image sensor component.

Features

Within the SDK development framework, depth cameras and their individual components each possess a variety of functional parameters, which are referred to as “features” within software engineering parlance. Based on the specific characteristics of each feature, the SDK defines different types of data structures to encapsulate them, such as using int types for integer-valued features, bool types for Boolean features, struct types to store complex data attributes, and enum enumerations to define a finite set of attribute options.

Developers engage with the component features of the depth camera through a consistent naming convention API interface. For instance, use functions like TYGetInt and TYSetInt to retrieve or modify integer-type features, while TYGetStruct and TYSetStruct are employed for reading or updating features with structured data types.

Furthermore, there may exist interdependencies among features across different components within a depth camera. When adjusting one property of a certain component, the system can automatically trigger a mechanism where the same or related property in another component is updated in synchronization—a relationship known as “binding” within the SDK. You can learn about these binding relationships by querying the feature information.

Note

It’s worth noting that different models and versions of depth cameras may support varying combinations of components and features. Therefore, in practical applications, it’s necessary to query the information of components and features first.

You can query the components and features supported by the depth camera with the following methods:

  1. Use APIs to query the components and features supported by the depth camera.

  2. Connect the camera to the host computer, and execute the executable file produced by compiling SDK sample program DumpAllFeatures, then all the components and features information of the current camera will be list.

  3. Connect the camera to the host computer, and generate the fetch_config.xml file by executing the command DumpAllFeatures.exe -d in the compiled SDK sample program directory. The fetch_config.xml includes all the components and features information of the current camera.

Take the PS800-E1 camera as an example, the following is the content of its fetch_config.xml file, which includes the components and features supported by the camera, and the relationship between features and components:

<?xml version="1.0" ?>
<config version="1">
<comprotocol>1.0</comprotocol>
<component id="0x80000000" addr="0x01000000" name="device">
<feature id="0x5f00" name="SN" rw="1" hide="0">207000139972</feature>
<feature id="0x5f01" name="vendor" rw="1" hide="0">Percipio</feature>
<feature id="0x5f02" name="model" rw="1" hide="0">PS800-E1</feature>
<feature id="0x5f08" name="user defined name" rw="1" hide="0">Percipio</feature>
<feature id="0x1202" addr="0x204" name="frame per trigger" rw="3" hide="0">1</feature>
<feature id="0x7523" addr="0x208" name="struct trigger mode" rw="3" hide="0"/>
<feature id="0x7525" addr="0x218" name="struct trigger mode ex" rw="3" hide="0"/>
<feature id="0x1010" absaddr="0x64c" name="persistent IP" rw="3" hide="0"/>
<feature id="0x1011" absaddr="0x65c" name="persistent netmask" rw="3" hide="0"/>
<feature id="0x1012" absaddr="0x66c" name="persistent gateway" rw="3" hide="0"/>
<feature id="0x1014" addr="0x400020" name="packet delay" rw="3" hide="0" min="0" max="10000" inc="1"/>
<feature id="0x1017" addr="0x40002c" name="packet size" rw="3" hide="0" min="100" max="1500" inc="1"/>
<feature id="0x1016" addr="0x400024" name="ntp server ip" rw="3" hide="0"/>
<feature id="0x4207" addr="0x214" name="trigger out io" rw="2" hide="0" writableAtRun="1"/>
<feature id="0x4205" addr="0x20c" name="cmos sync" rw="3" hide="0"/>
<feature id="0x4203" name="keep alive onoff" rw="3" hide="0"/>
<feature id="0x1204" name="keep alive timeout" rw="3" hide="0" min="2000" inc="1" max="30000"/>
<feature id="0x1206" addr="0x210" name="trigger delay us" rw="3" hide="0" min="0" max="1300000" inc="1"/>
<feature id="0x1208" addr="0x21C" name="trigger duration us" rw="3" hide="0" min="1" max="1300000" inc="1"/>
<feature id="0x3209" addr="0x220" name="stream async" rw="3" hide="0">
<entry name="async off" value="0"/>
<entry name="async depth" value="1"/>
<entry name="async rgb" value="2"/>
<entry name="async depth rgb" value="3"/>
<entry name="async all" value="255"/>
</feature>
<feature id="0x3201" addr="0x200" name="trig pol" rw="3" hide="0">
<entry name="falling edge" value="0"/>
<entry name="rising edge" value="1"/>
</feature>
<feature id="0x1210" addr="0x228" name="capture time us" rw="1" hide="0" volatile="1"/>
<feature id="0x3211" addr="0x22c" name="sync type" rw="3" hide="0" volatile="1">
<entry name="sync type none" value="0"/>
<entry name="sync type host" value="1"/>
<entry name="sync type ntp" value="2"/>
<entry name="sync type ptp slave" value="3"/>
<entry name="sync type can" value="4"/>
<entry name="sync type ptp master" value="5"/>
</feature>
<feature id="0x4212" addr="0x230" name="sync ready" rw="1" hide="0" volatile="1"/>
<feature id="0x4213" addr="0x23c" name="flash light enable" rw="3" hide="0" volatile="1" writableAtRun="1"/>
<feature id="0x1214" addr="0x240" name="flash light intensity" rw="3" hide="0" min="0" max="63" inc="1" volatile="1" writableAtRun="1"/>
<intpf>AWQAUAA=</intpf>
         <feature id="0x5f03" name="hardware version" rw="1" hide="0">1.3.0</feature>
        <feature id="0x5f04" name="firmware version" rw="1" hide="0">3.13.50</feature>
        <build>
            <hash>model:AP03B04-019PS80X_X_X_F107_XXL15_DVP_DF64;rtl:R0.1.0_0_gbb5f11bf35;kernel:R3.13.50-0-g97ce30b0f8;tycam:R3.6.27-5d294474;gevcam:R3.13.50-0-gda6a15f3</hash>
        </build>
<config_version>test-12df38d5d833ddf2f45d9c661c0ee79a64d23e49</config_version>
<tech_model>PS801-GTIS3-46-CBS-MT4</tech_model>
<generated_time>2023-03-23T102304</generated_time>
<calibration_time>2023-03-22T105945</calibration_time>
</component>
<component id="0x00010000" addr="0x02000000" name="depth">
<feature id="0x210a" addr="0x63c" name="scale unit" rw="3" hide="0" min="0.0125" max="8.0">0.25</feature>
<feature id="0x1003" name="intrinsic width" rw="1" hide="1">1280</feature>
<feature id="0x1004" name="intrinsic height" rw="1" hide="1">960</feature>
<feature id="0x7000" name="depth intrinsic" rw="1" hide="0">1054.2317575020252 0.0 602.9017562866211 0.0 1054.2317575020252 489.2760601043701 0.0 0.0 1.0</feature>
<feature id="0x1104" addr="0x10" name="image width" rw="1" hide="0"/>
<feature id="0x1105" addr="0x14" name="image height" rw="1" hide="0"/>
<feature id="0x3109" addr="0x18" name="image mode" rw="3" hide="0">
<entry value="0x202801e0" name="DEPTH16_640x480"/>
<entry value="0x205003c0" name="DEPTH16_1280x960"/>
<entry value="0x201400f0" name="DEPTH16_320x240"/>
</feature>
<feature id="0x1610" addr="0x600" name="image number" rw="3" hide="1" min="1" max="20">18</feature>
<feature id="0x1611" addr="0x604" name="disparity num" rw="3" hide="1" min="1" max="320">256</feature>
<feature id="0x1612" addr="0x608" name="disparity offset" rw="3" hide="1" min="-320" max="320">-64</feature>
<feature id="0x1613" addr="0x60c" name="match window height" rw="3" hide="1" min="1" inc="2" max="17">5</feature>
<feature id="0x1614" addr="0x610" name="semi global param p1" rw="3" hide="1" min="0" max="65535" writableAtRun="1">400</feature>
<feature id="0x161f" addr="0x640" name="semi global param p1 scale" rw="3" hide="1" min="0" max="25" writableAtRun="1">10</feature>
<feature id="0x1615" addr="0x614" name="semi global param p2" rw="3" hide="1" min="0" max="65535" writableAtRun="1">600</feature>
<feature id="0x1616" addr="0x618" name="uniqueness factor param" rw="3" hide="1" min="0" max="511" writableAtRun="1">1</feature>
<feature id="0x1617" addr="0x61c" name="uniqueness min absolute diff" rw="3" hide="1" min="0" max="65535" writableAtRun="1">50</feature>
<feature id="0x4619" addr="0x624" name="enable half window size" rw="3" hide="1" writableAtRun="1">true</feature>
<feature id="0x161a" addr="0x628" name="match window width" rw="3" hide="1" min="1" inc="2" max="9">5</feature>
<feature id="0x461b" addr="0x62C" name="enable median filter" rw="3" hide="1">true</feature>
<feature id="0x461c" addr="0x630" name="enable LRC" rw="3" hide="1">true</feature>
<feature id="0x161d" addr="0x634" name="max LRC diff" rw="3" hide="1" min="1" max="4095" writableAtRun="1">100</feature>
<feature id="0x161e" addr="0x638" name="median filter thresh" rw="3" hide="1" min="1" max="511" writableAtRun="1">100</feature>
</component>
<component id="0x00040000" addr="0x03000000" name="leftir">
<feature id="0x3109" addr="0x18" name="image mode" rw="1" hide="0">
<entry value="0x105003c0" name="mono8 1280x960"/>
</feature>
<feature id="0x1104" addr="0x10" name="image width" rw="1" hide="0">1280</feature>
<feature id="0x1105" addr="0x14" name="image height" rw="1" hide="0">960</feature>
<feature id="0x1003" name="intrinsic width" rw="1" hide="1">1280</feature>
<feature id="0x1004" name="intrinsic height" rw="1" hide="1">960</feature>
<feature id="0x7000" name="intrinsic" rw="1" hide="0">1099.6422801070535 0.0 635.5591519569598 0.0 1099.7626279797469 478.15707969797677 0.0 0.0 1.0</feature>
<feature id="0x7006" name="distortion" rw="1" hide="0">0.14839246001834153 0.33148945598594326 0.0004749953971940703 -0.0018516237313605183 0.2679354176797638 0.4169150539175866 0.26134267249460624 0.41480430104385874 0.004530260339346076 -0.0009848702020653606 -0.0012338680168393031 0.0003369837281281974</feature>
<feature id="0x4510" addr="0x324" name="undistort" rw="3" hide="0"/>
<feature id="0x1301" addr="0x304" name="exposure time" rw="3" hide="0" min="3" max="990" inc="1" writableAtRun="1"/>
<feature id="0x1303" addr="0x310" name="gain" rw="3" hide="0" min="0" max="255" inc="1" writableAtRun="1"/>
<feature id="0x1524" addr="0x328" name="analog gain" rw="3" hide="0" min="0" max="3" inc="1" writableAtRun="1"/>
<feature id="0x4525" addr="0x32C" name="hdr" rw="3" hide="0" inc="1" max="1" min="0" writableAtRun="1"/>
<feature id="0x6526" addr="0x330" name="hdr parameter" rw="3" hide="0" inc="1" size="32" valid_size="8" unit_size="4" writableAtRun="1" volatile="1"/>
</component>
<component id="0x00080000" addr="0x04000000" name="rightir">
<feature id="0x3109" addr="0x18" name="image mode" rw="1" hide="0">
<entry value="0x105003c0" name="mono8 1280x960"/>
</feature>
<feature id="0x1104" addr="0x10" name="image width" rw="1" hide="0">1280</feature>
<feature id="0x1105" addr="0x14" name="image height" rw="1" hide="0">960</feature>
<feature id="0x1003" name="intrinsic width" rw="1" hide="1">1280</feature>
<feature id="0x1004" name="intrinsic height" rw="1" hide="1">960</feature>
<feature id="0x7000" name="intrinsic" rw="1" hide="0">1102.6289588424409 0.0 605.0415461097733 0.0 1102.5961255672967 504.7536715768262 0.0 0.0 1.0</feature>
<feature id="0x7006" name="distortion" rw="1" hide="0">-0.40600540001146807 0.13167838342552565 -0.0002968802873782165 -0.0030883558458046573 0.23212074924639436 -0.1373847911281034 -0.0835506967881405 0.3688082325320697 0.0067714527034811985 -0.0011556445632196217 0.0008093936128179373 -0.000329339847994431</feature>
<feature id="0x7001" name="rightIR to leftIR extrinsic" rw="1" hide="0"> 0.9969717183942517 -0.000930083389393707 0.07775942172432472 -62.11424229701756 0.0011655758584799263 0.9999948711294331 -0.0029831439366097764 0.1620422041319582 -0.07775624833369173 0.0030647446414304846 0.9969676891380945 3.2332555409082824 0.0 0.0 0.0 1.0</feature>
<feature bind="0x00044510"/>
<feature id="0x1301" addr="0x304" name="exposure time" rw="3" hide="0" min="3" max="990" inc="1" writableAtRun="1"/>
<feature id="0x1303" addr="0x310" name="gain" rw="3" hide="0" min="0" max="255" inc="1" writableAtRun="1"/>
<feature id="0x1524" addr="0x328" name="analog gain" rw="3" hide="0" min="0" max="3" inc="1" writableAtRun="1"/>
<feature id="0x4525" addr="0x32C" name="hdr" rw="3" hide="0" inc="1" max="1" min="0" writableAtRun="1"/>
<feature id="0x6526" addr="0x330" name="hdr parameter" rw="3" hide="0" inc="1" size="32" valid_size="8" unit_size="4" writableAtRun="1" volatile="1"/>
</component>
<component id="0x00100000" addr="0x05000000" name="rgb">
<feature id="0x3109" addr="0x18" name="image mode" rw="3" hide="0">
<entry value="0x22a00780" name="yuyv 2560x1920"/>
<entry value="0x227805a0" name="yuyv 1920x1440"/>
<entry value="0x225003c0" name="yuyv 1280x960"/>
<entry value="0x222801e0" name="yuyv 640x480"/>
<entry value="0x63a00780" name="CSI BAYER12GR_2560x1920"/>
</feature>
<feature addr="0x224" hide="0" id="0x7305" name="struct aec roi" rw="3" writableAtRun="1"/>
<feature addr="0x300" hide="0" id="0x4300" name="auto exp ctrl" rw="3" writableAtRun="1"/>
<feature addr="0x304" hide="0" id="0x1301" inc="1" max="65535" min="0" name="exposure time" rw="3" writableAtRun="1"/>
<feature addr="0x314" hide="0" id="0x4304" name="auto white balance" rw="3" writableAtRun="1"/>
<feature addr="0x328" hide="0" id="0x1524" inc="1" max="65535" min="1" name="analog gain" rw="3" writableAtRun="1"/>
<feature id="0x1104" addr="0x10" name="image width" rw="1" hide="0" volatile="1"/>
<feature id="0x1105" addr="0x14" name="image height" rw="1" hide="0" volatile="1"/>
<feature id="0x1003" name="intrinsic width" rw="1" hide="1">2560</feature>
<feature id="0x1004" name="intrinsic height" rw="1" hide="1">1920</feature>
<feature id="0x7000" name="rgb intrinsic" rw="1" hide="0"> 1812.1037424482781 0.0 1292.6159611204173 0.0 1812.6109404736285 953.4487938795116 0.0 0.0 1.0</feature>
<feature id="0x7001" name="rgb to leftIR extrinsic" rw="1" hide="0"> 0.9998890302334238 0.0055181442374348764 0.013837532404246783 -24.23577954309032 -0.005473571678213259 0.9999797159676933 -0.003256941242159149 0.01352496091849163 -0.013855223994839527 0.003180839094685501 0.9998989524100457 -1.8158147784446648 0.0 0.0 0.0 1.0</feature>
<feature id="0x7006" name="distortion" rw="1" hide="0">0.0251240287824338 0.4229310499989516 -0.0002078352336696032 0.003819499512986287 0.2989182575077895 0.2670502743956875 0.32862080651754005 0.44378794919592357 -0.00705825978811275 0.0016019189997127624 0.0004202642423038643 -0.00014313939221168755</feature>
</component>
<component id="0x00400000" addr="0x07000000" name="laser">
<feature id="0x1500" addr="0x500" name="power" rw="3" hide="0" min="0" max="100" inc="1" writableAtRun="1"/>
<feature id="0x4501" addr="0x504" name="auto ctrl" rw="3" hide="0"/>
</component>
<component id="0x01000000" addr="0x08000000" name="histogram">
 </component>
<component id="0x02000000" addr="0x09000000" name="storage">
<feature id="0x600a" addr="0x100000" name="custom block" rw="3" hide="0" volatile="1" size="4096"/>
<feature id="0x600b" addr="0x200000" name="isp block" rw="3" hide="0" volatile="1" size="65536"/>
</component>
<constraint id="0x00000001">
<rules id="0x0001" msg="image_num x match_h out of range">
<script>
 FunctionCheck(a,b)
 {
 return ((a + 1) &gt;&gt; 1) * b &lt; 48;
 }
 </script>
<parameter id="0x00011610" rw="1" hide="1">a</parameter>
<parameter id="0x00011613" rw="1" hide="1">b</parameter>
</rules>
</constraint>
</config>

Important

fetch_config.xml file description:

  1. <component></component> A pair of component tags describes the features supported by this component.

    For example:

    <component id="0x80000000" addr="0x01000000" name="device">
    ……
    </component>
    

    The pair of component tags above includes the features supported by the device component.

  2. <feature></feature> A pair of feature tags introduces the name, read-write permission, maximum value, minimum value, value increment, and setting method of the feature. Some features enumerate the settable values.

    • name: feature name.

    • rw: Read and write permissions. rw=1 means read-only, rw=3 means read and write.

    • min: The minimum value of this feature.

    • max: The maximum value of this feature.

    • inc: value increment. For example, inc=2 means the feature value goes up or down by 2 each time.

    • writableAtRun: Setting method. writableAtRun=1 means that this feature can be set during the image acquisition process. Features without this specification must be set before camera acquisition.

  3. <constraint></constraint> A pair of constraint tags describes the limitations of parameter settings

    For example:

    <constraint id="0x00000001">
    <rules id="0x0001" msg="image_num x match_h out of range">
    <script>
     FunctionCheck(a,b)
     {
     return ((a + 1) &gt;&gt; 1) * b &lt; 48;
     }
    </script>
    <parameter id="0x00011610" rw="1" hide="1">a</parameter>
    <parameter id="0x00011613" rw="1" hide="1">b</parameter>
    </rules>
    </constraint>
    

    This <constraint></constraint> tag describes the setting requirements for parameters a and b: [(a + 1) / 2] * b < 48. Please refer to the previous context to locate the specific parameters corresponding to a/b based on the parameter id (component id|feature id).

The data type of features are divided into integer type (INT), boolean type (BOOL), floating-point type (FLOAT), enumeration type (ENUM), and structure type (STRUCT). The feature definitions are as follows:

typedef enum TY_FEATURE_ID_LIST
{
    TY_STRUCT_CAM_INTRINSIC         = 0x0000 | TY_FEATURE_STRUCT, ///< see TY_CAMERA_INTRINSIC
    TY_STRUCT_EXTRINSIC_TO_DEPTH    = 0x0001 | TY_FEATURE_STRUCT, ///< extrinsic between  depth cam and current component , see TY_CAMERA_EXTRINSIC
    TY_STRUCT_EXTRINSIC_TO_IR_LEFT  = 0x0002 | TY_FEATURE_STRUCT, ///< extrinsic between  left IR and current compoent, see TY_CAMERA_EXTRINSIC
    TY_STRUCT_CAM_DISTORTION        = 0x0006 | TY_FEATURE_STRUCT, ///< see TY_CAMERA_DISTORTION
    TY_STRUCT_CAM_CALIB_DATA        = 0x0007 | TY_FEATURE_STRUCT, ///< see TY_CAMERA_CALIB_INFO
    TY_BYTEARRAY_CUSTOM_BLOCK       = 0x000A | TY_FEATURE_BYTEARRAY, ///< used for reading/writing custom block
    TY_BYTEARRAY_ISP_BLOCK          = 0x000B | TY_FEATURE_BYTEARRAY, ///< used for reading/writing fpn block

    TY_INT_PERSISTENT_IP            = 0x0010 | TY_FEATURE_INT,
    TY_INT_PERSISTENT_SUBMASK       = 0x0011 | TY_FEATURE_INT,
    TY_INT_PERSISTENT_GATEWAY       = 0x0012 | TY_FEATURE_INT,
    TY_BOOL_GVSP_RESEND             = 0x0013 | TY_FEATURE_BOOL,
    TY_INT_PACKET_DELAY             = 0x0014 | TY_FEATURE_INT,    ///< microseconds
    TY_INT_ACCEPTABLE_PERCENT       = 0x0015 | TY_FEATURE_INT,
    TY_INT_NTP_SERVER_IP            = 0x0016 | TY_FEATURE_INT,    ///< Ntp server IP
    TY_INT_PACKET_SIZE              = 0x0017 | TY_FEATURE_INT,
    TY_STRUCT_CAM_STATISTICS        = 0x00ff | TY_FEATURE_STRUCT, ///< statistical information, see TY_CAMERA_STATISTICS

    TY_INT_WIDTH_MAX                = 0x0100 | TY_FEATURE_INT,
    TY_INT_HEIGHT_MAX               = 0x0101 | TY_FEATURE_INT,
    TY_INT_OFFSET_X                 = 0x0102 | TY_FEATURE_INT,
    TY_INT_OFFSET_Y                 = 0x0103 | TY_FEATURE_INT,
    TY_INT_WIDTH                    = 0x0104 | TY_FEATURE_INT,  ///< Image width
    TY_INT_HEIGHT                   = 0x0105 | TY_FEATURE_INT,  ///< Image height
    TY_ENUM_IMAGE_MODE              = 0x0109 | TY_FEATURE_ENUM, ///< Resolution-PixelFromat mode, see TY_IMAGE_MODE_LIST

    //@brief scale unit
    //depth image is uint16 pixel format with default millimeter unit ,for some device  can output Sub-millimeter accuracy data
    //the acutal depth (mm)= PixelValue * ScaleUnit
    TY_FLOAT_SCALE_UNIT             = 0x010a | TY_FEATURE_FLOAT,

    TY_ENUM_TRIGGER_POL             = 0x0201 | TY_FEATURE_ENUM,  ///< Trigger POL, see TY_TRIGGER_POL_LIST
    TY_INT_FRAME_PER_TRIGGER        = 0x0202 | TY_FEATURE_INT,  ///< Number of frames captured per trigger
    TY_STRUCT_TRIGGER_PARAM         = 0x0523 | TY_FEATURE_STRUCT,  ///< param of trigger, see TY_TRIGGER_PARAM
    TY_STRUCT_TRIGGER_PARAM_EX      = 0x0525 | TY_FEATURE_STRUCT,  ///< param of trigger, see TY_TRIGGER_PARAM_EX
    TY_STRUCT_TRIGGER_TIMER_LIST    = 0x0526 | TY_FEATURE_STRUCT,  ///< param of trigger mode 20, see TY_TRIGGER_TIMER_LIST
    TY_STRUCT_TRIGGER_TIMER_PERIOD  = 0x0527 | TY_FEATURE_STRUCT,  ///< param of trigger mode 21, see TY_TRIGGER_TIMER_PERIOD
    TY_BOOL_KEEP_ALIVE_ONOFF        = 0x0203 | TY_FEATURE_BOOL, ///< Keep Alive switch
    TY_INT_KEEP_ALIVE_TIMEOUT       = 0x0204 | TY_FEATURE_INT,  ///< Keep Alive timeout
    TY_BOOL_CMOS_SYNC               = 0x0205 | TY_FEATURE_BOOL, ///< Cmos sync switch
    TY_INT_TRIGGER_DELAY_US         = 0x0206 | TY_FEATURE_INT,  ///< Trigger delay time, in microseconds
    TY_BOOL_TRIGGER_OUT_IO          = 0x0207 | TY_FEATURE_BOOL, ///< Trigger out IO
    TY_INT_TRIGGER_DURATION_US      = 0x0208 | TY_FEATURE_INT,  ///< Trigger duration time, in microseconds
    TY_ENUM_STREAM_ASYNC            = 0x0209 | TY_FEATURE_ENUM,  ///< stream async switch, see TY_STREAM_ASYNC_MODE
    TY_INT_CAPTURE_TIME_US          = 0x0210 | TY_FEATURE_INT,  ///< capture time in multi-ir
    TY_ENUM_TIME_SYNC_TYPE          = 0x0211 | TY_FEATURE_ENUM, ///< see TY_TIME_SYNC_TYPE
    TY_BOOL_TIME_SYNC_READY         = 0x0212 | TY_FEATURE_BOOL,
    TY_BOOL_FLASHLIGHT              = 0x0213 | TY_FEATURE_BOOL,
    TY_INT_FLASHLIGHT_INTENSITY     = 0x0214 | TY_FEATURE_INT,

    TY_BOOL_AUTO_EXPOSURE           = 0x0300 | TY_FEATURE_BOOL, ///< Auto exposure switch
    TY_INT_EXPOSURE_TIME            = 0x0301 | TY_FEATURE_INT,  ///< Exposure time in percentage
    TY_BOOL_AUTO_GAIN               = 0x0302 | TY_FEATURE_BOOL, ///< Auto gain switch
    TY_INT_GAIN                     = 0x0303 | TY_FEATURE_INT,  ///< Sensor Gain
    TY_BOOL_AUTO_AWB                = 0x0304 | TY_FEATURE_BOOL, ///< Auto white balance
    TY_STRUCT_AEC_ROI               = 0x0305 | TY_FEATURE_STRUCT,  ///< region of aec statistics, see TY_AEC_ROI_PARAM

    TY_INT_LASER_POWER              = 0x0500 | TY_FEATURE_INT,  ///< Laser power level
    TY_BOOL_LASER_AUTO_CTRL         = 0x0501 | TY_FEATURE_BOOL, ///< Laser auto ctrl

    TY_BOOL_UNDISTORTION            = 0x0510 | TY_FEATURE_BOOL, ///< Output undistorted image
    TY_BOOL_BRIGHTNESS_HISTOGRAM    = 0x0511 | TY_FEATURE_BOOL, ///< Output bright histogram
    TY_BOOL_DEPTH_POSTPROC          = 0x0512 | TY_FEATURE_BOOL, ///< Do depth image postproc

    TY_INT_R_GAIN                   = 0x0520 | TY_FEATURE_INT,  ///< Gain of R channel
    TY_INT_G_GAIN                   = 0x0521 | TY_FEATURE_INT,  ///< Gain of G channel
    TY_INT_B_GAIN                   = 0x0522 | TY_FEATURE_INT,  ///< Gain of B channel

    TY_INT_ANALOG_GAIN              = 0x0524 | TY_FEATURE_INT,  ///< Analog gain
    TY_BOOL_HDR                     = 0x0525 | TY_FEATURE_BOOL,
    TY_BYTEARRAY_HDR_PARAMETER      = 0x0526 | TY_FEATURE_BYTEARRAY,

    TY_BOOL_IMU_DATA_ONOFF          = 0x0600 | TY_FEATURE_BOOL, ///< IMU Data Onoff
    TY_STRUCT_IMU_ACC_BIAS          = 0x0601 | TY_FEATURE_STRUCT, ///< IMU acc bias matrix, see TY_ACC_BIAS
    TY_STRUCT_IMU_ACC_MISALIGNMENT  = 0x0602 | TY_FEATURE_STRUCT, ///< IMU acc misalignment matrix, see TY_ACC_MISALIGNMENT
    TY_STRUCT_IMU_ACC_SCALE         = 0x0603 | TY_FEATURE_STRUCT, ///< IMU acc scale matrix, see TY_ACC_SCALE
    TY_STRUCT_IMU_GYRO_BIAS         = 0x0604 | TY_FEATURE_STRUCT, ///< IMU gyro bias matrix, see TY_GYRO_BIAS
    TY_STRUCT_IMU_GYRO_MISALIGNMENT = 0x0605 | TY_FEATURE_STRUCT, ///< IMU gyro misalignment matrix, see TY_GYRO_MISALIGNMENT
    TY_STRUCT_IMU_GYRO_SCALE        = 0x0606 | TY_FEATURE_STRUCT, ///< IMU gyro scale matrix, see TY_GYRO_SCALE
    TY_STRUCT_IMU_CAM_TO_IMU        = 0x0607 | TY_FEATURE_STRUCT, ///< IMU camera to imu matrix, see TY_CAMERA_TO_IMU
    TY_ENUM_IMU_FPS                 = 0x0608 | TY_FEATURE_ENUM, ///< IMU fps, see TY_IMU_FPS_LIST

    TY_ENUM_DEPTH_QUALITY           = 0x0900 | TY_FEATURE_ENUM,  ///< the quality of generated depth, see TY_DEPTH_QUALITY
    TY_INT_FILTER_THRESHOLD         = 0x0901 | TY_FEATURE_INT,   ///< the threshold of the noise filter, 0 for disabled
    TY_INT_TOF_CHANNEL              = 0x0902 | TY_FEATURE_INT,   ///< the frequency channel of tof
}TY_FEATURE_ID_LIST;

Example of data structure for features:

  1. The resolutions supported by the depth, leftir / rightir and rgb components are as follows:

    typedef enum TY_RESOLUTION_MODE_LIST
    {
        TY_RESOLUTION_MODE_160x100      = (160<<12)+100,    ///< 0x000a0078
        TY_RESOLUTION_MODE_160x120      = (160<<12)+120,    ///< 0x000a0078
        TY_RESOLUTION_MODE_240x320      = (240<<12)+320,    ///< 0x000f0140
        TY_RESOLUTION_MODE_320x180      = (320<<12)+180,    ///< 0x001400b4
        TY_RESOLUTION_MODE_320x200      = (320<<12)+200,    ///< 0x001400c8
        TY_RESOLUTION_MODE_320x240      = (320<<12)+240,    ///< 0x001400f0
        TY_RESOLUTION_MODE_480x640      = (480<<12)+640,    ///< 0x001e0280
        TY_RESOLUTION_MODE_640x360      = (640<<12)+360,    ///< 0x00280168
        TY_RESOLUTION_MODE_640x400      = (640<<12)+400,    ///< 0x00280190
        TY_RESOLUTION_MODE_640x480      = (640<<12)+480,    ///< 0x002801e0
        TY_RESOLUTION_MODE_960x1280     = (960<<12)+1280,    ///< 0x003c0500
        TY_RESOLUTION_MODE_1280x720     = (1280<<12)+720,   ///< 0x005002d0
        TY_RESOLUTION_MODE_1280x800     = (1280<<12)+800,   ///< 0x00500320
        TY_RESOLUTION_MODE_1280x960     = (1280<<12)+960,   ///< 0x005003c0
        TY_RESOLUTION_MODE_1920x1080    = (1920<<12)+1080,   ///< 0x00780438
        TY_RESOLUTION_MODE_2592x1944    = (2592<<12)+1944,  ///< 0x00a20798
    }TY_RESOLUTION_MODE_LIST;
    
  2. The image formats supported by the depth, leftir/rightir and rgb components are as follows:

    typedef enum TY_PIXEL_FORMAT_LIST{
        TY_PIXEL_FORMAT_UNDEFINED   = 0,
        TY_PIXEL_FORMAT_MONO        = (TY_PIXEL_8BIT  | (0x0 << 24)), ///< 0x10000000
        TY_PIXEL_FORMAT_BAYER8GB    = (TY_PIXEL_8BIT  | (0x1 << 24)), ///< 0x11000000
        TY_PIXEL_FORMAT_BAYER8BG    = (TY_PIXEL_8BIT  | (0x2 << 24)), ///< 0x12000000
        TY_PIXEL_FORMAT_BAYER8GR    = (TY_PIXEL_8BIT  | (0x3 << 24)), ///< 0x13000000
        TY_PIXEL_FORMAT_BAYER8RG    = (TY_PIXEL_8BIT  | (0x4 << 24)), ///< 0x14000000
        TY_PIXEL_FORMAT_DEPTH16     = (TY_PIXEL_16BIT | (0x0 << 24)), ///< 0x20000000
        TY_PIXEL_FORMAT_YVYU        = (TY_PIXEL_16BIT | (0x1 << 24)), ///< 0x21000000, yvyu422
        TY_PIXEL_FORMAT_YUYV        = (TY_PIXEL_16BIT | (0x2 << 24)), ///< 0x22000000, yuyv422
        TY_PIXEL_FORMAT_MONO16      = (TY_PIXEL_16BIT | (0x3 << 24)), ///< 0x23000000,
        TY_PIXEL_FORMAT_RGB         = (TY_PIXEL_24BIT | (0x0 << 24)), ///< 0x30000000
        TY_PIXEL_FORMAT_BGR         = (TY_PIXEL_24BIT | (0x1 << 24)), ///< 0x31000000
        TY_PIXEL_FORMAT_JPEG        = (TY_PIXEL_24BIT | (0x2 << 24)), ///< 0x32000000
        TY_PIXEL_FORMAT_MJPG        = (TY_PIXEL_24BIT | (0x3 << 24)), ///< 0x33000000
    }TY_PIXEL_FORMAT_LIST;
    

    Note

    1. Use the TYSetEnum() interface function to set both the image format and resolution. For example, set the image format to TY_PIXEL_FORMAT_YUYV and the width to 640, height to 480.

      ASSERT_OK(TYSetEnum(hDevice, TY_COMPONENT_RGB_CAM_LEFT, TY_ENUM_IMAGE_MODE, TYImageMode2(TY_PIXEL_FORMAT_YUYV, 640, 480)));
      
    2. SDK sample program DumpAllFeatures can list all image formats and resolutions supported by the current camera component.

  3. The data structure of commonly used optical parameter is as follows, which can be read using the TYGetStruct() interface function:

    typedef struct TY_VECT_3F
    {
        float   x;
        float   y;
        float   z;
    }TY_VECT_3F;
    
    ///  a 3x3 matrix
    /// |.|.|.|
    /// | --|---|---|
    /// | fx|  0| cx|
    /// |  0| fy| cy|
    /// |  0|  0|  1|
    typedef struct TY_CAMERA_INTRINSIC
    {
        float data[3*3];
    }TY_CAMERA_INTRINSIC;
    
    /// a 4x4 matrix
    ///  |.|.|.|.|
    ///  |---|----|----|---|
    ///  |r11| r12| r13| t1|
    ///  |r21| r22| r23| t2|
    ///  |r31| r32| r33| t3|
    ///  | 0 |   0|   0|  1|
    typedef struct TY_CAMERA_EXTRINSIC
    {
        float data[4*4];
    }TY_CAMERA_EXTRINSIC;
    
    ///camera distortion parameters
    typedef struct TY_CAMERA_DISTORTION
    {
        float data[12];///<Definition is compatible with opencv3.0+ :k1,k2,p1,p2,k3,k4,k5,k6,s1,s2,s3,s4
    }TY_CAMERA_DISTORTION;
    
    
    ///camera 's cailbration data
    ///@see TYGetStruct
    typedef struct TY_CAMERA_CALIB_INFO
    {
      int32_t intrinsicWidth;
      int32_t intrinsicHeight;
      TY_CAMERA_INTRINSIC   intrinsic;  // TY_STRUCT_CAM_INTRINSIC
      TY_CAMERA_EXTRINSIC   extrinsic;  // TY_STRUCT_EXTRINSIC_TO_LEFT_IR
      TY_CAMERA_DISTORTION  distortion; // TY_STRUCT_CAM_DISTORTION
    }TY_CAMERA_CALIB_INFO;