Browse Source

1、TOF3D相机SDK修整;
2、相机例子运行测试完成;
3、setup文件添加;

LiuZe 1 year ago
parent
commit
02adcd51b0
100 changed files with 8779 additions and 0 deletions
  1. 539 0
      Tof3DCamera/AArch64/Include/VzenseNebula_api.h
  2. 28 0
      Tof3DCamera/AArch64/Include/VzenseNebula_define.h
  3. 109 0
      Tof3DCamera/AArch64/Include/VzenseNebula_enums.h
  4. 206 0
      Tof3DCamera/AArch64/Include/VzenseNebula_types.h
  5. 13 0
      Tof3DCamera/AArch64/Lib/Config/DS77CLite_0F.json
  6. 13 0
      Tof3DCamera/AArch64/Lib/Config/DS77CPro_0E.json
  7. 8 0
      Tof3DCamera/AArch64/Lib/Config/DS77Lite_11.json
  8. 8 0
      Tof3DCamera/AArch64/Lib/Config/DS77Pro_10.json
  9. 13 0
      Tof3DCamera/AArch64/Lib/Config/DS86_12.json
  10. 13 0
      Tof3DCamera/AArch64/Lib/Config/DS87_13.json
  11. BIN
      Tof3DCamera/AArch64/Lib/libNebula_api.so.1.2
  12. BIN
      Tof3DCamera/AArch64/Lib/libNebula_api.so.1.2.4
  13. 29 0
      Tof3DCamera/LICENSE
  14. 47 0
      Tof3DCamera/README.md
  15. 107 0
      Tof3DCamera/Samples/DS77/DevHotPlugCallback/DevHotPlugCallback.py
  16. 61 0
      Tof3DCamera/Samples/DS77/DeviceConnectByAlias/DeviceConnectByAlias.py
  17. 62 0
      Tof3DCamera/Samples/DS77/DeviceConnectByIP/DeviceConnectByIP.py
  18. 94 0
      Tof3DCamera/Samples/DS77/DeviceHWTriggerMode/DeviceHWTriggerMode.py
  19. 73 0
      Tof3DCamera/Samples/DS77/DeviceInfoGet/DeviceInfoGet.py
  20. 98 0
      Tof3DCamera/Samples/DS77/DeviceParamSetGet/DeviceParamSetGet.py
  21. 102 0
      Tof3DCamera/Samples/DS77/DeviceSWTriggerMode/DeviceSWTriggerMode.py
  22. 66 0
      Tof3DCamera/Samples/DS77/DeviceSearchAndConnect/DeviceSearchAndConnect.py
  23. 68 0
      Tof3DCamera/Samples/DS77/DeviceSetParamsByJson/DeviceSetParamsByJson.py
  24. 73 0
      Tof3DCamera/Samples/DS77/DeviceStartStopSteaming/DeviceStartStopSteaming.py
  25. 99 0
      Tof3DCamera/Samples/DS77/FrameCaptureAndSave/FrameCaptureAndSave.py
  26. 104 0
      Tof3DCamera/Samples/DS77/FrameViewer/FrameViewer.py
  27. 85 0
      Tof3DCamera/Samples/DS77/MultiConnection/MultiConnection.py
  28. 107 0
      Tof3DCamera/Samples/DS77/PointCloudCaptureAndSave/PointCloudCaptureAndSave.py
  29. 116 0
      Tof3DCamera/Samples/DS77/ToFExposureTimeSetGet/ToFExposureTimeSetGet.py
  30. 139 0
      Tof3DCamera/Samples/DS77/ToFFiltersSetGet/ToFFiltersSetGet.py
  31. 107 0
      Tof3DCamera/Samples/DS77C/DevHotPlugCallback/DevHotPlugCallback.py
  32. 61 0
      Tof3DCamera/Samples/DS77C/DeviceConnectByAlias/DeviceConnectByAlias.py
  33. 62 0
      Tof3DCamera/Samples/DS77C/DeviceConnectByIP/DeviceConnectByIP.py
  34. 94 0
      Tof3DCamera/Samples/DS77C/DeviceHWTriggerMode/DeviceHWTriggerMode.py
  35. 73 0
      Tof3DCamera/Samples/DS77C/DeviceInfoGet/DeviceInfoGet.py
  36. 98 0
      Tof3DCamera/Samples/DS77C/DeviceParamSetGet/DeviceParamSetGet.py
  37. 102 0
      Tof3DCamera/Samples/DS77C/DeviceSWTriggerMode/DeviceSWTriggerMode.py
  38. 66 0
      Tof3DCamera/Samples/DS77C/DeviceSearchAndConnect/DeviceSearchAndConnect.py
  39. 68 0
      Tof3DCamera/Samples/DS77C/DeviceSetParamsByJson/DeviceSetParamsByJson.py
  40. 73 0
      Tof3DCamera/Samples/DS77C/DeviceStartStopSteaming/DeviceStartStopSteaming.py
  41. 99 0
      Tof3DCamera/Samples/DS77C/FrameCaptureAndSave/FrameCaptureAndSave.py
  42. 109 0
      Tof3DCamera/Samples/DS77C/FrameViewer/FrameViewer.py
  43. 85 0
      Tof3DCamera/Samples/DS77C/MultiConnection/MultiConnection.py
  44. 107 0
      Tof3DCamera/Samples/DS77C/PointCloudCaptureAndSave/PointCloudCaptureAndSave.py
  45. 152 0
      Tof3DCamera/Samples/DS77C/RGBExposureTimeSetGet/RGBExposureTimeSetGet.py
  46. 117 0
      Tof3DCamera/Samples/DS77C/RGBResolutionChange/RGBResolutionChange.py
  47. 116 0
      Tof3DCamera/Samples/DS77C/ToFExposureTimeSetGet/ToFExposureTimeSetGet.py
  48. 139 0
      Tof3DCamera/Samples/DS77C/ToFFiltersSetGet/ToFFiltersSetGet.py
  49. 108 0
      Tof3DCamera/Samples/DS77C/TransformColorImgToDepthSensorFrame/TransformColorImgToDepthSensorFrame.py
  50. 108 0
      Tof3DCamera/Samples/DS77C/TransformDepthImgToColorSensorFrame/TransformDepthImgToColorSensorFrame.py
  51. 107 0
      Tof3DCamera/Samples/DS86/DevHotPlugCallback/DevHotPlugCallback.py
  52. 61 0
      Tof3DCamera/Samples/DS86/DeviceConnectByAlias/DeviceConnectByAlias.py
  53. 62 0
      Tof3DCamera/Samples/DS86/DeviceConnectByIP/DeviceConnectByIP.py
  54. 94 0
      Tof3DCamera/Samples/DS86/DeviceHWTriggerMode/DeviceHWTriggerMode.py
  55. 73 0
      Tof3DCamera/Samples/DS86/DeviceInfoGet/DeviceInfoGet.py
  56. 98 0
      Tof3DCamera/Samples/DS86/DeviceParamSetGet/DeviceParamSetGet.py
  57. 102 0
      Tof3DCamera/Samples/DS86/DeviceSWTriggerMode/DeviceSWTriggerMode.py
  58. 66 0
      Tof3DCamera/Samples/DS86/DeviceSearchAndConnect/DeviceSearchAndConnect.py
  59. 68 0
      Tof3DCamera/Samples/DS86/DeviceSetParamsByJson/DeviceSetParamsByJson.py
  60. 73 0
      Tof3DCamera/Samples/DS86/DeviceStartStopSteaming/DeviceStartStopSteaming.py
  61. 99 0
      Tof3DCamera/Samples/DS86/FrameCaptureAndSave/FrameCaptureAndSave.py
  62. 109 0
      Tof3DCamera/Samples/DS86/FrameViewer/FrameViewer.py
  63. 85 0
      Tof3DCamera/Samples/DS86/MultiConnection/MultiConnection.py
  64. 107 0
      Tof3DCamera/Samples/DS86/PointCloudCaptureAndSave/PointCloudCaptureAndSave.py
  65. 168 0
      Tof3DCamera/Samples/DS86/RGBExposureTimeSetGet/RGBExposureTimeSetGet.py
  66. 117 0
      Tof3DCamera/Samples/DS86/RGBResolutionChange/RGBResolutionChange.py
  67. 116 0
      Tof3DCamera/Samples/DS86/ToFExposureTimeSetGet/ToFExposureTimeSetGet.py
  68. 139 0
      Tof3DCamera/Samples/DS86/ToFFiltersSetGet/ToFFiltersSetGet.py
  69. 108 0
      Tof3DCamera/Samples/DS86/TransformColorImgToDepthSensorFrame/TransformColorImgToDepthSensorFrame.py
  70. 108 0
      Tof3DCamera/Samples/DS86/TransformDepthImgToColorSensorFrame/TransformDepthImgToColorSensorFrame.py
  71. 539 0
      Tof3DCamera/Ubuntu16.04/Include/VzenseNebula_api.h
  72. 28 0
      Tof3DCamera/Ubuntu16.04/Include/VzenseNebula_define.h
  73. 109 0
      Tof3DCamera/Ubuntu16.04/Include/VzenseNebula_enums.h
  74. 206 0
      Tof3DCamera/Ubuntu16.04/Include/VzenseNebula_types.h
  75. 13 0
      Tof3DCamera/Ubuntu16.04/Lib/Config/DS77CLite_0F.json
  76. 13 0
      Tof3DCamera/Ubuntu16.04/Lib/Config/DS77CPro_0E.json
  77. 8 0
      Tof3DCamera/Ubuntu16.04/Lib/Config/DS77Lite_11.json
  78. 8 0
      Tof3DCamera/Ubuntu16.04/Lib/Config/DS77Pro_10.json
  79. 13 0
      Tof3DCamera/Ubuntu16.04/Lib/Config/DS86_12.json
  80. 13 0
      Tof3DCamera/Ubuntu16.04/Lib/Config/DS87_13.json
  81. BIN
      Tof3DCamera/Ubuntu16.04/Lib/libNebula_api.so.1.2
  82. BIN
      Tof3DCamera/Ubuntu16.04/Lib/libNebula_api.so.1.2.4
  83. 539 0
      Tof3DCamera/Ubuntu18.04/Include/VzenseNebula_api.h
  84. 28 0
      Tof3DCamera/Ubuntu18.04/Include/VzenseNebula_define.h
  85. 109 0
      Tof3DCamera/Ubuntu18.04/Include/VzenseNebula_enums.h
  86. 206 0
      Tof3DCamera/Ubuntu18.04/Include/VzenseNebula_types.h
  87. 13 0
      Tof3DCamera/Ubuntu18.04/Lib/Config/DS77CLite_0F.json
  88. 13 0
      Tof3DCamera/Ubuntu18.04/Lib/Config/DS77CPro_0E.json
  89. 8 0
      Tof3DCamera/Ubuntu18.04/Lib/Config/DS77Lite_11.json
  90. 8 0
      Tof3DCamera/Ubuntu18.04/Lib/Config/DS77Pro_10.json
  91. 13 0
      Tof3DCamera/Ubuntu18.04/Lib/Config/DS86_12.json
  92. 13 0
      Tof3DCamera/Ubuntu18.04/Lib/Config/DS87_13.json
  93. 1 0
      Tof3DCamera/Ubuntu18.04/Lib/libNebula_api.so.1.2
  94. BIN
      Tof3DCamera/Ubuntu18.04/Lib/libNebula_api.so.1.2.4
  95. 283 0
      Tof3DCamera/VzenseDS_api.py
  96. 3 0
      Tof3DCamera/VzenseDS_define.py
  97. 81 0
      Tof3DCamera/VzenseDS_enums.py
  98. 114 0
      Tof3DCamera/VzenseDS_types.py
  99. 13 0
      Tof3DCamera/Windows/Bin/x64/Config/DS77CLite_0F.json
  100. 0 0
      Tof3DCamera/Windows/Bin/x64/Config/DS77CPro_0E.json

+ 539 - 0
Tof3DCamera/AArch64/Include/VzenseNebula_api.h

@@ -0,0 +1,539 @@
+#ifndef VZENSEDS_API_H
+#define VZENSEDS_API_H
+
+/**
+* @file VzenseDS_api.h
+* @brief Vzense API header file.
+* Copyright (c) 2019-2022 Vzense Interactive, Inc.
+*/
+
+/*! \mainpage VzenseDS API Documentation
+*
+* \section intro_sec Introduction
+*
+* Welcome to the VzenseDS API documentation. This documentation enables you to quickly get started in your development efforts to programmatically interact with the Vzense CW ToF Camera (eg:DS77).
+*/
+
+#include "VzenseNebula_define.h"
+
+/**
+* @brief         Initializes the API on the device. This function must be invoked before any other Vzense APIs.
+* @return        ::VzRetOK if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_Initialize();
+
+/**
+* @brief         Shuts down the API on the device and clears all resources allocated by the API. After invoking this function, no other Vzense APIs can be invoked.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_Shutdown();
+
+/**
+* @brief         Gets the version of SDK.
+* @return        Returns sdk version
+*/
+VZENSE_C_API_EXPORT const char* VZ_GetSDKVersion();
+
+/**
+* @brief         Returns the number of camera devices currently connected.
+* @param[out]    pDeviceCount    Pointer to a 32-bit integer variable in which to return the device count.
+* @return        ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetDeviceCount(uint32_t* pDeviceCount);
+
+/**
+* @brief         Returns the info of the deviceIndex camera device.
+* @param[in]     deviceIndex    The index of the device to open. Device indices range from 0 to device count - 1.
+* @param[out]    pDevicesInfo       Pointer to a buffer in which to store the device info.
+* @return        ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetDeviceInfo(uint32_t deviceIndex, VzDeviceInfo* pDevicesInfo);
+
+/**
+* @brief         Returns the info lists of the deviceCount camera devices.
+* @param[in]     deviceCount         the number of camera devices.
+* @param[out]    pDevicesInfoList    Pointer to a buffer in which to store the devices list infos.
+* @return        ::VzRetOK           if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetDeviceInfoList(uint32_t deviceCount, VzDeviceInfo* pDevicesInfoList);
+
+/**
+* @brief         Opens the device specified by <code>sn</code>. The device must be subsequently closed using VZ_CloseDevice().
+* @param[in]     pURI         the uri of the device. See ::VzDeviceInfo for more information.
+* @param[out]    pDevice     the handle of the device on which to open.
+* @return:       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_OpenDeviceByUri(const char* pURI, VzDeviceHandle* pDevice);
+
+/**
+* @brief         Opens the device specified by <code>alias</code>. The device must be subsequently closed using VZ_CloseDevice().
+* @param[in]     pAlias       the alias of the device. See ::VzDeviceInfo for more information.
+* @param[out]    pDevice     the handle of the device on which to open.
+* @return:       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_OpenDeviceByAlias(const char* pAlias, VzDeviceHandle* pDevice);
+
+/**
+* @brief         Opens the device specified by <code>ip</code>. The device must be subsequently closed using VZ_CloseDevice().
+* @param[in]     pIP          the ip of the device. See ::VzDeviceInfo for more information.
+* @param[out]    pDevice     the handle of the device on which to open.
+* @return:       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_OpenDeviceByIP(const char* pIP, VzDeviceHandle* pDevice);
+
+/**
+* @brief         Closes the device specified by <code>device</code> that was opened using VZ_OpenDevice.
+* @param[in]     pDevice       The handle of the device to close.
+* @return:       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_CloseDevice(VzDeviceHandle* pDevice);
+
+/**
+* @brief         Starts capturing the image stream indicated by <code>device</code>. Invoke VZ_StopStream() to stop capturing the image stream.
+* @param[in]     device          The handle of the device on which to start capturing the image stream.                        
+* @return        ::VzRetOK if    the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_StartStream(VzDeviceHandle device);
+
+/**
+* @brief         Stops capturing the image stream on the device specified by <code>device</code>. that was started using VZ_StartStream.
+* @param[in]     device       The handle of the device on which to stop capturing the image stream.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_StopStream(VzDeviceHandle device);
+
+/**
+* @brief         Captures the next image frame from the device specified by <code>device</code>. This API must be invoked before capturing frame data using VZ_GetFrame().
+* @param[in]     device         The handle of the device on which to read the next frame.
+* @param[in]     waitTime       The unit is millisecond, the value is in the range (0,65535).
+*                               You can change the value according to the frame rate. For example,the frame rate is 30, so the theoretical waittime interval is 33ms, but if set the time value is 20ms,
+*                               it means the max wait time is 20 ms when capturing next frame, so when call the VZ_GetFrameReady, it may return VzRetGetFrameReadyTimeOut(-11).
+*                               So the recommended value is 2 * 1000/ FPS.
+* @param[out]    pFrameReady    Pointer to a buffer in which to store the signal on which image is ready to be get.
+* @return        ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFrameReady(VzDeviceHandle device, uint16_t waitTime, VzFrameReady* pFrameReady);
+
+/**
+* @brief         Returns the image data for the current frame from the device specified by <code>device</code>. Before invoking this API, invoke VZ_GetFrameReady() to capture one image frame from the device.
+* @param[in]     device       The handle of the device to capture an image frame from.
+* @param[in]     frameType    The image frame type.
+* @param[out]    pVzFrame     Pointer to a buffer in which to store the returned image data.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFrame(VzDeviceHandle device, VzFrameType frameType, VzFrame* pVzFrame);
+
+/**
+* @brief        Set the working mode of the camera.
+* @param[in]    device      The handle of the device
+* @param[in]    mode        The work mode of camera. For ActiveMode, set the Time filter default true, for SlaveMode, set the Time filter default false.
+* @return       ::VzRetOK   if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetWorkMode(VzDeviceHandle device, VzWorkMode mode);
+
+/**
+* @brief        Get the working mode of the camera.
+* @param[in]    device      The handle of the device
+* @param[in]    pMode       The work mode of camera.
+* @return       ::VzRetOK   if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetWorkMode(VzDeviceHandle device, VzWorkMode* pMode);
+
+/**
+* @brief        Triggering a frame of image is only useful if the camera is in SoftwareTriggerMode
+* @param[in]    device      The handle of the device.
+* @return       ::VzRetOK   if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetSoftwareSlaveTrigger(VzDeviceHandle device);
+
+/**
+* @brief         Returns the internal intrinsic and distortion coefficient parameters from the device specified by <code>device</code>.
+* @param[in]     device                        The handle of the device from which to get the internal parameters. 
+* @param[in]     sensorType                    The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[out]    pSensorIntrinsicParameters    Pointer to a VzSensorIntrinsicParameters variable in which to store the parameter values.
+* @return        ::VzRetOK                     if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetSensorIntrinsicParameters(VzDeviceHandle device, VzSensorType sensorType, VzSensorIntrinsicParameters* pSensorIntrinsicParameters);
+
+/**
+* @brief         Returns the camera rotation and translation coefficient parameters from the device specified by <code>device</code>.
+* @param[in]     device                        The handle of the device from which to get the extrinsic parameters. 
+* @param[out]    pSensorExtrinsicParameters    Pointer to a ::VzSensorExtrinsicParameters variable in which to store the parameters.
+* @return        ::VzRetOK                     if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetSensorExtrinsicParameters(VzDeviceHandle device, VzSensorExtrinsicParameters* pSensorExtrinsicParameters);
+
+/**
+* @brief         Gets the firmware version number.
+* @param[in]     device              The handle of the device on which to set the pulse count.
+* @param[in]     pFirmwareVersion    Pointer to a variable in which to store the returned fw value.
+* @param[in]     length              The maximum length is 64 bytes.
+* @return        ::VzRetOK          if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFirmwareVersion(VzDeviceHandle device, char* pFirmwareVersion, int length);
+
+/**
+* @brief         Gets the MAC from the device specified by <code>device</code>.
+* @param[in]     device         The handle of the device.
+* @param[out]    pMACAddress    Pointer to a buffer in which to store the device MAC address. the buffer default size is 18, and the last buffer set '\0'.
+* @return        ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetDeviceMACAddress(VzDeviceHandle device, char* pMACAddress);
+
+/**
+* @brief        Sets the device GMM gain on a device.
+* @param[in]    device       The handle of the device on which to set the GMM gain.
+* @param[in]    gmmgain      The GMM gain value to set. See ::VzGMMGain for more information.The GMM gain value is in the range [0,255].
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetIRGMMGain(VzDeviceHandle device, uint8_t gmmgain);
+
+/**
+* @brief        Returns the the device's GMM gain.
+* @param[in]    device       The handle of the device from which to get the GMM gain.
+* @param[out]   pGmmgain      Pointer to a variable in which to store the returned GMM gain.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetIRGMMGain(VzDeviceHandle device, uint8_t* pGmmgain);
+
+/**
+* @brief         Sets the color image pixel format on the device specified by <code>device</code>. Currently only RGB and BGR formats are supported.
+* @param[in]     device         The handle of the device to set the pixel format. 
+* @param[in]     pixelFormat    The color pixel format to use. Pass in one of the values defined by ::VzPixelFormat. Currently only <code>VzPixelFormatRGB888</code> and <code>VzPixelFormatBGR888</code> are supported.
+* @return        ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetColorPixelFormat(VzDeviceHandle device, VzPixelFormat pixelFormat);
+
+/**
+* @brief        Sets the color frame Resolution.
+* @param[in]    device       The handle of the device.
+* @param[in]    w            The width of color image
+* @param[in]    h            The height of color image
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetColorResolution(VzDeviceHandle device, int w, int h);
+
+/**
+* @brief        Returns the the color frame Resolution.
+* @param[in]    device         The handle of the device.
+* @param[out]    pW            The width of color image
+* @param[out]    pH            The height of color image
+* @return       ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetColorResolution(VzDeviceHandle device, int* pW, int* pH);
+
+/**
+* @brief        Gets a list of image resolutions supported by Sensor
+* @param[in]    type           The sensor type
+* @param[out]    pList         List of supported resolutions
+* @return       ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VzGetSupportedResolutionList(VzDeviceHandle device, VzSensorType type, VzResolutionList* pList);
+
+/**
+* @brief         Sets the ToF frame rate.The interface takes a long time, about 500 ms.
+* @param[in]     device       The handle of the device on which to set the framerate.
+* @param[in]     value        The rate value, in range [1,25].
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetFrameRate(VzDeviceHandle device, int value);
+/**
+* @brief         Gets the ToF frame rate.
+* @param[in]     device       The handle of the device on which to get the framerate.
+* @param[in]     pValue       The rate value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFrameRate(VzDeviceHandle device, int* pValue);
+
+/**
+* @brief        Set the exposure mode of sensor.
+* @param[in]    device          The handle of the device on which to set the exposure control mode.
+* @param[in]    sensorType      The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[in]    exposureType    the exposure control mode.
+* @return       ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetExposureControlMode(VzDeviceHandle device, VzSensorType sensorType, VzExposureControlMode controlMode);
+
+/**
+* @brief         Get the exposure mode of sensor.
+* @param[in]     device           The handle of the device on which to get the exposure control mode.
+* @param[in]     sensorType       The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[out]    pControlMode     the exposure control mode.
+* @return        ::VzRetOK        if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetExposureControlMode(VzDeviceHandle device, VzSensorType sensorType, VzExposureControlMode* pControlMode);
+
+/**
+* @brief        Set the exposure time of sensor.
+* @param[in]    device          The handle of the device on which to set the exposure time  in microseconds.
+* @param[in]    sensorType      The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[in]    exposureTime    the exposure time.
+* @return       ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetExposureTime(VzDeviceHandle device, VzSensorType sensorType, VzExposureTimeParams exposureTime);
+
+/**
+* @brief         Get the exposure time of sensor.
+* @param[in]     device           The handle of the device on which to get the exposure time in microseconds.
+* @param[in]     sensorType       The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[out]    pExposureTime    the exposure time.
+* @return        ::VzRetOK        if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetExposureTime(VzDeviceHandle device, VzSensorType sensorType, VzExposureTimeParams* pExposureTime);
+
+/**
+* @brief        Set the parameters of the Time filter.
+* @param[in]    device       The handle of the device
+* @param[in]    params       Pointer to a variable in which to store the parameters.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/ 
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetTimeFilterParams(VzDeviceHandle device, VzTimeFilterParams params);
+
+/**
+* @brief         Get the parameters of the Time Filter feature.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetTimeFilterParams(VzDeviceHandle device, VzTimeFilterParams *pParams);
+
+/**
+* @brief         Set the parameters of the Confidence filter.
+* @param[in]     device       The handle of the device
+* @param[out]    params       Pointer to a variable in which to store the parameters.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetConfidenceFilterParams(VzDeviceHandle device, VzConfidenceFilterParams params);
+
+/**
+* @brief         Get the parameters of the ConfidenceFilter feature.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetConfidenceFilterParams(VzDeviceHandle device, VzConfidenceFilterParams *pParams);
+
+/**
+* @brief        Set the parameters of the FlyingPixel filter.
+* @param[in]    device       The handle of the device.
+* @param[out]   params       Pointer to a variable in which to store the parameters.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetFlyingPixelFilterParams(VzDeviceHandle device, const VzFlyingPixelFilterParams params);
+
+/**
+* @brief         Get the parameters of the Confidence filter.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFlyingPixelFilterParams(VzDeviceHandle device, VzFlyingPixelFilterParams* params);
+
+/**
+* @brief        Enables or disables the FillHole filter
+* @param[in]    device       The handle of the device.
+* @param[in]    bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetFillHoleFilterEnabled(VzDeviceHandle device, bool bEnabled);
+
+/**
+* @brief         Returns the Boolean value of whether the FillHole Filter feature is enabled or disabled.
+* @param[in]     device       The handle of the device
+* @param[out]    pEnabled     Pointer to a variable in which to store the returned Boolean value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFillHoleFilterEnabled(VzDeviceHandle device, bool *pEnabled);
+
+/**
+* @brief        Enables or disables the Spatial filter
+* @param[in]    device       The handle of the device.
+* @param[in]    bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetSpatialFilterEnabled(VzDeviceHandle device, bool bEnabled);
+
+/**
+* @brief         Returns the Boolean value of whether the Spatial Filter feature is enabled or disabled.
+* @param[in]     device       The handle of the device
+* @param[out]    pEnabled     Pointer to a variable in which to store the returned Boolean value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetSpatialFilterEnabled(VzDeviceHandle device, bool *pEnabled);
+
+/**
+* @brief         Enables or disables transforms a color image into the geometry of the depth sensor. When enabled, VZ_GetFrame() can\n
+*                be invoked passing ::VzTransformedColorFrame as the frame type for get a color image which each pixel matches the \n
+*                corresponding pixel coordinates of the depth sensor. The resolution of the transformed color frame is the same as that\n
+*                of the depth image.
+* @param[in]     device       The handle of the device on which to enable or disable mapping.
+* @param[in]     bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetTransformColorImgToDepthSensorEnabled(VzDeviceHandle device, bool bEnabled);
+
+/**
+* @brief         Returns the Boolean value of whether the transformed of the color image to depth sensor space feature is enabled or disabled.
+* @param[in]     device       The handle of the device on which to enable or disable the feature.
+* @param[out]    bEnabled     Pointer to a variable in which to store the returned Boolean value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetTransformColorImgToDepthSensorEnabled(VzDeviceHandle device, bool *bEnabled);
+
+/**
+* @brief         Enables or disables transforms the depth map into the geometry of the color sensor. When enabled, VZ_GetFrame() can\n
+*                be invoked passing ::VzTransformedDepthFrame as the frame type for get a depth image which each pixel matches the \n
+*                corresponding pixel coordinates of the color sensor. The resolution of the transformed depth frame is the same as that\n
+*                of the color image.
+* @param[in]     device       The handle of the device on which to enable or disable mapping.
+* @param[in]     bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetTransformDepthImgToColorSensorEnabled(VzDeviceHandle device, bool bEnabled);
+
+/**
+* @brief         Returns the Boolean value of whether the transformed of the depth image to color space feature is enabled or disabled.
+* @param[in]     device       The handle of the device on which to enable or disable the feature.
+* @param[out]    bEnabled     Pointer to a variable in which to store the returned Boolean value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetTransformDepthImgToColorSensorEnabled(VzDeviceHandle device, bool *bEnabled);
+
+/**
+* @brief         Returns the point value of the frame that the mapping of the depth image to Color space.
+* @param[in]     device           The handle of the device on which to enable or disable the feature.
+* @param[in]     pointInDepth     The point in depth frame.
+* @param[in]     colorSize        The size(x = w,y = h) of color frame.
+* @param[out]    pPointInColor    The point in the color frame.
+* @return        ::VzRetOK        if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_TransformedDepthPointToColorPoint(const VzDeviceHandle device, const VzDepthVector3 depthPoint, const VzVector2u16 colorSize, VzVector2u16* pPointInColor);
+
+/**
+* @brief         Converts the input points from depth coordinate space to world coordinate space.
+* @param[in]     device          The handle of the device on which to perform the operation.
+* @param[in]     pDepthVector    Pointer to a buffer containing the x, y, and z values of the depth coordinates to be converted. \n
+*                                x and y are measured in pixels, where 0, 0 is located at the top left corner of the image. \n
+*                                z is measured in millimeters, based on the ::VzPixelFormat depth frame.
+* @param[out]    pWorldVector    Pointer to a buffer in which to output the converted x, y, and z values of the world coordinates, measured in millimeters.
+* @param[in]     pointCount      The number of points to convert.
+* @param[in]     pSensorParam    The intrinsic parameters for the depth sensor. See ::VzSensorIntrinsicParameters.
+* @return        ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_ConvertDepthToPointCloud(VzDeviceHandle device, VzDepthVector3* pDepthVector, VzVector3f* pWorldVector, int32_t pointCount, VzSensorIntrinsicParameters* pSensorParam);
+
+/**
+* @brief         Converts the input Depth frame from depth coordinate space to world coordinate space on the device. Currently supported depth image types are VzDepthFrame and VzTransformDepthImgToColorSensorFrame.
+* @param[in]     device          The handle of the device on which to perform the operation.
+* @param[in]     pDepthFrame      The depth frame.
+* @param[out]    pWorldVector    Pointer to a buffer in which to output the converted x, y, and z values of the world coordinates, measured in millimeters. The length of pWorldVector must is (VzFrame.width * VzFrame.height).
+* @return        ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_ConvertDepthFrameToPointCloudVector(VzDeviceHandle device, const VzFrame* pDepthFrame, VzVector3f* pWorldVector);
+/**
+* @brief        Sets hotplug status callback function
+* @param[in]    pCallback    Pointer to the callback function. See ::PtrHotPlugStatusCallback 
+* @param[in]    pUserData    Pointer to the user data. See ::PtrHotPlugStatusCallback
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetHotPlugStatusCallback(PtrHotPlugStatusCallback pCallback, const void* pUserData);
+
+/**
+* @brief        Reboot the camera.
+* @param[in]    device          The handle of the device
+* @return       ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_RebootDevie(VzDeviceHandle device);
+
+/**
+* @brief        Set the corresponding property value for the device
+* @param[in]    device          The handle of the device from which to set the property value.
+* @param[in]    propertyKey     The type of property to set on the device.
+* @param[in]    pData           Pointer to a buffer containing the property value.
+* @param[in]    dataSize        The size, in bytes, of the property value contained in pData
+* @return       ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetProperty(VzDeviceHandle device, const char* propertyKey, const void* pData, uint32_t dataSize);
+
+/**
+* @brief 		Returns a specific property value from the device
+* @param[in] 	device			The handle of the device from which to get the property value.
+* @param[in] 	propertyType	The type of property to get from the device
+* @param[out]	pData			Pointer to a buffer to store the returned property value.
+* @param[in]	dataSize		The size, in bytes, of the property value returned in pData
+* @return 		::VzRetOK		if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetProperty(VzDeviceHandle device, const char* propertyKey, void* pData, uint32_t dataSize);
+
+/**
+* @brief         Enables or disables the HDR Mode of the ToF sensor with VzExposureControlMode_Manual. Default enabled,  so if you want switch to the VzExposureControlMode_Auto, set HDR Mode disable firstly.
+* @param[in]     device       The handle of the device on which to enable or disable the feature.
+* @param[in]     bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetHDRModeEnabled(VzDeviceHandle device, bool bEnabled);
+/**
+* @brief         Returns the Boolean value of whether the HDRMode of ToF sensor feature is enabled or disabled.
+* @param[in]     device       The handle of the device on which to enable or disable the feature.
+* @param[in]     bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetHDRModeEnabled(VzDeviceHandle device, bool *bEnabled);
+
+/**
+* @brief         Set the input signal parameters for Hardware Trigger.
+* @param[in]     device       The handle of the device
+* @param[in]     params       Pointer to a variable in which to store the parameters.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetInputSignalParamsForHWTrigger(VzDeviceHandle device, VzInputSignalParamsForHWTrigger params);
+
+/**
+* @brief         Get the Input signal parameters for Hardware Trigger.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetInputSignalParamsForHWTrigger(VzDeviceHandle device, VzInputSignalParamsForHWTrigger *pParams);
+
+/**
+* @brief         Set the output signal parameters.
+* @param[in]     device       The handle of the device
+* @param[in]     params       Pointer to a variable in which to store the parameters.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetOutputSignalParams(VzDeviceHandle device, VzOutputSignalParams params);
+
+/**
+* @brief         Get the output signal parameters.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetOutputSignalParams(VzDeviceHandle device, VzOutputSignalParams *pParams);
+
+/**
+* @brief         Set the parameters by Json file that can be saved by NebulaGUITool.
+* @param[in]     device       The handle of the device.
+* @param[in]     pfilePath    Pointer to the path of Json file.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetParamsByJson(VzDeviceHandle device, char* pfilePath);
+
+/**
+* @brief         Set the color Gain with the exposure mode of RGB sensor in VzExposureControlMode_Manual.
+* @param[in]     device       The handle of the device.
+* @param[in]     params       The value of color Gain.Value range: [1.0 15.5]
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetColorGain(VzDeviceHandle device, float params);
+
+/**
+* @brief         Get the color Gain.
+* @param[in]     device       The handle of the device.
+* @param[out]    params       The value of color Gain.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetColorGain(VzDeviceHandle device, float *pParams);
+
+#endif /* VZENSEDS_API_H */

+ 28 - 0
Tof3DCamera/AArch64/Include/VzenseNebula_define.h

@@ -0,0 +1,28 @@
+#ifndef VZENSEDS_DEFINE_H
+#define VZENSEDS_DEFINE_H
+
+#include "VzenseNebula_enums.h"
+#include "VzenseNebula_types.h"
+
+#ifdef PS_EXPORT_ON
+    #ifdef _WIN32
+        #define VZENSE_API_EXPORT __declspec(dllexport)
+    #else
+        #define VZENSE_API_EXPORT __attribute__((visibility("default")))
+    #endif
+#else
+    #ifdef _WIN32
+        #define VZENSE_API_EXPORT __declspec(dllimport)
+    #else
+        #define VZENSE_API_EXPORT __attribute__((visibility("default")))
+    #endif
+#endif
+
+#ifdef __cplusplus
+#define VZENSE_C_API_EXPORT extern "C" VZENSE_API_EXPORT
+#else
+#define VZENSE_C_API_EXPORT VZENSE_API_EXPORT
+#define bool uint8_t
+#endif
+
+#endif /* VZENSEDS_DEFINE_H */

+ 109 - 0
Tof3DCamera/AArch64/Include/VzenseNebula_enums.h

@@ -0,0 +1,109 @@
+#ifndef VZENSEDS_ENUMS_H
+#define VZENSEDS_ENUMS_H
+
+/**
+ * @brief Specifies the type of image frame.
+ */
+typedef enum{
+	VzDepthFrame = 0,                           //!< Depth frame with 16 bits per pixel in millimeters.
+	VzIRFrame = 1,                              //!< IR frame with 8 bits per pixel.
+	VzColorFrame = 3,                           //!< Color frame with 24 bits per pixel in RGB/BGR format.
+    VzTransformColorImgToDepthSensorFrame = 4,  //!< Color frame with 24 bits per pixel in RGB/BGR format, that is transformed to depth sensor space where the resolution is the same as the depth frame's resolution.\n 
+	                                            //!< This frame type can be enabled using ::VZ_SetTransformColorImgToDepthSensorEnabled().
+	VzTransformDepthImgToColorSensorFrame = 5,  //!< Depth frame with 16 bits per pixel, in millimeters, that is transformed to color sensor space where the resolution is same as the color frame's resolution.\n 
+	                                            //!< This frame type can be enabled using ::VZ_SetTransformDepthImgToColorSensorEnabled().
+	VzConfidenceFrame = 8,                      //!< Confidence frame with 16 bits per pixel.
+}VzFrameType;
+
+/**
+ * @brief Specifies the image pixel format.
+ */
+typedef enum{
+	VzPixelFormatDepthMM16 = 0,        //!< Depth image pixel format, 16 bits per pixel in mm.
+	VzPixelFormatGray8 = 2,            //!< Gray image pixel format, 8 bits per pixel.
+
+	//Color
+	VzPixelFormatRGB888 = 3,           //!< Color image pixel format, 24 bits per pixel RGB format.
+	VzPixelFormatBGR888 = 4           //!< Color image pixel format, 24 bits per pixel BGR format.
+}VzPixelFormat;
+
+/**
+ * @brief Specifies the type of sensor.
+ */
+typedef enum {
+    VzToFSensor = 0x01,          //!< ToF camera.
+    VzColorSensor = 0x02         //!< Color camera.
+}VzSensorType;
+
+/**
+ * @brief Return status codes for all APIs.\n 
+ * 		  <code>VzRetOK = 0</code> means the API successfully completed its operation.\n 
+ * 		  All other codes indicate a device, parameter, or API usage error.
+ */
+typedef enum
+{
+    VzRetOK                         =  0,   //!< The function completed successfully.
+    VzRetNoDeviceConnected          = -1,   //!< There is no depth camera connected or the camera has not been connected correctly. Check the hardware connection or try unplugging and re-plugging the USB cable.
+    VzRetInvalidDeviceIndex         = -2,   //!< The input device index is invalid.
+    VzRetDevicePointerIsNull        = -3,   //!< The device structure pointer is null.
+    VzRetInvalidFrameType           = -4,   //!< The input frame type is invalid.
+    VzRetFramePointerIsNull         = -5,   //!< The output frame buffer is null.
+    VzRetNoPropertyValueGet         = -6,   //!< Cannot get the value for the specified property.
+    VzRetNoPropertyValueSet         = -7,   //!< Cannot set the value for the specified property.
+    VzRetPropertyPointerIsNull      = -8,   //!< The input property value buffer pointer is null.
+    VzRetPropertySizeNotEnough      = -9,   //!< The input property value buffer size is too small to store the specified property value.
+    VzRetInvalidDepthRange          = -10,  //!< The input depth range mode is invalid.
+    VzRetGetFrameReadyTimeOut       = -11,  //!< Capture the next image frame time out.
+    VzRetInputPointerIsNull         = -12,  //!< An input pointer parameter is null.
+    VzRetCameraNotOpened            = -13,  //!< The camera has not been opened.
+    vzRetInvalidCameraType          = -14,  //!< The specified type of camera is invalid.
+    VzRetInvalidParams              = -15,  //!< One or more of the parameter values provided are invalid.
+    VzRetCurrentVersionNotSupport   = -16,  //!< This feature is not supported in the current version.
+    VzRetUpgradeImgError            = -17,  //!< There is an error in the upgrade file.
+    VzRetUpgradeImgPathTooLong      = -18,  //!< Upgrade file path length greater than 260.
+	VzRetUpgradeCallbackNotSet		= -19,  //!< VZ_SetUpgradeStatusCallback is not called.
+	VzRetProductNotSupport          = -20,  //!< The current product does not support this operation.
+	VzRetNoConfigFolder				= -21,  //!< No product profile found.
+	VzRetWebServerStartError        = -22,  //!< WebServer Start/Restart error(IP or PORT).
+	VzRetGetOverStayFrame           = -23,  //!< The time from frame ready to get frame is out of 1s
+	VzRetCreateLogDirError          = -24,  //!< Create log directory error
+	VzRetCreateLogFileError			= -25,  //!< Create log file error
+	VzRetNoAdapterConnected			= -100,	//!< There is no adapter connected
+	VzRetReInitialized				= -101,	//!< The SDK has been Initialized
+	VzRetNoInitialized				= -102,	//!< The SDK has not been Initialized
+	VzRetCameraOpened				= -103,	//!< The camera has been opened.
+	VzRetCmdError					= -104,	//!< Set/Get cmd control error
+	VzRetCmdSyncTimeOut				= -105,	//!< Set cmd ok.but time out for the sync return 
+    VzRetIPNotMatch                 = -106, //!< IP is not in the same network segment
+    VzRetNotStopStream              = -107, //!< Please invoke VZ_StopStream first to close the data stream
+    VzRetNotStartStream             = -108, //!< Please invoke VZ_StartStream first to get the data stream
+	VzRetNoDriversFolder			= -109, //!< Please invoke VZ_StartStream first to get the data stream
+
+	VzRetOthers = -255,	             //!< An unknown error occurred.
+}VzReturnStatus;
+
+typedef enum {
+	VzConnectUNKNOWN = 0,
+    VzUnconnected = 1,
+    VzConnected = 2,
+    VzOpened = 3,
+    VzUpgradeUnconnected = 4,
+    VzUpgradeConnected = 5,
+}VzConnectStatus;
+
+typedef enum
+{
+    VzActiveMode = 0x00,             //enter the active mode
+    VzHardwareTriggerMode = 0x01,    //enter the hardware salve mode, at this time need to connect the hardware trigger wire, provide hardware signal, to trigger the image
+    VzSoftwareTriggerMode = 0x02,    //enter the software salve mode, at this time need to invoke VZ_SetSoftwareSlaveTrigger, to trigger the image
+}VzWorkMode;
+
+typedef enum
+{
+    VzExposureControlMode_Auto = 0,
+    VzExposureControlMode_Manual = 1,
+}VzExposureControlMode;
+
+
+#endif /* VZENSEDS_ENUMS_H */
+

+ 206 - 0
Tof3DCamera/AArch64/Include/VzenseNebula_types.h

@@ -0,0 +1,206 @@
+#ifndef VZENSEDS_TYPES_H
+#define VZENSEDS_TYPES_H
+
+#include <stdint.h>
+#include "VzenseNebula_enums.h"
+
+typedef uint16_t VzDepthPixel;  //!< Depth image pixel type in 16-bit
+typedef uint16_t VzGray16Pixel; //!< Gray image pixel type in 16-bit
+typedef uint8_t VzGray8Pixel;   //!< Gray image pixel type in 8-bit
+
+#pragma pack (push, 1)
+/**
+ * @brief Color image pixel type in 24-bit RGB format.
+ */
+typedef struct
+{
+	uint8_t r;	//!< Red
+	uint8_t g;	//!< Green
+	uint8_t b;	//!< Blue
+} VzRGB888Pixel;
+
+/**
+ * @brief Color image pixel type in 24-bit BGR format.
+ */
+typedef struct
+{
+	uint8_t b;	//!< Blue
+	uint8_t g;	//!< Green
+	uint8_t r;	//!< Red
+} VzBGR888Pixel;
+
+/**
+ * @brief Stores the x, y, and z components of a 3D vector.
+ */
+typedef struct  
+{
+	float x, y, z;	//!< The x, y, and z components of the vector.
+}VzVector3f;
+
+/**
+ * @brief Stores the x, y, and z components of a 2D vector.
+ */
+typedef struct
+{
+	uint16_t x;
+	uint16_t y;
+}VzVector2u16;
+
+/**
+ * @brief Contains depth information for a given pixel.
+ */
+typedef struct
+{
+	int          depthX;    //!< The x coordinate of the pixel.
+	int          depthY;    //!< The y coordinate of the pixel.
+	VzDepthPixel depthZ;    //!< The depth of the pixel, in millimeters.
+}VzDepthVector3;
+
+/**
+ * @brief image resolution
+ */
+typedef struct {
+    int width;
+    int height;
+}VzResolution;
+
+/**
+ * @brief Supported resolutions.
+ */
+typedef struct
+{
+    int count;
+    VzResolution resolution[6];
+}VzResolutionList;
+
+/**
+ * @brief Camera intrinsic parameters and distortion coefficients.
+ */
+typedef struct
+{
+	double	fx;  //!< Focal length x (pixel)
+	double	fy;  //!< Focal length y (pixel)
+	double	cx;  //!< Principal point x (pixel)
+	double	cy;  //!< Principal point y (pixel)
+	double	k1;  //!< Radial distortion coefficient, 1st-order
+	double	k2;  //!< Radial distortion coefficient, 2nd-order
+	double	p1;  //!< Tangential distortion coefficient
+	double	p2;  //!< Tangential distortion coefficient
+	double	k3;  //!< Radial distortion coefficient, 3rd-order
+	double	k4;  //!< Radial distortion coefficient, 4st-order
+	double	k5;  //!< Radial distortion coefficient, 5nd-order
+	double	k6;  //!< Radial distortion coefficient, 6rd-order
+}VzSensorIntrinsicParameters;
+
+/** 
+ * @brief Extrinsic parameters defines the physical relationship form tof sensor to color sensor
+ */
+typedef struct
+{
+	double rotation[9];     //!< Orientation stored as an array of 9 double representing a 3x3 rotation matrix.
+	double translation[3];  //!< Location stored as an array of 3 double representing a 3-D translation vector.
+}VzSensorExtrinsicParameters;
+
+/**
+ * @brief Depth/IR/Color image frame data.
+ */
+typedef struct
+{
+	uint32_t       frameIndex;          //!< The index of the frame.
+	VzFrameType    frameType;           //!< The type of frame. See ::VzFrameType for more information.
+	VzPixelFormat  pixelFormat;         //!< The pixel format used by a frame. See ::VzPixelFormat for more information.
+	uint8_t*       pFrameData;          //!< A buffer containing the frame’s image data.
+	uint32_t       dataLen;             //!< The length of pFrame, in bytes.
+	float          exposureTime;        //!< The exposure time, in milliseconds.
+    uint8_t        depthRange;          //!< The depth range mode of the current frame. Used only for depth frames.
+	uint16_t       width;               //!< The width of the frame, in pixels.
+	uint16_t       height;              //!< The height of the frame, in pixels.
+    uint64_t       deviceTimestamp;     //!< The timestamp of the frame from the device.
+}VzFrame;
+
+typedef struct
+{
+	uint32_t depth : 1;
+	uint32_t ir : 1;
+	uint32_t color : 1;
+	uint32_t transformedColor : 1;
+	uint32_t transformedDepth : 1;
+	uint32_t confidence : 1;
+	uint32_t reserved : 26;
+}VzFrameReady;
+
+typedef void* VzDeviceHandle;
+
+typedef struct
+{
+	char productName[64];
+    char uri[256];
+	char alias[64];
+    char serialNumber[64];
+    char ip[17];
+	VzConnectStatus status;
+}VzDeviceInfo;
+
+typedef struct
+{
+	int threshold;//[0, 3],The larger the value is, the more obvious the filtering effect is and The smaller the point cloud wobble
+    bool enable;
+} VzTimeFilterParams;
+
+typedef struct
+{
+	int threshold;//[0, 100],The larger the value is, the more obvious the filtering effect is and the more points are filtered out
+    bool enable;
+} VzConfidenceFilterParams;
+
+typedef struct
+{
+    int	threshold;//[0, 49],The larger the value is, the more obvious the filtering effect is and the more points are filtered out
+    bool enable;
+} VzFlyingPixelFilterParams;
+
+typedef struct
+{
+    VzExposureControlMode mode;
+    int	exposureTime;              //When the control mode is AE,  exposureTime represents the maximum exposure time.
+                                   //When the control mode is Manual, exposureTime represents the current exposure time.
+} VzExposureTimeParams;
+
+
+
+/**
+ * @brief Error informations about the device
+ */
+typedef struct
+{
+    int errorCount;                     //The count of error messages, the maximum number is 10
+    char errorMessage[10][64];          //The maximum length of each error message is 64(contains '\0').
+} VzDeviceErrorInfo;
+
+typedef struct
+{	
+	uint16_t width;                      //[1,65535],The width of input signal.
+	uint16_t interval;                   //[34000,65535],The interval of input signal.
+	uint8_t polarity;                    //[0,1],0 for active low, 1 for active high.
+}VzInputSignalParamsForHWTrigger;        //Input signal parameters for Hardware Trigger.
+
+typedef struct
+{
+	uint16_t width;                      //[1,65535],The width of output signal.
+	uint16_t delay;                      //[0,65535],The delay time of output signal.
+	uint8_t polarity;                    //[0,1],0 for active low, 1 for active high.
+}VzOutputSignalParams;                   //Output signal parameters.
+
+#pragma pack (pop)
+
+/**
+* @brief hotplug status callback function
+* pInfo     return the info of the Device, See ::VzDeviceInfo
+* state     0:device added , 1:device removed
+* pUserData Pointer to user data, which can be null
+*/
+typedef void(*PtrHotPlugStatusCallback)(const VzDeviceInfo* pInfo, int state, void* pUserData);
+
+typedef void(*PtrUpgradeStatusCallback)(int status, int params, void* pUserData);
+
+#endif /* VZENSEDS_TYPES_H */

+ 13 - 0
Tof3DCamera/AArch64/Lib/Config/DS77CLite_0F.json

@@ -0,0 +1,13 @@
+{
+    "productName": "DS77CLite",
+    "connectType":"socket",
+    "colorSensor": [
+        {
+            "type": "gc2053",
+            "resolutionList": ["1600_1200","800_600", "640_480"]
+        }    ],
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 13 - 0
Tof3DCamera/AArch64/Lib/Config/DS77CPro_0E.json

@@ -0,0 +1,13 @@
+{
+    "productName": "DS77CPro",
+    "connectType":"socket",
+    "colorSensor": [
+        {
+            "type": "gc2053",
+            "resolutionList": ["1600_1200","800_600", "640_480"]
+        }    ],
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 8 - 0
Tof3DCamera/AArch64/Lib/Config/DS77Lite_11.json

@@ -0,0 +1,8 @@
+{
+    "productName": "DS77Lite",
+    "connectType":"socket",
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 8 - 0
Tof3DCamera/AArch64/Lib/Config/DS77Pro_10.json

@@ -0,0 +1,8 @@
+{
+    "productName": "DS77Pro",
+    "connectType":"socket",
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 13 - 0
Tof3DCamera/AArch64/Lib/Config/DS86_12.json

@@ -0,0 +1,13 @@
+{
+    "productName": "DS86",
+    "connectType":"socket",
+    "colorSensor": [
+    {
+      "type": "gc2053",
+      "resolutionList": [ "1600_1200", "800_600", "640_480" ]
+    }    ],
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 13 - 0
Tof3DCamera/AArch64/Lib/Config/DS87_13.json

@@ -0,0 +1,13 @@
+{
+    "productName": "DS87",
+    "connectType":"socket",
+    "colorSensor": [
+    {
+      "type": "gc2053",
+      "resolutionList": [ "1600_1200", "800_600", "640_480" ]
+    }    ],
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

BIN
Tof3DCamera/AArch64/Lib/libNebula_api.so.1.2


BIN
Tof3DCamera/AArch64/Lib/libNebula_api.so.1.2.4


+ 29 - 0
Tof3DCamera/LICENSE

@@ -0,0 +1,29 @@
+BSD 3-Clause License
+
+Copyright (c) 2022, Vzense Technology
+All rights reserved.
+
+Redistribution and use in source and binary forms, with or without
+modification, are permitted provided that the following conditions are met:
+
+* Redistributions of source code must retain the above copyright notice, this
+  list of conditions and the following disclaimer.
+
+* Redistributions in binary form must reproduce the above copyright notice,
+  this list of conditions and the following disclaimer in the documentation
+  and/or other materials provided with the distribution.
+
+* Neither the name of the copyright holder nor the names of its
+  contributors may be used to endorse or promote products derived from
+  this software without specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

+ 47 - 0
Tof3DCamera/README.md

@@ -0,0 +1,47 @@
+## Vzense Nebula Software Develop Kit
+
+### Supported Devices
+
+- DS77 (DS77_S_20220530_B16  and later) 
+- DS77C (DS77_S_20220530_B16  and later )
+- DS86 (DS86_R_20230321  and later )
+
+### Supported Platform
+
+- AArch64
+- Ubuntu16.04 (x86_64 platform), e.g. intel i5,i7
+- Ubuntu18.04 (x86_64 platform), e.g. intel i5,i7
+- Windows 10/11
+
+### Folder description
+-  **AArch64** 
+
+    Ubuntu18.04 arm64 SDK package that is developed for personal computer platform(arm64), use standard compiler aarch64-linux-gnu(v7.5.0)
+   
+-  **Ubuntu16.04** 
+   
+   Ubuntu16.04 PC SDK package that is developed for personal computer platform(x86_64), use standard compiler x86_64-linux-gnu(v5.4.0)
+   
+-  **Ubuntu18.04** 
+
+    Ubuntu18.04 PC SDK package that is developed for personal computer platform(x86_64), use standard compiler x86_64-linux-gnu(v7.5.0)
+    Ubuntu18.04 SDK package compatible with Ubuntu20.04
+
+-  **Windows** 
+
+    Windows PC SDK package that is developed for personal computer platform(x86_64), use standard compiler VS2017
+
+
+### Summary Of The Guidelines
+
+- Choose the right base branch;
+
+- Include sample project and documentation;
+
+### Resources
+
+- Homepage: https://www.vzense.com/
+- Order: https://www.vzense.com/
+- Docs: [Vzense ToF Sensor and Application](https://vzense.com/Downloads.html)
+- Develop tools: https://github.com/Vzense , https://gitee.com/Vzense
+- Q&A forum: [FAQ - 青岛维感科技有限公司 (vzense.com)](https://vzense.com/Newsdispalys_faq.html)

+ 107 - 0
Tof3DCamera/Samples/DS77/DevHotPlugCallback/DevHotPlugCallback.py

@@ -0,0 +1,107 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+def HotPlugStateCallback(type_struct,  state = c_int32(0)):
+    global camera
+    if state ==0:
+        print(str(type_struct.contents.alias) + "   add")
+        ret = camera.VZ_OpenDeviceByUri(type_struct.contents.uri)
+        if  ret == 0:
+            print(str(type_struct.contents.alias) + " open success")
+        else:
+            print(str(type_struct.contents.alias) + " open failed",ret)
+        ret = camera.VZ_StartStream()
+        if  ret == 0:
+            print(str(type_struct.contents.alias) + " startstream success")
+        else:
+            print(str(type_struct.contents.alias) + " startstream failed",ret)
+    else:
+        print(str(type_struct.contents.alias) + "   remove")
+        ret = camera.VZ_StopStream()
+        if  ret == 0:
+            print(str(type_struct.contents.alias) + " stopstream success")
+        else:
+            print(str(type_struct.contents.alias) + " stopstream failed",ret)
+        ret = camera.VZ_CloseDevice()
+        if  ret == 0:
+            print(str(type_struct.contents.alias) + " close success")
+        else:
+            print(str(type_struct.contents.alias) + " close failed",ret)
+
+camera.VZ_SetHotPlugStatusCallback(HotPlugStateCallback)
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+print("uri: "+str(device_info.uri))
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+
+if  ret == 0 or ret == -103:
+    ret = camera.VZ_StartStream()
+    if  ret == 0:
+        print("startstream success")
+    else:
+        print("startstream failed",ret)
+
+    while 1:
+        ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+        if  ret !=0:
+            print("VZ_GetFrameReady failed:",ret)
+            continue
+  
+        if  frameready.depth:      
+            ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+            if  ret ==0:
+                print("frameIndex: ",frame.frameIndex)
+            else:
+                print("get depth frame failed ",ret)
+            continue
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))  
+
+ret = camera.VZ_StopStream()
+if  ret == 0:
+    print("stopstream success")
+else:
+    print("stopstream failed",ret)
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+                       

+ 61 - 0
Tof3DCamera/Samples/DS77/DeviceConnectByAlias/DeviceConnectByAlias.py

@@ -0,0 +1,61 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByAlias(device_info.alias)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+ 
+ret = camera.VZ_CloseDevice()  
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 62 - 0
Tof3DCamera/Samples/DS77/DeviceConnectByIP/DeviceConnectByIP.py

@@ -0,0 +1,62 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByIP with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("ip: "+str(device_info.ip))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByIP(device_info.ip)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByIP failed: ' + str(ret))   
+ 
+ret = camera.VZ_CloseDevice()  
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 94 - 0
Tof3DCamera/Samples/DS77/DeviceHWTriggerMode/DeviceHWTriggerMode.py

@@ -0,0 +1,94 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)   
+
+ret = camera.VZ_SetWorkMode(VzWorkMode.HardwareTriggerMode)
+if  ret != 0:  
+    print("VZ_SetWorkMode failed:",ret)
+
+for i in range(300000):
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000)) 
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    
+    if  frameready.depth:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+        if  ret == 0:
+            print("depth  id:",frame.frameIndex)  
+        else:   
+            print("depth  error:",ret)   
+
+ret = camera.VZ_SetWorkMode(VzWorkMode.ActiveMode)
+if  ret != 0:  
+    print("VZ_SetWorkMode failed:",ret)
+    
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 73 - 0
Tof3DCamera/Samples/DS77/DeviceInfoGet/DeviceInfoGet.py

@@ -0,0 +1,73 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print('cam productName:' + str(device_info.productName))
+    print('cam uri:' + str(device_info.uri))
+    print('cam alias:' + str(device_info.alias))
+    print('cam serialNumber:' + str(device_info.serialNumber))
+    print('cam ip:' + str(device_info.ip))
+    print('cam status:' + str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+ 
+ 
+# get FW
+ret, fw = camera.VZ_GetFirmwareVersion()
+if  ret == 0:
+    print("VZ_GetFirmwareVersion :",str(fw))
+else:
+    print("VZ_GetFirmwareVersion failed:",ret)
+
+ 
+ret = camera.VZ_CloseDevice()
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 98 - 0
Tof3DCamera/Samples/DS77/DeviceParamSetGet/DeviceParamSetGet.py

@@ -0,0 +1,98 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+
+ret, params = camera.VZ_GetSensorIntrinsicParameters(VzSensorType.VzToFSensor)
+if  ret == 0:
+    print("VZ_GetSensorIntrinsicParameters VzToFSensor :",
+    params.fx,
+    params.fy,
+    params.cx,
+    params.cy, 
+    params.k1,
+    params.k2,
+    params.p1,
+    params.p2,
+    params.k3,
+    params.k4,
+    params.k5,
+    params.k6)
+else:
+    print("VZ_GetSensorIntrinsicParameters VzToFSensor failed:",ret)
+
+ret, gmmgain = camera.VZ_GetIRGMMGain()
+if  ret == 0:
+    print("VZ_GetIRGMMGain :",gmmgain)
+else:
+    print("VZ_GetIRGMMGain failed:",ret)
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 102 - 0
Tof3DCamera/Samples/DS77/DeviceSWTriggerMode/DeviceSWTriggerMode.py

@@ -0,0 +1,102 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)   
+
+ret = camera.VZ_SetWorkMode(VzWorkMode.SoftwareTriggerMode)
+if  ret != 0:  
+    print("VZ_SetWorkMode failed:",ret)
+
+frameRate = camera.VZ_GetFrameRate()
+print("VZ_GetFrameRate :", frameRate[1])
+
+for i in range(30):
+
+    ret = camera.VZ_SetSoftwareSlaveTrigger()
+    if  ret != 0:  
+        print("VZ_SetSoftwareSlaveTrigger failed:",ret)
+
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000)) 
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    if  frameready.depth:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+        if  ret == 0:
+            print("depth  id:",frame.frameIndex)  
+        else:   
+            print("depth  error:",ret)   
+    time.sleep(1/frameRate[1])
+
+ret = camera.VZ_SetWorkMode(VzWorkMode.ActiveMode)
+if  ret != 0:  
+    print("VZ_SetWorkMode failed:",ret)
+    
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 66 - 0
Tof3DCamera/Samples/DS77/DeviceSearchAndConnect/DeviceSearchAndConnect.py

@@ -0,0 +1,66 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam productName:' + str(device_info.productName))
+        print('cam uri:' + str(device_info.uri))
+        print('cam alias:' + str(device_info.alias))
+        print('cam serialNumber:' + str(device_info.serialNumber))
+        print('cam ip:' + str(device_info.ip))
+        print('cam status:' + str(device_info.status))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+            
+ret = camera.VZ_CloseDevice()   
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 68 - 0
Tof3DCamera/Samples/DS77/DeviceSetParamsByJson/DeviceSetParamsByJson.py

@@ -0,0 +1,68 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByAlias(device_info.alias)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+     
+imgpath = input('Please input Json file path:')
+ret = camera.VZ_SetParamsByJson(imgpath)
+if  ret == 0:
+    print("SetParamsByJson successful")
+else:
+    print('VZ_SetParamsByJson failed: ' + str(ret))
+ 
+ret = camera.VZ_CloseDevice()  
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 73 - 0
Tof3DCamera/Samples/DS77/DeviceStartStopSteaming/DeviceStartStopSteaming.py

@@ -0,0 +1,73 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 99 - 0
Tof3DCamera/Samples/DS77/FrameCaptureAndSave/FrameCaptureAndSave.py

@@ -0,0 +1,99 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+while 1:
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    
+    if  frameready.depth:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+
+        curPath = os.getcwd()
+        print (curPath)
+        folder = curPath+ "/save"
+        if not os.path.exists(folder):
+            print("not exists")
+            os.makedirs(folder)
+        else:
+            print("already exists")
+        filename = folder + "/depth.bin"
+        file = open(filename,"wb+")
+        for i in range(frame.dataLen):
+            file.write(c_uint8(frame.pFrameData[i]))
+        
+        file.close()
+        print("save ok")
+        break
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 104 - 0
Tof3DCamera/Samples/DS77/FrameViewer/FrameViewer.py

@@ -0,0 +1,104 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import cv2
+import time
+
+camera = VzenseTofCam()
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' , ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:', ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+print("uri: "+str(device_info.uri))
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+
+if  ret == 0:
+
+    ret = camera.VZ_StartStream()
+    if  ret == 0:
+        print("start stream successful")
+    else:
+        print("VZ_StartStream failed:",ret)
+
+ 
+    colorSlope = c_uint16(7495)
+    try:
+        while 1:
+
+            ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+            if  ret !=0:
+                print("VZ_GetFrameReady failed:",ret)
+                continue
+
+            if  frameready.depth:
+                ret,depthframe = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+                if  ret == 0:
+                    frametmp = numpy.ctypeslib.as_array(depthframe.pFrameData, (1, depthframe.width * depthframe.height * 2))
+                    frametmp.dtype = numpy.uint16
+                    frametmp.shape = (depthframe.height, depthframe.width)
+
+                    #convert ushort value to 0xff is just for display
+                    img = numpy.int32(frametmp)
+                    img = img*255/colorSlope
+                    img = numpy.clip(img, 0, 255)
+                    img = numpy.uint8(img)
+                    frametmp = cv2.applyColorMap(img, cv2.COLORMAP_RAINBOW)
+ 
+                    cv2.imshow("Depth Image", frametmp)
+                else:
+                    print("get depth frame failed:",ret)
+            if  frameready.ir:
+                ret,irframe = camera.VZ_GetFrame(VzFrameType.VzIRFrame)
+                if  ret == 0:
+                    frametmp = numpy.ctypeslib.as_array(irframe.pFrameData, (1, irframe.dataLen))
+                    frametmp.dtype = numpy.uint8
+                    frametmp.shape = (irframe.height, irframe.width)
+                    
+                    cv2.imshow("IR Image", frametmp)
+                else:
+                    print("get ir frame failed:",ret)
+
+            key = cv2.waitKey(1)
+            if  key == 27:
+                cv2.destroyAllWindows()
+                print("---end---")
+                break;
+                   
+    except Exception as e :
+        print(e)
+    finally :
+        print('end')
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+            
+
+        

+ 85 - 0
Tof3DCamera/Samples/DS77/MultiConnection/MultiConnection.py

@@ -0,0 +1,85 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count < 2 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+
+if camera_count < 2: 
+    print("there are no camera or only one camera")
+    exit()
+
+print("cam count :",camera_count)
+cameras = []
+
+ret, device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+if ret==0:
+    for i in range(camera_count): 
+        print('cam uri:  ' + str(device_infolist[i].uri))
+        cam = VzenseTofCam()
+        ret = cam.VZ_OpenDeviceByUri(device_infolist[i].uri)
+        if  ret == 0:
+            print(device_infolist[i].alias,"open successful")
+            cameras.append(cam)
+        else:
+            print(device_infolist[i].alias,'VZ_OpenDeviceByUri failed: ' + str(ret))    
+else:
+    print(' failed:' + ret)  
+    exit()  
+
+for i in range(camera_count): 
+    ret = cameras[i].VZ_StartStream()       
+    if  ret == 0:
+        print(device_infolist[i].alias,"start stream successful")
+    else:
+        print(device_infolist[i].alias,'VZ_StartStream failed: ' + str(ret))  
+
+# show image 
+
+while 1:
+    for i in range(camera_count): 
+        ret, frameready = cameras[i].VZ_GetFrameReady(c_uint16(1000))   
+        if  ret !=0:
+            print("VZ_GetFrameReady failed:",ret)
+            continue
+                        
+        if  frameready.depth:      
+            ret,depthframe = cameras[i].VZ_GetFrame(VzFrameType.VzDepthFrame)
+            if  ret == 0:
+                print(device_infolist[i].alias,"  depth frameindex: ",depthframe.frameIndex)
+            else:
+                print("VZ_GetFrame error", ret)
+        if  frameready.ir:
+            ret,irframe = cameras[i].VZ_GetFrame(VzFrameType.VzIRFrame)
+            if  ret == 0:
+                print(device_infolist[i].alias,"  ir frameindex: ",irframe.frameIndex)
+            else:
+                print("VZ_GetFrame error", ret)
+
+for i in range(camera_count): 
+    
+    ret = cameras[i].VZ_StopStream()       
+    if  ret == 0:
+        print("stop stream successful")
+    else:
+        print('VZ_StopStream failed: ' + str(ret))  
+
+    ret = cameras[i].VZ_CloseDevice()       
+    if  ret == 0:
+        print("close device successful")
+    else:
+        print('VZ_CloseDevice failed: ' + str(ret))  
+    
+           

+ 107 - 0
Tof3DCamera/Samples/DS77/PointCloudCaptureAndSave/PointCloudCaptureAndSave.py

@@ -0,0 +1,107 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+ 
+while 1:
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    
+    if  frameready.depth:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+        if  ret == 0:
+            ret, pointlist = camera.VZ_ConvertDepthFrameToPointCloudVector(frame)
+            if  ret == 0:
+                curPath = os.getcwd()
+                print (curPath)
+                folder = curPath+ "/save"
+                if not os.path.exists(folder):
+                    print("not exists")
+                    os.makedirs(folder)
+                else:
+                    print("already exists")
+
+                filename = folder + "/point.txt"
+                file = open(filename,"w")
+
+                for i in range(frame.width*frame.height):
+                    if pointlist[i].z!=0 and pointlist[i].z!=65535:
+                        file.write("{0},{1},{2}\n".format(pointlist[i].x,pointlist[i].y,pointlist[i].z))
+
+                file.close()
+                print("save ok")
+            else:
+                print("VZ_ConvertDepthFrameToWorldVector failed:",ret)     
+        break
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 116 - 0
Tof3DCamera/Samples/DS77/ToFExposureTimeSetGet/ToFExposureTimeSetGet.py

@@ -0,0 +1,116 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:"+ str(ret))   
+
+ret = camera.VZ_SetExposureControlMode()
+if  ret == 0:
+    print("set tofsensor to manual mode successful")
+else:
+    print("VZ_SetExposureControlMode failed:"+ str(ret))   
+
+ret,frameRate = camera.VZ_GetFrameRate()
+if  ret == 0:
+    print("Get default frame rate:"+ str(frameRate))   
+else:
+    print("VZ_GetFrameRate failed:"+ str(ret))   
+
+ret,MaxExposureTime = camera.VZ_GetManaulMaxExposureTime()
+if  ret == 0:
+    print("Recommended scope: 58 - "+ str(MaxExposureTime))   
+else:
+    print("VZ_GetManaulMaxExposureTime failed:"+ str(ret))   
+
+ret = camera.VZ_SetExposureTime(VzSensorType.VzToFSensor,400)
+if  ret == 0:
+    print("Set exposure time 400 is ok")   
+else:
+    print("VZ_SetExposureTime failed:"+ str(ret))   
+
+ret = camera.VZ_SetFrameRate(5)
+if  ret == 0:
+    print("Set frame rate 5 is ok")   
+else:
+    print("VZ_SetFrameRate failed:"+ str(ret))   
+
+ret,MaxExposureTime = camera.VZ_GetManaulMaxExposureTime()
+if  ret == 0:
+    print("Recommended scope: 58 - "+ str(MaxExposureTime))   
+else:
+    print("VZ_GetManaulMaxExposureTime failed:"+ str(ret))   
+
+ret = camera.VZ_SetExposureTime(VzSensorType.VzToFSensor,500)
+if  ret == 0:
+    print("Set exposure time 500 is ok")   
+else:
+    print("VZ_SetExposureTime failed:"+ str(ret))   
+	
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+
+print('Test end, please reboot camera to restore the default settings')  

+ 139 - 0
Tof3DCamera/Samples/DS77/ToFFiltersSetGet/ToFFiltersSetGet.py

@@ -0,0 +1,139 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:"+ str(ret))   
+ 
+ret,params = camera.VZ_GetTimeFilterParams()
+if  ret == 0:
+    print("The default TimeFilter switch is " + str(params.enable))
+else:
+    print("VZ_GetTimeFilterParams failed:"+ str(ret))   
+
+params.enable = not params.enable
+ret = camera.VZ_SetTimeFilterParams(params)
+if  ret == 0:
+    print("Set TimeFilter switch to "+ str(params.enable) + " is Ok")   
+else:
+    print("VZ_SetTimeFilterParams failed:"+ str(ret))   
+
+ret,params = camera.VZ_GetConfidenceFilterParams()
+if  ret == 0:
+    print("The default ConfidenceFilter switch is " + str(params.enable))
+else:
+    print("VZ_GetConfidenceFilterParams failed:"+ str(ret))   
+
+params.enable = not params.enable
+ret = camera.VZ_SetConfidenceFilterParams(params)
+if  ret == 0:
+    print("Set ConfidenceFilter switch to "+ str(params.enable) + " is Ok")   
+else:
+    print("VZ_SetConfidenceFilterParams failed:"+ str(ret))   
+
+ret,params = camera.VZ_GetFlyingPixelFilterParams()
+if  ret == 0:
+    print("The default FlyingPixelFilter switch is " + str(params.enable))
+else:
+    print("VZ_GetFlyingPixelFilterParams failed:"+ str(ret))   
+
+params.enable = not params.enable
+ret = camera.VZ_SetFlyingPixelFilterParams(params)
+if  ret == 0:
+    print("Set FlyingPixelFilter switch to "+ str(params.enable) + " is Ok")   
+else:
+    print("VZ_SetFlyingPixelFilterParams failed:"+ str(ret))   
+
+ret,enable = camera.VZ_GetFillHoleFilterEnabled()
+if  ret == 0:
+    print("The default FillHoleFilter switch is " + str(enable))
+else:
+    print("VZ_GetFillHoleFilterEnabled failed:"+ str(ret))   
+
+enable = not enable
+ret = camera.VZ_SetFillHoleFilterEnabled(enable)
+if  ret == 0:
+    print("Set FillHoleFilter switch to "+ str(enable) + " is Ok")   
+else:
+    print("VZ_SetFillHoleFilterEnabled failed:"+ str(ret))   
+
+ret,enable = camera.VZ_GetSpatialFilterEnabled()
+if  ret == 0:
+    print("The default SpatialFilter switch is " + str(enable))
+else:
+    print("VZ_GetSpatialFilterEnabled failed:"+ str(ret))   
+
+enable = not enable
+ret = camera.VZ_SetSpatialFilterEnabled(enable)
+if  ret == 0:
+    print("Set SpatialFilter switch to "+ str(enable) + " is Ok")   
+else:
+    print("VZ_SetSpatialFilterEnabled failed:"+ str(ret))   
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+    
+print('Test end, please reboot camera to restore the default settings')  

+ 107 - 0
Tof3DCamera/Samples/DS77C/DevHotPlugCallback/DevHotPlugCallback.py

@@ -0,0 +1,107 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+def HotPlugStateCallback(type_struct,  state = c_int32(0)):
+    global camera
+    if state ==0:
+        print(str(type_struct.contents.alias) + "   add")
+        ret = camera.VZ_OpenDeviceByUri(type_struct.contents.uri)
+        if  ret == 0:
+            print(str(type_struct.contents.alias) + " open success")
+        else:
+            print(str(type_struct.contents.alias) + " open failed",ret)
+        ret = camera.VZ_StartStream()
+        if  ret == 0:
+            print(str(type_struct.contents.alias) + " startstream success")
+        else:
+            print(str(type_struct.contents.alias) + " startstream failed",ret)
+    else:
+        print(str(type_struct.contents.alias) + "   remove")
+        ret = camera.VZ_StopStream()
+        if  ret == 0:
+            print(str(type_struct.contents.alias) + " stopstream success")
+        else:
+            print(str(type_struct.contents.alias) + " stopstream failed",ret)
+        ret = camera.VZ_CloseDevice()
+        if  ret == 0:
+            print(str(type_struct.contents.alias) + " close success")
+        else:
+            print(str(type_struct.contents.alias) + " close failed",ret)
+
+camera.VZ_SetHotPlugStatusCallback(HotPlugStateCallback)
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+print("uri: "+str(device_info.uri))
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+
+if  ret == 0 or ret == -103:
+    ret = camera.VZ_StartStream()
+    if  ret == 0:
+        print("startstream success")
+    else:
+        print("startstream failed",ret)
+
+    while 1:
+        ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+        if  ret !=0:
+            print("VZ_GetFrameReady failed:",ret)
+            continue
+  
+        if  frameready.depth:      
+            ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+            if  ret ==0:
+                print("frameIndex: ",frame.frameIndex)
+            else:
+                print("get depth frame failed ",ret)
+            continue
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))  
+
+ret = camera.VZ_StopStream()
+if  ret == 0:
+    print("stopstream success")
+else:
+    print("stopstream failed",ret)
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+                       

+ 61 - 0
Tof3DCamera/Samples/DS77C/DeviceConnectByAlias/DeviceConnectByAlias.py

@@ -0,0 +1,61 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByAlias(device_info.alias)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+ 
+ret = camera.VZ_CloseDevice()  
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 62 - 0
Tof3DCamera/Samples/DS77C/DeviceConnectByIP/DeviceConnectByIP.py

@@ -0,0 +1,62 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByIP with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("ip: "+str(device_info.ip))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByIP(device_info.ip)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByIP failed: ' + str(ret))   
+ 
+ret = camera.VZ_CloseDevice()  
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 94 - 0
Tof3DCamera/Samples/DS77C/DeviceHWTriggerMode/DeviceHWTriggerMode.py

@@ -0,0 +1,94 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)   
+
+ret = camera.VZ_SetWorkMode(VzWorkMode.HardwareTriggerMode)
+if  ret != 0:  
+    print("VZ_SetWorkMode failed:",ret)
+
+for i in range(300000):
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000)) 
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    
+    if  frameready.depth:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+        if  ret == 0:
+            print("depth  id:",frame.frameIndex)  
+        else:   
+            print("depth  error:",ret)   
+
+ret = camera.VZ_SetWorkMode(VzWorkMode.ActiveMode)
+if  ret != 0:  
+    print("VZ_SetWorkMode failed:",ret)
+    
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 73 - 0
Tof3DCamera/Samples/DS77C/DeviceInfoGet/DeviceInfoGet.py

@@ -0,0 +1,73 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print('cam productName:' + str(device_info.productName))
+    print('cam uri:' + str(device_info.uri))
+    print('cam alias:' + str(device_info.alias))
+    print('cam serialNumber:' + str(device_info.serialNumber))
+    print('cam ip:' + str(device_info.ip))
+    print('cam status:' + str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+ 
+ 
+# get FW
+ret, fw = camera.VZ_GetFirmwareVersion()
+if  ret == 0:
+    print("VZ_GetFirmwareVersion :",str(fw))
+else:
+    print("VZ_GetFirmwareVersion failed:",ret)
+
+ 
+ret = camera.VZ_CloseDevice()
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 98 - 0
Tof3DCamera/Samples/DS77C/DeviceParamSetGet/DeviceParamSetGet.py

@@ -0,0 +1,98 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+
+ret, params = camera.VZ_GetSensorIntrinsicParameters(VzSensorType.VzToFSensor)
+if  ret == 0:
+    print("VZ_GetSensorIntrinsicParameters VzToFSensor :",
+    params.fx,
+    params.fy,
+    params.cx,
+    params.cy, 
+    params.k1,
+    params.k2,
+    params.p1,
+    params.p2,
+    params.k3,
+    params.k4,
+    params.k5,
+    params.k6)
+else:
+    print("VZ_GetSensorIntrinsicParameters VzToFSensor failed:",ret)
+
+ret, gmmgain = camera.VZ_GetIRGMMGain()
+if  ret == 0:
+    print("VZ_GetIRGMMGain :",gmmgain)
+else:
+    print("VZ_GetIRGMMGain failed:",ret)
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 102 - 0
Tof3DCamera/Samples/DS77C/DeviceSWTriggerMode/DeviceSWTriggerMode.py

@@ -0,0 +1,102 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)   
+
+ret = camera.VZ_SetWorkMode(VzWorkMode.SoftwareTriggerMode)
+if  ret != 0:  
+    print("VZ_SetWorkMode failed:",ret)
+
+frameRate = camera.VZ_GetFrameRate()
+print("VZ_GetFrameRate :",frameRate[1])
+
+for i in range(30):
+
+    ret = camera.VZ_SetSoftwareSlaveTrigger()
+    if  ret != 0:  
+        print("VZ_SetSoftwareSlaveTrigger failed:",ret)
+
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000)) 
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    if  frameready.depth:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+        if  ret == 0:
+            print("depth  id:",frame.frameIndex)  
+        else:   
+            print("depth  error:",ret)   
+    time.sleep(1/frameRate[1])
+
+ret = camera.VZ_SetWorkMode(VzWorkMode.ActiveMode)
+if  ret != 0:  
+    print("VZ_SetWorkMode failed:",ret)
+    
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 66 - 0
Tof3DCamera/Samples/DS77C/DeviceSearchAndConnect/DeviceSearchAndConnect.py

@@ -0,0 +1,66 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam productName:' + str(device_info.productName))
+        print('cam uri:' + str(device_info.uri))
+        print('cam alias:' + str(device_info.alias))
+        print('cam serialNumber:' + str(device_info.serialNumber))
+        print('cam ip:' + str(device_info.ip))
+        print('cam status:' + str(device_info.status))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+            
+ret = camera.VZ_CloseDevice()   
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 68 - 0
Tof3DCamera/Samples/DS77C/DeviceSetParamsByJson/DeviceSetParamsByJson.py

@@ -0,0 +1,68 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByAlias(device_info.alias)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+     
+imgpath = input('Please input Json file path:')
+ret = camera.VZ_SetParamsByJson(imgpath)
+if  ret == 0:
+    print("SetParamsByJson successful")
+else:
+    print('VZ_SetParamsByJson failed: ' + str(ret))
+ 
+ret = camera.VZ_CloseDevice()  
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 73 - 0
Tof3DCamera/Samples/DS77C/DeviceStartStopSteaming/DeviceStartStopSteaming.py

@@ -0,0 +1,73 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 99 - 0
Tof3DCamera/Samples/DS77C/FrameCaptureAndSave/FrameCaptureAndSave.py

@@ -0,0 +1,99 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+while 1:
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    
+    if  frameready.depth:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+
+        curPath = os.getcwd()
+        print (curPath)
+        folder = curPath+ "/save"
+        if not os.path.exists(folder):
+            print("not exists")
+            os.makedirs(folder)
+        else:
+            print("already exists")
+        filename = folder + "/depth.bin"
+        file = open(filename,"wb+")
+        for i in range(frame.dataLen):
+            file.write(c_uint8(frame.pFrameData[i]))
+        
+        file.close()
+        print("save ok")
+        break
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 109 - 0
Tof3DCamera/Samples/DS77C/FrameViewer/FrameViewer.py

@@ -0,0 +1,109 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import cv2
+import time
+
+camera = VzenseTofCam()
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' , ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:', ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+print("uri: "+str(device_info.uri))
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+
+if  ret == 0:
+
+    ret = camera.VZ_StartStream()
+    if  ret == 0:
+        print("start stream successful")
+    else:
+        print("VZ_StartStream failed:",ret)
+
+ 
+    colorSlope = c_uint16(7495)
+    try:
+        while 1:
+
+            ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+            if  ret !=0:
+                print("VZ_GetFrameReady failed:",ret)
+                continue
+            
+            if  frameready.depth:      
+                ret,depthframe = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+                if  ret == 0:
+                    frametmp = numpy.ctypeslib.as_array(depthframe.pFrameData, (1, depthframe.width * depthframe.height * 2))
+                    frametmp.dtype = numpy.uint16
+                    frametmp.shape = (depthframe.height, depthframe.width)
+
+                    #convert ushort value to 0xff is just for display
+                    img = numpy.int32(frametmp)
+                    img = img*255/colorSlope
+                    img = numpy.clip(img, 0, 255)
+                    img = numpy.uint8(img)
+                    frametmp = cv2.applyColorMap(img, cv2.COLORMAP_RAINBOW)
+ 
+                    cv2.imshow("Depth Image", frametmp)
+                else:
+                    print("get depth frame failed:",ret)
+            if  frameready.ir:
+                ret,irframe = camera.VZ_GetFrame(VzFrameType.VzIRFrame)
+                if  ret == 0:
+                    frametmp = numpy.ctypeslib.as_array(irframe.pFrameData, (1, irframe.dataLen))
+                    frametmp.dtype = numpy.uint8
+                    frametmp.shape = (irframe.height, irframe.width)
+                    
+                    cv2.imshow("IR Image", frametmp)
+                else:
+                    print("get ir frame failed:",ret)
+            if  frameready.color:      
+                ret,rgbframe = camera.VZ_GetFrame(VzFrameType.VzColorFrame)
+                if  ret == 0:
+                    frametmp = numpy.ctypeslib.as_array(rgbframe.pFrameData, (1, rgbframe.width * rgbframe.height * 3))
+                    frametmp.dtype = numpy.uint8
+                    frametmp.shape = (rgbframe.height, rgbframe.width,3)
+                    cv2.imshow("RGB Image", frametmp)
+                else:
+                    print("---end---")
+            key = cv2.waitKey(1)
+            if  key == 27:
+                cv2.destroyAllWindows()
+                print("---end---")
+                break;
+                   
+    except Exception as e :
+        print(e)
+    finally :
+        print('end')
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))

+ 85 - 0
Tof3DCamera/Samples/DS77C/MultiConnection/MultiConnection.py

@@ -0,0 +1,85 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count < 2 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+
+if camera_count < 2: 
+    print("there are no camera or only one camera")
+    exit()
+
+print("cam count :",camera_count)
+cameras = []
+
+ret, device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+if ret==0:
+    for i in range(camera_count): 
+        print('cam uri:  ' + str(device_infolist[i].uri))
+        cam = VzenseTofCam()
+        ret = cam.VZ_OpenDeviceByUri(device_infolist[i].uri)
+        if  ret == 0:
+            print(device_infolist[i].alias,"open successful")
+            cameras.append(cam)
+        else:
+            print(device_infolist[i].alias,'VZ_OpenDeviceByUri failed: ' + str(ret))    
+else:
+    print(' failed:' + ret)  
+    exit()  
+
+for i in range(camera_count): 
+    ret = cameras[i].VZ_StartStream()       
+    if  ret == 0:
+        print(device_infolist[i].alias,"start stream successful")
+    else:
+        print(device_infolist[i].alias,'VZ_StartStream failed: ' + str(ret))  
+
+# show image 
+
+while 1:
+    for i in range(camera_count): 
+        ret, frameready = cameras[i].VZ_GetFrameReady(c_uint16(1000))   
+        if  ret !=0:
+            print("VZ_GetFrameReady failed:",ret)
+            continue
+                        
+        if  frameready.depth:      
+            ret,depthframe = cameras[i].VZ_GetFrame(VzFrameType.VzDepthFrame)
+            if  ret == 0:
+                print(device_infolist[i].alias,"  depth frameindex: ",depthframe.frameIndex)
+            else:
+                print("VZ_GetFrame error", ret)
+        if  frameready.ir:
+            ret,irframe = cameras[i].VZ_GetFrame(VzFrameType.VzIRFrame)
+            if  ret == 0:
+                print(device_infolist[i].alias,"  ir frameindex: ",irframe.frameIndex)
+            else:
+                print("VZ_GetFrame error", ret)
+
+for i in range(camera_count): 
+    
+    ret = cameras[i].VZ_StopStream()       
+    if  ret == 0:
+        print("stop stream successful")
+    else:
+        print('VZ_StopStream failed: ' + str(ret))  
+
+    ret = cameras[i].VZ_CloseDevice()       
+    if  ret == 0:
+        print("close device successful")
+    else:
+        print('VZ_CloseDevice failed: ' + str(ret))  
+    
+           

+ 107 - 0
Tof3DCamera/Samples/DS77C/PointCloudCaptureAndSave/PointCloudCaptureAndSave.py

@@ -0,0 +1,107 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+ 
+while 1:
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    
+    if  frameready.depth:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+        if  ret == 0:
+            ret, pointlist = camera.VZ_ConvertDepthFrameToPointCloudVector(frame)
+            if  ret == 0:
+                curPath = os.getcwd()
+                print (curPath)
+                folder = curPath+ "/save"
+                if not os.path.exists(folder):
+                    print("not exists")
+                    os.makedirs(folder)
+                else:
+                    print("already exists")
+
+                filename = folder + "/point.txt"
+                file = open(filename,"w")
+
+                for i in range(frame.width*frame.height):
+                    if pointlist[i].z!=0 and pointlist[i].z!=65535:
+                        file.write("{0},{1},{2}\n".format(pointlist[i].x,pointlist[i].y,pointlist[i].z))
+
+                file.close()
+                print("save ok")
+            else:
+                print("VZ_ConvertDepthFrameToWorldVector failed:",ret)     
+        break
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 152 - 0
Tof3DCamera/Samples/DS77C/RGBExposureTimeSetGet/RGBExposureTimeSetGet.py

@@ -0,0 +1,152 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:"+ str(ret))
+
+'''Get default frame rate'''
+ret, rate = camera.VZ_GetFrameRate()
+if ret != 0:
+    print("VZ_GetFrameRate failed status:"+ str(ret))
+    exit()
+
+'''if need change the framerate, do first'''
+print("---- To  VzExposureControlMode_Manual ----")
+'''switch exposure mode to manual'''
+ret = camera.VZ_SetExposureControlMode(VzSensorType.VzColorSensor,VzExposureControlMode.VzExposureControlMode_Manual)
+
+if ret != 0:
+    print("VZ_SetExposureControlMode failed status:" + str(ret))
+    exit()
+else:
+    print("VZ_SetExposureControlMode  ok")
+
+print("* step1. Get Color exposure time range with frameRate " + str(rate) + "*")
+
+'''Get the range of the Color exposure time'''
+ret, exposureTime = camera.VZ_GetManualMaxExposureTime()
+if ret != 0:
+    print("VZ_GetProperty get Py_RGBExposureTimeMax failed status:" + str(ret))
+    exit()
+
+print("Recommended scope: 100 - " + str(exposureTime))
+
+print("* step2. Set and Get new ExposureTime *" )
+'''Set new ExposureTime '''
+ret = camera.VZ_SetExposureTime(VzSensorType.VzColorSensor, 3000)
+if ret != 0:
+    print("VZ_SetExposureTime failed status:" + str(ret))
+    exit()
+else:
+    print("SetExposureTime:3000")
+
+
+ret, params = camera.VZ_GetExposureTime(VzSensorType.VzColorSensor);
+if ret != 0:
+    print("VZ_GetExposureTime failed status:" + str(ret))
+    exit()
+else:
+     print("GetExposureTime:" + str(params.exposureTime))
+
+print("---- To VzExposureControlMode_Auto ----")
+'''switch exposure mode to auto'''
+ret = camera.VZ_SetExposureControlMode(VzSensorType.VzColorSensor, VzExposureControlMode.VzExposureControlMode_Auto)
+if 0 != ret:
+    print("VZ_SetExposureControlMode failed status:" + str(ret))
+    exit()
+else:
+    print("VZ_SetExposureControlMode ok")
+
+print("* step1. Get Color exposure time range *")
+'''Get the range of the Auto Color exposure time'''
+ret , exposureTime = camera.VZ_GetAutoMaxExposureTime()
+if 0 != ret:
+    print("VZ_GetProperty get Py_RGBExposureTimeMax failed status:" + str(ret))
+    exit()
+print("Recommended scope: 100 - " + str(exposureTime))
+
+print("* step2. Set and Get new Auto Max Color exposure time range *" )
+'''set new range of Auto Color exposure time.[100 maxExposureTime.exposureTime]'''
+ret = camera.VZ_SetAutoExposureTime(VzSensorType.VzColorSensor, 10000)
+if 0 != ret:
+    print("VZ_SetExposureTimeAutoMax failed status:" + str(ret))
+    exit()
+else:
+    print("SetExposureTimeAutoMax:10000")
+
+'''Get the new range of the Auto Color exposure time. '''
+ret, params = camera.VZ_GetAutoExposureTime(VzSensorType.VzColorSensor);
+if 0 != ret:
+    print("VZ_GetExposureTimeAutoMax failed status:" + str(ret))
+    exit()
+else:
+    print("GetExposureTimeAutoMax:" + str(params.exposureTime))
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+
+print('Test end, please reboot camera to restore the default settings')  

+ 117 - 0
Tof3DCamera/Samples/DS77C/RGBResolutionChange/RGBResolutionChange.py

@@ -0,0 +1,117 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+
+ret = camera.VZ_SetColorResolution(640, 480)
+time.sleep(2)
+if  ret != 0:  
+    print("VZ_SetColorResolution failed:",ret)
+ 
+for i in range(30):
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    
+    if  frameready.color:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzColorFrame)
+        if  ret == 0:
+            if frame.width == 640 and frame.height == 480:
+                print("rgb  id:",frame.frameIndex)
+            else:
+                print("rgb width ",frame.width,"  height ",frame.height)      
+        else:   
+            print("rgb  error:",ret)
+
+ret = camera.VZ_SetColorResolution(1600, 1200)
+time.sleep(2)
+if  ret != 0:  
+    print("VZ_SetColorResolution failed:",ret)
+ 
+for i in range(30):
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    
+    if  frameready.color:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzColorFrame)
+        if  ret == 0:
+            if frame.width == 1600 and frame.height == 1200:
+                print("rgb  id:",frame.frameIndex)
+            else:
+                print("rgb width ",frame.width,"  height ",frame.height)      
+        else:   
+            print("rgb  error:",ret)
+
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 116 - 0
Tof3DCamera/Samples/DS77C/ToFExposureTimeSetGet/ToFExposureTimeSetGet.py

@@ -0,0 +1,116 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:"+ str(ret))   
+
+ret = camera.VZ_SetExposureControlMode()
+if  ret == 0:
+    print("set tofsensor to manual mode successful")
+else:
+    print("VZ_SetExposureControlMode failed:"+ str(ret))   
+
+ret,frameRate = camera.VZ_GetFrameRate()
+if  ret == 0:
+    print("Get default frame rate:"+ str(frameRate))   
+else:
+    print("VZ_GetFrameRate failed:"+ str(ret))   
+
+ret,MaxExposureTime = camera.VZ_GetManaulMaxExposureTime()
+if  ret == 0:
+    print("Recommended scope: 58 - "+ str(MaxExposureTime))   
+else:
+    print("VZ_GetManaulMaxExposureTime failed:"+ str(ret))   
+
+ret = camera.VZ_SetExposureTime(VzSensorType.VzToFSensor,400)
+if  ret == 0:
+    print("Set exposure time 400 is ok")   
+else:
+    print("VZ_SetExposureTime failed:"+ str(ret))   
+
+ret = camera.VZ_SetFrameRate(5)
+if  ret == 0:
+    print("Set frame rate 5 is ok")   
+else:
+    print("VZ_SetFrameRate failed:"+ str(ret))   
+
+ret,MaxExposureTime = camera.VZ_GetManaulMaxExposureTime()
+if  ret == 0:
+    print("Recommended scope: 58 - "+ str(MaxExposureTime))   
+else:
+    print("VZ_GetManaulMaxExposureTime failed:"+ str(ret))   
+
+ret = camera.VZ_SetExposureTime(VzSensorType.VzToFSensor,500)
+if  ret == 0:
+    print("Set exposure time 500 is ok")   
+else:
+    print("VZ_SetExposureTime failed:"+ str(ret))   
+	
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+
+print('Test end, please reboot camera to restore the default settings')  

+ 139 - 0
Tof3DCamera/Samples/DS77C/ToFFiltersSetGet/ToFFiltersSetGet.py

@@ -0,0 +1,139 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:"+ str(ret))   
+ 
+ret,params = camera.VZ_GetTimeFilterParams()
+if  ret == 0:
+    print("The default TimeFilter switch is " + str(params.enable))
+else:
+    print("VZ_GetTimeFilterParams failed:"+ str(ret))   
+
+params.enable = not params.enable
+ret = camera.VZ_SetTimeFilterParams(params)
+if  ret == 0:
+    print("Set TimeFilter switch to "+ str(params.enable) + " is Ok")   
+else:
+    print("VZ_SetTimeFilterParams failed:"+ str(ret))   
+
+ret,params = camera.VZ_GetConfidenceFilterParams()
+if  ret == 0:
+    print("The default ConfidenceFilter switch is " + str(params.enable))
+else:
+    print("VZ_GetConfidenceFilterParams failed:"+ str(ret))   
+
+params.enable = not params.enable
+ret = camera.VZ_SetConfidenceFilterParams(params)
+if  ret == 0:
+    print("Set ConfidenceFilter switch to "+ str(params.enable) + " is Ok")   
+else:
+    print("VZ_SetConfidenceFilterParams failed:"+ str(ret))   
+
+ret,params = camera.VZ_GetFlyingPixelFilterParams()
+if  ret == 0:
+    print("The default FlyingPixelFilter switch is " + str(params.enable))
+else:
+    print("VZ_GetFlyingPixelFilterParams failed:"+ str(ret))   
+
+params.enable = not params.enable
+ret = camera.VZ_SetFlyingPixelFilterParams(params)
+if  ret == 0:
+    print("Set FlyingPixelFilter switch to "+ str(params.enable) + " is Ok")   
+else:
+    print("VZ_SetFlyingPixelFilterParams failed:"+ str(ret))   
+
+ret,enable = camera.VZ_GetFillHoleFilterEnabled()
+if  ret == 0:
+    print("The default FillHoleFilter switch is " + str(enable))
+else:
+    print("VZ_GetFillHoleFilterEnabled failed:"+ str(ret))   
+
+enable = not enable
+ret = camera.VZ_SetFillHoleFilterEnabled(enable)
+if  ret == 0:
+    print("Set FillHoleFilter switch to "+ str(enable) + " is Ok")   
+else:
+    print("VZ_SetFillHoleFilterEnabled failed:"+ str(ret))   
+
+ret,enable = camera.VZ_GetSpatialFilterEnabled()
+if  ret == 0:
+    print("The default SpatialFilter switch is " + str(enable))
+else:
+    print("VZ_GetSpatialFilterEnabled failed:"+ str(ret))   
+
+enable = not enable
+ret = camera.VZ_SetSpatialFilterEnabled(enable)
+if  ret == 0:
+    print("Set SpatialFilter switch to "+ str(enable) + " is Ok")   
+else:
+    print("VZ_SetSpatialFilterEnabled failed:"+ str(ret))   
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+    
+print('Test end, please reboot camera to restore the default settings')  

+ 108 - 0
Tof3DCamera/Samples/DS77C/TransformColorImgToDepthSensorFrame/TransformColorImgToDepthSensorFrame.py

@@ -0,0 +1,108 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+ 
+# set Mapper
+ret = camera.VZ_SetTransformColorImgToDepthSensorEnabled(c_bool(True))
+
+if  ret == 0:
+    print("VZ_SetTransformColorImgToDepthSensorEnabled ok")
+else:
+    print("VZ_SetTransformColorImgToDepthSensorEnabled failed:",ret)     
+
+while 1:
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+
+    if  frameready.transformedColor:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzTransformColorImgToDepthSensorFrame)
+        if  ret == 0:
+            curPath = os.getcwd()
+            print (curPath)
+            folder = curPath+ "/save"
+            if not os.path.exists(folder):
+                print("not exists")
+                os.makedirs(folder)
+            else:
+                print("already exists")
+            filename = folder + "/transformedColor.bin"
+            file = open(filename,"wb+")
+            for i in range(frame.dataLen):
+                file.write(c_uint8(frame.pFrameData[i]))
+                
+            print("save ok")
+            break
+        else:   
+            print("mappeddepth  error:",ret)  
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 108 - 0
Tof3DCamera/Samples/DS77C/TransformDepthImgToColorSensorFrame/TransformDepthImgToColorSensorFrame.py

@@ -0,0 +1,108 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+# set Mapper
+ret = camera.VZ_SetTransformDepthImgToColorSensorEnabled(c_bool(True))
+
+if  ret == 0:
+    print("VZ_SetTransformDepthImgToColorSensorEnabled ok")
+else:
+    print("VZ_SetTransformDepthImgToColorSensorEnabled failed:",ret)     
+
+while 1:
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue 
+          
+    if  frameready.transformedDepth:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzTransformDepthImgToColorSensorFrame)
+        if  ret == 0:
+            curPath = os.getcwd()
+            print (curPath)
+            folder = curPath+ "/save"
+            if not os.path.exists(folder):
+                print("not exists")
+                os.makedirs(folder)
+            else:
+                print("already exists")
+            filename = folder + "/transformedDepth.bin"
+            file = open(filename,"wb+")
+            for i in range(frame.dataLen):
+                file.write(c_uint8(frame.pFrameData[i]))
+              
+            file.close()
+            print("save ok")
+            break
+        else:   
+            print("mappedrgb  error:",ret)  
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 107 - 0
Tof3DCamera/Samples/DS86/DevHotPlugCallback/DevHotPlugCallback.py

@@ -0,0 +1,107 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+def HotPlugStateCallback(type_struct,  state = c_int32(0)):
+    global camera
+    if state ==0:
+        print(str(type_struct.contents.alias) + "   add")
+        ret = camera.VZ_OpenDeviceByUri(type_struct.contents.uri)
+        if  ret == 0:
+            print(str(type_struct.contents.alias) + " open success")
+        else:
+            print(str(type_struct.contents.alias) + " open failed",ret)
+        ret = camera.VZ_StartStream()
+        if  ret == 0:
+            print(str(type_struct.contents.alias) + " startstream success")
+        else:
+            print(str(type_struct.contents.alias) + " startstream failed",ret)
+    else:
+        print(str(type_struct.contents.alias) + "   remove")
+        ret = camera.VZ_StopStream()
+        if  ret == 0:
+            print(str(type_struct.contents.alias) + " stopstream success")
+        else:
+            print(str(type_struct.contents.alias) + " stopstream failed",ret)
+        ret = camera.VZ_CloseDevice()
+        if  ret == 0:
+            print(str(type_struct.contents.alias) + " close success")
+        else:
+            print(str(type_struct.contents.alias) + " close failed",ret)
+
+camera.VZ_SetHotPlugStatusCallback(HotPlugStateCallback)
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+print("uri: "+str(device_info.uri))
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+
+if  ret == 0 or ret == -103:
+    ret = camera.VZ_StartStream()
+    if  ret == 0:
+        print("startstream success")
+    else:
+        print("startstream failed",ret)
+
+    while 1:
+        ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+        if  ret !=0:
+            print("VZ_GetFrameReady failed:",ret)
+            continue
+  
+        if  frameready.depth:      
+            ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+            if  ret ==0:
+                print("frameIndex: ",frame.frameIndex)
+            else:
+                print("get depth frame failed ",ret)
+            continue
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))  
+
+ret = camera.VZ_StopStream()
+if  ret == 0:
+    print("stopstream success")
+else:
+    print("stopstream failed",ret)
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+                       

+ 61 - 0
Tof3DCamera/Samples/DS86/DeviceConnectByAlias/DeviceConnectByAlias.py

@@ -0,0 +1,61 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByAlias(device_info.alias)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+ 
+ret = camera.VZ_CloseDevice()  
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 62 - 0
Tof3DCamera/Samples/DS86/DeviceConnectByIP/DeviceConnectByIP.py

@@ -0,0 +1,62 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByIP with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("ip: "+str(device_info.ip))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByIP(device_info.ip)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByIP failed: ' + str(ret))   
+ 
+ret = camera.VZ_CloseDevice()  
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 94 - 0
Tof3DCamera/Samples/DS86/DeviceHWTriggerMode/DeviceHWTriggerMode.py

@@ -0,0 +1,94 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)   
+
+ret = camera.VZ_SetWorkMode(VzWorkMode.HardwareTriggerMode)
+if  ret != 0:  
+    print("VZ_SetWorkMode failed:",ret)
+
+for i in range(300000):
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000)) 
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    
+    if  frameready.depth:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+        if  ret == 0:
+            print("depth  id:",frame.frameIndex)  
+        else:   
+            print("depth  error:",ret)   
+
+ret = camera.VZ_SetWorkMode(VzWorkMode.ActiveMode)
+if  ret != 0:  
+    print("VZ_SetWorkMode failed:",ret)
+    
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 73 - 0
Tof3DCamera/Samples/DS86/DeviceInfoGet/DeviceInfoGet.py

@@ -0,0 +1,73 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print('cam productName:' + str(device_info.productName))
+    print('cam uri:' + str(device_info.uri))
+    print('cam alias:' + str(device_info.alias))
+    print('cam serialNumber:' + str(device_info.serialNumber))
+    print('cam ip:' + str(device_info.ip))
+    print('cam status:' + str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+ 
+ 
+# get FW
+ret, fw = camera.VZ_GetFirmwareVersion()
+if  ret == 0:
+    print("VZ_GetFirmwareVersion :",str(fw))
+else:
+    print("VZ_GetFirmwareVersion failed:",ret)
+
+ 
+ret = camera.VZ_CloseDevice()
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 98 - 0
Tof3DCamera/Samples/DS86/DeviceParamSetGet/DeviceParamSetGet.py

@@ -0,0 +1,98 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+
+ret, params = camera.VZ_GetSensorIntrinsicParameters(VzSensorType.VzToFSensor)
+if  ret == 0:
+    print("VZ_GetSensorIntrinsicParameters VzToFSensor :",
+    params.fx,
+    params.fy,
+    params.cx,
+    params.cy, 
+    params.k1,
+    params.k2,
+    params.p1,
+    params.p2,
+    params.k3,
+    params.k4,
+    params.k5,
+    params.k6)
+else:
+    print("VZ_GetSensorIntrinsicParameters VzToFSensor failed:",ret)
+
+ret, gmmgain = camera.VZ_GetIRGMMGain()
+if  ret == 0:
+    print("VZ_GetIRGMMGain :",gmmgain)
+else:
+    print("VZ_GetIRGMMGain failed:",ret)
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 102 - 0
Tof3DCamera/Samples/DS86/DeviceSWTriggerMode/DeviceSWTriggerMode.py

@@ -0,0 +1,102 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)   
+
+ret = camera.VZ_SetWorkMode(VzWorkMode.SoftwareTriggerMode)
+if  ret != 0:  
+    print("VZ_SetWorkMode failed:",ret)
+
+frameRate = camera.VZ_GetFrameRate()
+print("VZ_GetFrameRate :",frameRate[1])
+
+for i in range(30):
+
+    ret = camera.VZ_SetSoftwareSlaveTrigger()
+    if  ret != 0:  
+        print("VZ_SetSoftwareSlaveTrigger failed:",ret)
+
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000)) 
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    if  frameready.depth:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+        if  ret == 0:
+            print("depth  id:",frame.frameIndex)  
+        else:   
+            print("depth  error:",ret)   
+    time.sleep(1/frameRate[1])
+
+ret = camera.VZ_SetWorkMode(VzWorkMode.ActiveMode)
+if  ret != 0:  
+    print("VZ_SetWorkMode failed:",ret)
+    
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 66 - 0
Tof3DCamera/Samples/DS86/DeviceSearchAndConnect/DeviceSearchAndConnect.py

@@ -0,0 +1,66 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam productName:' + str(device_info.productName))
+        print('cam uri:' + str(device_info.uri))
+        print('cam alias:' + str(device_info.alias))
+        print('cam serialNumber:' + str(device_info.serialNumber))
+        print('cam ip:' + str(device_info.ip))
+        print('cam status:' + str(device_info.status))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+            
+ret = camera.VZ_CloseDevice()   
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 68 - 0
Tof3DCamera/Samples/DS86/DeviceSetParamsByJson/DeviceSetParamsByJson.py

@@ -0,0 +1,68 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByAlias(device_info.alias)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+     
+imgpath = input('Please input Json file path:')
+ret = camera.VZ_SetParamsByJson(imgpath)
+if  ret == 0:
+    print("SetParamsByJson successful")
+else:
+    print('VZ_SetParamsByJson failed: ' + str(ret))
+ 
+ret = camera.VZ_CloseDevice()  
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 73 - 0
Tof3DCamera/Samples/DS86/DeviceStartStopSteaming/DeviceStartStopSteaming.py

@@ -0,0 +1,73 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 99 - 0
Tof3DCamera/Samples/DS86/FrameCaptureAndSave/FrameCaptureAndSave.py

@@ -0,0 +1,99 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+while 1:
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    
+    if  frameready.depth:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+
+        curPath = os.getcwd()
+        print (curPath)
+        folder = curPath+ "/save"
+        if not os.path.exists(folder):
+            print("not exists")
+            os.makedirs(folder)
+        else:
+            print("already exists")
+        filename = folder + "/depth.bin"
+        file = open(filename,"wb+")
+        for i in range(frame.dataLen):
+            file.write(c_uint8(frame.pFrameData[i]))
+        
+        file.close()
+        print("save ok")
+        break
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 109 - 0
Tof3DCamera/Samples/DS86/FrameViewer/FrameViewer.py

@@ -0,0 +1,109 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import cv2
+import time
+
+camera = VzenseTofCam()
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' , ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:', ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+print("uri: "+str(device_info.uri))
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+
+if  ret == 0:
+
+    ret = camera.VZ_StartStream()
+    if  ret == 0:
+        print("start stream successful")
+    else:
+        print("VZ_StartStream failed:",ret)
+
+ 
+    colorSlope = c_uint16(7495)
+    try:
+        while 1:
+
+            ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+            if  ret !=0:
+                print("VZ_GetFrameReady failed:",ret)
+                continue
+            
+            if  frameready.depth:      
+                ret,depthframe = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+                if  ret == 0:
+                    frametmp = numpy.ctypeslib.as_array(depthframe.pFrameData, (1, depthframe.width * depthframe.height * 2))
+                    frametmp.dtype = numpy.uint16
+                    frametmp.shape = (depthframe.height, depthframe.width)
+
+                    #convert ushort value to 0xff is just for display
+                    img = numpy.int32(frametmp)
+                    img = img*255/colorSlope
+                    img = numpy.clip(img, 0, 255)
+                    img = numpy.uint8(img)
+                    frametmp = cv2.applyColorMap(img, cv2.COLORMAP_RAINBOW)
+ 
+                    cv2.imshow("Depth Image", frametmp)
+                else:
+                    print("get depth frame failed:",ret)
+            if  frameready.ir:
+                ret,irframe = camera.VZ_GetFrame(VzFrameType.VzIRFrame)
+                if  ret == 0:
+                    frametmp = numpy.ctypeslib.as_array(irframe.pFrameData, (1, irframe.dataLen))
+                    frametmp.dtype = numpy.uint8
+                    frametmp.shape = (irframe.height, irframe.width)
+                    
+                    cv2.imshow("IR Image", frametmp)
+                else:
+                    print("get ir frame failed:",ret)
+            if  frameready.color:      
+                ret,rgbframe = camera.VZ_GetFrame(VzFrameType.VzColorFrame)
+                if  ret == 0:
+                    frametmp = numpy.ctypeslib.as_array(rgbframe.pFrameData, (1, rgbframe.width * rgbframe.height * 3))
+                    frametmp.dtype = numpy.uint8
+                    frametmp.shape = (rgbframe.height, rgbframe.width,3)
+                    cv2.imshow("RGB Image", frametmp)
+                else:
+                    print("---end---")
+            key = cv2.waitKey(1)
+            if  key == 27:
+                cv2.destroyAllWindows()
+                print("---end---")
+                break;
+                   
+    except Exception as e :
+        print(e)
+    finally :
+        print('end')
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))

+ 85 - 0
Tof3DCamera/Samples/DS86/MultiConnection/MultiConnection.py

@@ -0,0 +1,85 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count < 2 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+
+if camera_count < 2: 
+    print("there are no camera or only one camera")
+    exit()
+
+print("cam count :",camera_count)
+cameras = []
+
+ret, device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+if ret==0:
+    for i in range(camera_count): 
+        print('cam uri:  ' + str(device_infolist[i].uri))
+        cam = VzenseTofCam()
+        ret = cam.VZ_OpenDeviceByUri(device_infolist[i].uri)
+        if  ret == 0:
+            print(device_infolist[i].alias,"open successful")
+            cameras.append(cam)
+        else:
+            print(device_infolist[i].alias,'VZ_OpenDeviceByUri failed: ' + str(ret))    
+else:
+    print(' failed:' + ret)  
+    exit()  
+
+for i in range(camera_count): 
+    ret = cameras[i].VZ_StartStream()       
+    if  ret == 0:
+        print(device_infolist[i].alias,"start stream successful")
+    else:
+        print(device_infolist[i].alias,'VZ_StartStream failed: ' + str(ret))  
+
+# show image 
+
+while 1:
+    for i in range(camera_count): 
+        ret, frameready = cameras[i].VZ_GetFrameReady(c_uint16(1000))   
+        if  ret !=0:
+            print("VZ_GetFrameReady failed:",ret)
+            continue
+                        
+        if  frameready.depth:      
+            ret,depthframe = cameras[i].VZ_GetFrame(VzFrameType.VzDepthFrame)
+            if  ret == 0:
+                print(device_infolist[i].alias,"  depth frameindex: ",depthframe.frameIndex)
+            else:
+                print("VZ_GetFrame error", ret)
+        if  frameready.ir:
+            ret,irframe = cameras[i].VZ_GetFrame(VzFrameType.VzIRFrame)
+            if  ret == 0:
+                print(device_infolist[i].alias,"  ir frameindex: ",irframe.frameIndex)
+            else:
+                print("VZ_GetFrame error", ret)
+
+for i in range(camera_count): 
+    
+    ret = cameras[i].VZ_StopStream()       
+    if  ret == 0:
+        print("stop stream successful")
+    else:
+        print('VZ_StopStream failed: ' + str(ret))  
+
+    ret = cameras[i].VZ_CloseDevice()       
+    if  ret == 0:
+        print("close device successful")
+    else:
+        print('VZ_CloseDevice failed: ' + str(ret))  
+    
+           

+ 107 - 0
Tof3DCamera/Samples/DS86/PointCloudCaptureAndSave/PointCloudCaptureAndSave.py

@@ -0,0 +1,107 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+ 
+while 1:
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    
+    if  frameready.depth:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzDepthFrame)
+        if  ret == 0:
+            ret, pointlist = camera.VZ_ConvertDepthFrameToPointCloudVector(frame)
+            if  ret == 0:
+                curPath = os.getcwd()
+                print (curPath)
+                folder = curPath+ "/save"
+                if not os.path.exists(folder):
+                    print("not exists")
+                    os.makedirs(folder)
+                else:
+                    print("already exists")
+
+                filename = folder + "/point.txt"
+                file = open(filename,"w")
+
+                for i in range(frame.width*frame.height):
+                    if pointlist[i].z!=0 and pointlist[i].z!=65535:
+                        file.write("{0},{1},{2}\n".format(pointlist[i].x,pointlist[i].y,pointlist[i].z))
+
+                file.close()
+                print("save ok")
+            else:
+                print("VZ_ConvertDepthFrameToWorldVector failed:",ret)     
+        break
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 168 - 0
Tof3DCamera/Samples/DS86/RGBExposureTimeSetGet/RGBExposureTimeSetGet.py

@@ -0,0 +1,168 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:"+ str(ret))
+
+'''Get default frame rate'''
+ret, rate = camera.VZ_GetFrameRate()
+if ret != 0:
+    print("VZ_GetFrameRate failed status:"+ str(ret))
+    exit()
+
+'''if need change the framerate, do first'''
+print("---- To  VzExposureControlMode_Manual ----")
+'''switch exposure mode to manual'''
+ret = camera.VZ_SetExposureControlMode(VzSensorType.VzColorSensor,VzExposureControlMode.VzExposureControlMode_Manual)
+
+if ret != 0:
+    print("VZ_SetExposureControlMode failed status:" + str(ret))
+    exit()
+else:
+    print("VZ_SetExposureControlMode  ok")
+
+print("* step1. Get Color exposure time range with frameRate " + str(rate) + "*")
+
+'''Get the range of the Color exposure time'''
+ret, exposureTime = camera.VZ_GetManualMaxExposureTime()
+if ret != 0:
+    print("VZ_GetProperty get Py_RGBExposureTimeMax failed status:" + str(ret))
+    exit()
+
+print("Recommended scope: 100 - " + str(exposureTime))
+
+print("* step2. Set and Get new ExposureTime *" )
+'''Set new ExposureTime '''
+ret = camera.VZ_SetExposureTime(VzSensorType.VzColorSensor, 3000)
+if ret != 0:
+    print("VZ_SetExposureTime failed status:" + str(ret))
+    exit()
+else:
+    print("SetExposureTime:3000")
+
+
+ret, params = camera.VZ_GetExposureTime(VzSensorType.VzColorSensor);
+if ret != 0:
+    print("VZ_GetExposureTime failed status:" + str(ret))
+    exit()
+else:
+     print("GetExposureTime:" + str(params.exposureTime))
+print("* Set and Get ColorGain *")
+'''set new ColorGain'''
+gain = c_float(3.5)
+ret = camera.VZ_SetColorGain(gain)
+if  ret == 0:
+    print("SetColorGain:" + str(gain.value))
+else:
+    print("VZ_SetColorGain failed status:"+ str(ret))
+    exit()
+
+ret,resut = camera.VZ_GetColorGain()
+if  ret == 0:
+    print("GetColorGain:" + str(resut[0]))
+else:
+    print("VZ_GetColorGain failed status:"+ str(ret))
+    exit()
+
+print("---- To VzExposureControlMode_Auto ----")
+'''switch exposure mode to auto'''
+ret = camera.VZ_SetExposureControlMode(VzSensorType.VzColorSensor, VzExposureControlMode.VzExposureControlMode_Auto)
+if 0 != ret:
+    print("VZ_SetExposureControlMode failed status:" + str(ret))
+    exit()
+else:
+    print("VZ_SetExposureControlMode ok")
+
+print("* step1. Get Color exposure time range *")
+'''Get the range of the Auto Color exposure time'''
+ret , exposureTime = camera.VZ_GetAutoMaxExposureTime()
+if 0 != ret:
+    print("VZ_GetProperty get Py_RGBExposureTimeMax failed status:" + str(ret))
+    exit()
+print("Recommended scope: 100 - " + str(exposureTime))
+
+print("* step2. Set and Get new Auto Max Color exposure time range *" )
+'''set new range of Auto Color exposure time.[100 maxExposureTime.exposureTime]'''
+ret = camera.VZ_SetAutoExposureTime(VzSensorType.VzColorSensor, 10000)
+if 0 != ret:
+    print("VZ_SetExposureTimeAutoMax failed status:" + str(ret))
+    exit()
+else:
+    print("SetExposureTimeAutoMax:10000")
+
+'''Get the new range of the Auto Color exposure time. '''
+ret, params = camera.VZ_GetAutoExposureTime(VzSensorType.VzColorSensor);
+if 0 != ret:
+    print("VZ_GetExposureTimeAutoMax failed status:" + str(ret))
+    exit()
+else:
+    print("GetExposureTimeAutoMax:" + str(params.exposureTime))
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+
+print('Test end, please reboot camera to restore the default settings')  

+ 117 - 0
Tof3DCamera/Samples/DS86/RGBResolutionChange/RGBResolutionChange.py

@@ -0,0 +1,117 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+
+ret = camera.VZ_SetColorResolution(640, 480)
+time.sleep(2)
+if  ret != 0:  
+    print("VZ_SetColorResolution failed:",ret)
+ 
+for i in range(30):
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    
+    if  frameready.color:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzColorFrame)
+        if  ret == 0:
+            if frame.width == 640 and frame.height == 480:
+                print("rgb  id:",frame.frameIndex)
+            else:
+                print("rgb width ",frame.width,"  height ",frame.height)      
+        else:   
+            print("rgb  error:",ret)
+
+ret = camera.VZ_SetColorResolution(1600, 1200)
+time.sleep(2)
+if  ret != 0:  
+    print("VZ_SetColorResolution failed:",ret)
+ 
+for i in range(30):
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+    
+    if  frameready.color:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzColorFrame)
+        if  ret == 0:
+            if frame.width == 1600 and frame.height == 1200:
+                print("rgb  id:",frame.frameIndex)
+            else:
+                print("rgb width ",frame.width,"  height ",frame.height)      
+        else:   
+            print("rgb  error:",ret)
+
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 116 - 0
Tof3DCamera/Samples/DS86/ToFExposureTimeSetGet/ToFExposureTimeSetGet.py

@@ -0,0 +1,116 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:"+ str(ret))   
+
+ret = camera.VZ_SetExposureControlMode()
+if  ret == 0:
+    print("set tofsensor to manual mode successful")
+else:
+    print("VZ_SetExposureControlMode failed:"+ str(ret))   
+
+ret,frameRate = camera.VZ_GetFrameRate()
+if  ret == 0:
+    print("Get default frame rate:"+ str(frameRate))   
+else:
+    print("VZ_GetFrameRate failed:"+ str(ret))   
+
+ret,MaxExposureTime = camera.VZ_GetManaulMaxExposureTime()
+if  ret == 0:
+    print("Recommended scope: 58 - "+ str(MaxExposureTime))   
+else:
+    print("VZ_GetManaulMaxExposureTime failed:"+ str(ret))   
+
+ret = camera.VZ_SetExposureTime(VzSensorType.VzToFSensor,400)
+if  ret == 0:
+    print("Set exposure time 400 is ok")   
+else:
+    print("VZ_SetExposureTime failed:"+ str(ret))   
+
+ret = camera.VZ_SetFrameRate(5)
+if  ret == 0:
+    print("Set frame rate 5 is ok")   
+else:
+    print("VZ_SetFrameRate failed:"+ str(ret))   
+
+ret,MaxExposureTime = camera.VZ_GetManaulMaxExposureTime()
+if  ret == 0:
+    print("Recommended scope: 58 - "+ str(MaxExposureTime))   
+else:
+    print("VZ_GetManaulMaxExposureTime failed:"+ str(ret))   
+
+ret = camera.VZ_SetExposureTime(VzSensorType.VzToFSensor,500)
+if  ret == 0:
+    print("Set exposure time 500 is ok")   
+else:
+    print("VZ_SetExposureTime failed:"+ str(ret))   
+	
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+
+print('Test end, please reboot camera to restore the default settings')  

+ 139 - 0
Tof3DCamera/Samples/DS86/ToFFiltersSetGet/ToFFiltersSetGet.py

@@ -0,0 +1,139 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:"+ str(ret))   
+ 
+ret,params = camera.VZ_GetTimeFilterParams()
+if  ret == 0:
+    print("The default TimeFilter switch is " + str(params.enable))
+else:
+    print("VZ_GetTimeFilterParams failed:"+ str(ret))   
+
+params.enable = not params.enable
+ret = camera.VZ_SetTimeFilterParams(params)
+if  ret == 0:
+    print("Set TimeFilter switch to "+ str(params.enable) + " is Ok")   
+else:
+    print("VZ_SetTimeFilterParams failed:"+ str(ret))   
+
+ret,params = camera.VZ_GetConfidenceFilterParams()
+if  ret == 0:
+    print("The default ConfidenceFilter switch is " + str(params.enable))
+else:
+    print("VZ_GetConfidenceFilterParams failed:"+ str(ret))   
+
+params.enable = not params.enable
+ret = camera.VZ_SetConfidenceFilterParams(params)
+if  ret == 0:
+    print("Set ConfidenceFilter switch to "+ str(params.enable) + " is Ok")   
+else:
+    print("VZ_SetConfidenceFilterParams failed:"+ str(ret))   
+
+ret,params = camera.VZ_GetFlyingPixelFilterParams()
+if  ret == 0:
+    print("The default FlyingPixelFilter switch is " + str(params.enable))
+else:
+    print("VZ_GetFlyingPixelFilterParams failed:"+ str(ret))   
+
+params.enable = not params.enable
+ret = camera.VZ_SetFlyingPixelFilterParams(params)
+if  ret == 0:
+    print("Set FlyingPixelFilter switch to "+ str(params.enable) + " is Ok")   
+else:
+    print("VZ_SetFlyingPixelFilterParams failed:"+ str(ret))   
+
+ret,enable = camera.VZ_GetFillHoleFilterEnabled()
+if  ret == 0:
+    print("The default FillHoleFilter switch is " + str(enable))
+else:
+    print("VZ_GetFillHoleFilterEnabled failed:"+ str(ret))   
+
+enable = not enable
+ret = camera.VZ_SetFillHoleFilterEnabled(enable)
+if  ret == 0:
+    print("Set FillHoleFilter switch to "+ str(enable) + " is Ok")   
+else:
+    print("VZ_SetFillHoleFilterEnabled failed:"+ str(ret))   
+
+ret,enable = camera.VZ_GetSpatialFilterEnabled()
+if  ret == 0:
+    print("The default SpatialFilter switch is " + str(enable))
+else:
+    print("VZ_GetSpatialFilterEnabled failed:"+ str(ret))   
+
+enable = not enable
+ret = camera.VZ_SetSpatialFilterEnabled(enable)
+if  ret == 0:
+    print("Set SpatialFilter switch to "+ str(enable) + " is Ok")   
+else:
+    print("VZ_SetSpatialFilterEnabled failed:"+ str(ret))   
+
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+    
+print('Test end, please reboot camera to restore the default settings')  

+ 108 - 0
Tof3DCamera/Samples/DS86/TransformColorImgToDepthSensorFrame/TransformColorImgToDepthSensorFrame.py

@@ -0,0 +1,108 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+ 
+# set Mapper
+ret = camera.VZ_SetTransformColorImgToDepthSensorEnabled(c_bool(True))
+
+if  ret == 0:
+    print("VZ_SetTransformColorImgToDepthSensorEnabled ok")
+else:
+    print("VZ_SetTransformColorImgToDepthSensorEnabled failed:",ret)     
+
+while 1:
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue       
+
+    if  frameready.transformedColor:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzTransformColorImgToDepthSensorFrame)
+        if  ret == 0:
+            curPath = os.getcwd()
+            print (curPath)
+            folder = curPath+ "/save"
+            if not os.path.exists(folder):
+                print("not exists")
+                os.makedirs(folder)
+            else:
+                print("already exists")
+            filename = folder + "/transformedColor.bin"
+            file = open(filename,"wb+")
+            for i in range(frame.dataLen):
+                file.write(c_uint8(frame.pFrameData[i]))
+                
+            print("save ok")
+            break
+        else:   
+            print("mappeddepth  error:",ret)  
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 108 - 0
Tof3DCamera/Samples/DS86/TransformDepthImgToColorSensorFrame/TransformDepthImgToColorSensorFrame.py

@@ -0,0 +1,108 @@
+from pickle import FALSE, TRUE
+import sys
+sys.path.append('../../../')
+
+from API.VzenseDS_api import *
+import time
+
+camera = VzenseTofCam()
+
+
+camera_count = camera.VZ_GetDeviceCount()
+retry_count = 100
+while camera_count==0 and retry_count > 0:
+    retry_count = retry_count-1
+    camera_count = camera.VZ_GetDeviceCount()
+    time.sleep(1)
+    print("scaning......   ",retry_count)
+
+device_info=VzDeviceInfo()
+
+if camera_count > 1:
+    ret,device_infolist=camera.VZ_GetDeviceInfoList(camera_count)
+    if ret==0:
+        device_info = device_infolist[0]
+        for info in device_infolist: 
+            print('cam uri:  ' + str(info.uri))
+    else:
+        print(' failed:' + ret)  
+        exit()  
+elif camera_count == 1:
+    ret,device_info=camera.VZ_GetDeviceInfo()
+    if ret==0:
+        print('cam uri:' + str(device_info.uri))
+    else:
+        print(' failed:' + ret)   
+        exit() 
+else: 
+    print("there are no camera found")
+    exit()
+
+if  VzConnectStatus.Connected.value != device_info.status:
+	print("connect statu:",device_info.status)  
+	print("Call VZ_OpenDeviceByUri with connect status :",VzConnectStatus.Connected.value)
+	exit()
+else:
+    print("uri: "+str(device_info.uri))
+    print("alias: "+str(device_info.alias))
+    print("connectStatus: "+str(device_info.status))
+
+ret = camera.VZ_OpenDeviceByUri(device_info.uri)
+if  ret == 0:
+    print("open device successful")
+else:
+    print('VZ_OpenDeviceByUri failed: ' + str(ret))   
+
+ret = camera.VZ_StartStream()
+if  ret == 0:
+    print("start stream successful")
+else:
+    print("VZ_StartStream failed:",ret)     
+
+# set Mapper
+ret = camera.VZ_SetTransformDepthImgToColorSensorEnabled(c_bool(True))
+
+if  ret == 0:
+    print("VZ_SetTransformDepthImgToColorSensorEnabled ok")
+else:
+    print("VZ_SetTransformDepthImgToColorSensorEnabled failed:",ret)     
+
+while 1:
+    ret, frameready = camera.VZ_GetFrameReady(c_uint16(1000))
+    if  ret !=0:
+        print("VZ_GetFrameReady failed:",ret)
+        continue 
+          
+    if  frameready.transformedDepth:      
+        ret,frame = camera.VZ_GetFrame(VzFrameType.VzTransformDepthImgToColorSensorFrame)
+        if  ret == 0:
+            curPath = os.getcwd()
+            print (curPath)
+            folder = curPath+ "/save"
+            if not os.path.exists(folder):
+                print("not exists")
+                os.makedirs(folder)
+            else:
+                print("already exists")
+            filename = folder + "/transformedDepth.bin"
+            file = open(filename,"wb+")
+            for i in range(frame.dataLen):
+                file.write(c_uint8(frame.pFrameData[i]))
+              
+            file.close()
+            print("save ok")
+            break
+        else:   
+            print("mappedrgb  error:",ret)  
+ret = camera.VZ_StopStream()       
+if  ret == 0:
+    print("stop stream successful")
+else:
+    print('VZ_StopStream failed: ' + str(ret))  
+
+ret = camera.VZ_CloseDevice()     
+if  ret == 0:
+    print("close device successful")
+else:
+    print('VZ_CloseDevice failed: ' + str(ret))   
+           

+ 539 - 0
Tof3DCamera/Ubuntu16.04/Include/VzenseNebula_api.h

@@ -0,0 +1,539 @@
+#ifndef VZENSEDS_API_H
+#define VZENSEDS_API_H
+
+/**
+* @file VzenseDS_api.h
+* @brief Vzense API header file.
+* Copyright (c) 2019-2022 Vzense Interactive, Inc.
+*/
+
+/*! \mainpage VzenseDS API Documentation
+*
+* \section intro_sec Introduction
+*
+* Welcome to the VzenseDS API documentation. This documentation enables you to quickly get started in your development efforts to programmatically interact with the Vzense CW ToF Camera (eg:DS77).
+*/
+
+#include "VzenseNebula_define.h"
+
+/**
+* @brief         Initializes the API on the device. This function must be invoked before any other Vzense APIs.
+* @return        ::VzRetOK if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_Initialize();
+
+/**
+* @brief         Shuts down the API on the device and clears all resources allocated by the API. After invoking this function, no other Vzense APIs can be invoked.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_Shutdown();
+
+/**
+* @brief         Gets the version of SDK.
+* @return        Returns sdk version
+*/
+VZENSE_C_API_EXPORT const char* VZ_GetSDKVersion();
+
+/**
+* @brief         Returns the number of camera devices currently connected.
+* @param[out]    pDeviceCount    Pointer to a 32-bit integer variable in which to return the device count.
+* @return        ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetDeviceCount(uint32_t* pDeviceCount);
+
+/**
+* @brief         Returns the info of the deviceIndex camera device.
+* @param[in]     deviceIndex    The index of the device to open. Device indices range from 0 to device count - 1.
+* @param[out]    pDevicesInfo       Pointer to a buffer in which to store the device info.
+* @return        ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetDeviceInfo(uint32_t deviceIndex, VzDeviceInfo* pDevicesInfo);
+
+/**
+* @brief         Returns the info lists of the deviceCount camera devices.
+* @param[in]     deviceCount         the number of camera devices.
+* @param[out]    pDevicesInfoList    Pointer to a buffer in which to store the devices list infos.
+* @return        ::VzRetOK           if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetDeviceInfoList(uint32_t deviceCount, VzDeviceInfo* pDevicesInfoList);
+
+/**
+* @brief         Opens the device specified by <code>sn</code>. The device must be subsequently closed using VZ_CloseDevice().
+* @param[in]     pURI         the uri of the device. See ::VzDeviceInfo for more information.
+* @param[out]    pDevice     the handle of the device on which to open.
+* @return:       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_OpenDeviceByUri(const char* pURI, VzDeviceHandle* pDevice);
+
+/**
+* @brief         Opens the device specified by <code>alias</code>. The device must be subsequently closed using VZ_CloseDevice().
+* @param[in]     pAlias       the alias of the device. See ::VzDeviceInfo for more information.
+* @param[out]    pDevice     the handle of the device on which to open.
+* @return:       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_OpenDeviceByAlias(const char* pAlias, VzDeviceHandle* pDevice);
+
+/**
+* @brief         Opens the device specified by <code>ip</code>. The device must be subsequently closed using VZ_CloseDevice().
+* @param[in]     pIP          the ip of the device. See ::VzDeviceInfo for more information.
+* @param[out]    pDevice     the handle of the device on which to open.
+* @return:       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_OpenDeviceByIP(const char* pIP, VzDeviceHandle* pDevice);
+
+/**
+* @brief         Closes the device specified by <code>device</code> that was opened using VZ_OpenDevice.
+* @param[in]     pDevice       The handle of the device to close.
+* @return:       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_CloseDevice(VzDeviceHandle* pDevice);
+
+/**
+* @brief         Starts capturing the image stream indicated by <code>device</code>. Invoke VZ_StopStream() to stop capturing the image stream.
+* @param[in]     device          The handle of the device on which to start capturing the image stream.                        
+* @return        ::VzRetOK if    the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_StartStream(VzDeviceHandle device);
+
+/**
+* @brief         Stops capturing the image stream on the device specified by <code>device</code>. that was started using VZ_StartStream.
+* @param[in]     device       The handle of the device on which to stop capturing the image stream.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_StopStream(VzDeviceHandle device);
+
+/**
+* @brief         Captures the next image frame from the device specified by <code>device</code>. This API must be invoked before capturing frame data using VZ_GetFrame().
+* @param[in]     device         The handle of the device on which to read the next frame.
+* @param[in]     waitTime       The unit is millisecond, the value is in the range (0,65535).
+*                               You can change the value according to the frame rate. For example,the frame rate is 30, so the theoretical waittime interval is 33ms, but if set the time value is 20ms,
+*                               it means the max wait time is 20 ms when capturing next frame, so when call the VZ_GetFrameReady, it may return VzRetGetFrameReadyTimeOut(-11).
+*                               So the recommended value is 2 * 1000/ FPS.
+* @param[out]    pFrameReady    Pointer to a buffer in which to store the signal on which image is ready to be get.
+* @return        ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFrameReady(VzDeviceHandle device, uint16_t waitTime, VzFrameReady* pFrameReady);
+
+/**
+* @brief         Returns the image data for the current frame from the device specified by <code>device</code>. Before invoking this API, invoke VZ_GetFrameReady() to capture one image frame from the device.
+* @param[in]     device       The handle of the device to capture an image frame from.
+* @param[in]     frameType    The image frame type.
+* @param[out]    pVzFrame     Pointer to a buffer in which to store the returned image data.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFrame(VzDeviceHandle device, VzFrameType frameType, VzFrame* pVzFrame);
+
+/**
+* @brief        Set the working mode of the camera.
+* @param[in]    device      The handle of the device
+* @param[in]    mode        The work mode of camera. For ActiveMode, set the Time filter default true, for SlaveMode, set the Time filter default false.
+* @return       ::VzRetOK   if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetWorkMode(VzDeviceHandle device, VzWorkMode mode);
+
+/**
+* @brief        Get the working mode of the camera.
+* @param[in]    device      The handle of the device
+* @param[in]    pMode       The work mode of camera.
+* @return       ::VzRetOK   if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetWorkMode(VzDeviceHandle device, VzWorkMode* pMode);
+
+/**
+* @brief        Triggering a frame of image is only useful if the camera is in SoftwareTriggerMode
+* @param[in]    device      The handle of the device.
+* @return       ::VzRetOK   if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetSoftwareSlaveTrigger(VzDeviceHandle device);
+
+/**
+* @brief         Returns the internal intrinsic and distortion coefficient parameters from the device specified by <code>device</code>.
+* @param[in]     device                        The handle of the device from which to get the internal parameters. 
+* @param[in]     sensorType                    The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[out]    pSensorIntrinsicParameters    Pointer to a VzSensorIntrinsicParameters variable in which to store the parameter values.
+* @return        ::VzRetOK                     if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetSensorIntrinsicParameters(VzDeviceHandle device, VzSensorType sensorType, VzSensorIntrinsicParameters* pSensorIntrinsicParameters);
+
+/**
+* @brief         Returns the camera rotation and translation coefficient parameters from the device specified by <code>device</code>.
+* @param[in]     device                        The handle of the device from which to get the extrinsic parameters. 
+* @param[out]    pSensorExtrinsicParameters    Pointer to a ::VzSensorExtrinsicParameters variable in which to store the parameters.
+* @return        ::VzRetOK                     if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetSensorExtrinsicParameters(VzDeviceHandle device, VzSensorExtrinsicParameters* pSensorExtrinsicParameters);
+
+/**
+* @brief         Gets the firmware version number.
+* @param[in]     device              The handle of the device on which to set the pulse count.
+* @param[in]     pFirmwareVersion    Pointer to a variable in which to store the returned fw value.
+* @param[in]     length              The maximum length is 64 bytes.
+* @return        ::VzRetOK          if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFirmwareVersion(VzDeviceHandle device, char* pFirmwareVersion, int length);
+
+/**
+* @brief         Gets the MAC from the device specified by <code>device</code>.
+* @param[in]     device         The handle of the device.
+* @param[out]    pMACAddress    Pointer to a buffer in which to store the device MAC address. the buffer default size is 18, and the last buffer set '\0'.
+* @return        ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetDeviceMACAddress(VzDeviceHandle device, char* pMACAddress);
+
+/**
+* @brief        Sets the device GMM gain on a device.
+* @param[in]    device       The handle of the device on which to set the GMM gain.
+* @param[in]    gmmgain      The GMM gain value to set. See ::VzGMMGain for more information.The GMM gain value is in the range [0,255].
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetIRGMMGain(VzDeviceHandle device, uint8_t gmmgain);
+
+/**
+* @brief        Returns the the device's GMM gain.
+* @param[in]    device       The handle of the device from which to get the GMM gain.
+* @param[out]   pGmmgain      Pointer to a variable in which to store the returned GMM gain.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetIRGMMGain(VzDeviceHandle device, uint8_t* pGmmgain);
+
+/**
+* @brief         Sets the color image pixel format on the device specified by <code>device</code>. Currently only RGB and BGR formats are supported.
+* @param[in]     device         The handle of the device to set the pixel format. 
+* @param[in]     pixelFormat    The color pixel format to use. Pass in one of the values defined by ::VzPixelFormat. Currently only <code>VzPixelFormatRGB888</code> and <code>VzPixelFormatBGR888</code> are supported.
+* @return        ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetColorPixelFormat(VzDeviceHandle device, VzPixelFormat pixelFormat);
+
+/**
+* @brief        Sets the color frame Resolution.
+* @param[in]    device       The handle of the device.
+* @param[in]    w            The width of color image
+* @param[in]    h            The height of color image
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetColorResolution(VzDeviceHandle device, int w, int h);
+
+/**
+* @brief        Returns the the color frame Resolution.
+* @param[in]    device         The handle of the device.
+* @param[out]    pW            The width of color image
+* @param[out]    pH            The height of color image
+* @return       ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetColorResolution(VzDeviceHandle device, int* pW, int* pH);
+
+/**
+* @brief        Gets a list of image resolutions supported by Sensor
+* @param[in]    type           The sensor type
+* @param[out]    pList         List of supported resolutions
+* @return       ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VzGetSupportedResolutionList(VzDeviceHandle device, VzSensorType type, VzResolutionList* pList);
+
+/**
+* @brief         Sets the ToF frame rate.The interface takes a long time, about 500 ms.
+* @param[in]     device       The handle of the device on which to set the framerate.
+* @param[in]     value        The rate value, in range [1,25].
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetFrameRate(VzDeviceHandle device, int value);
+/**
+* @brief         Gets the ToF frame rate.
+* @param[in]     device       The handle of the device on which to get the framerate.
+* @param[in]     pValue       The rate value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFrameRate(VzDeviceHandle device, int* pValue);
+
+/**
+* @brief        Set the exposure mode of sensor.
+* @param[in]    device          The handle of the device on which to set the exposure control mode.
+* @param[in]    sensorType      The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[in]    exposureType    the exposure control mode.
+* @return       ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetExposureControlMode(VzDeviceHandle device, VzSensorType sensorType, VzExposureControlMode controlMode);
+
+/**
+* @brief         Get the exposure mode of sensor.
+* @param[in]     device           The handle of the device on which to get the exposure control mode.
+* @param[in]     sensorType       The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[out]    pControlMode     the exposure control mode.
+* @return        ::VzRetOK        if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetExposureControlMode(VzDeviceHandle device, VzSensorType sensorType, VzExposureControlMode* pControlMode);
+
+/**
+* @brief        Set the exposure time of sensor.
+* @param[in]    device          The handle of the device on which to set the exposure time  in microseconds.
+* @param[in]    sensorType      The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[in]    exposureTime    the exposure time.
+* @return       ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetExposureTime(VzDeviceHandle device, VzSensorType sensorType, VzExposureTimeParams exposureTime);
+
+/**
+* @brief         Get the exposure time of sensor.
+* @param[in]     device           The handle of the device on which to get the exposure time in microseconds.
+* @param[in]     sensorType       The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[out]    pExposureTime    the exposure time.
+* @return        ::VzRetOK        if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetExposureTime(VzDeviceHandle device, VzSensorType sensorType, VzExposureTimeParams* pExposureTime);
+
+/**
+* @brief        Set the parameters of the Time filter.
+* @param[in]    device       The handle of the device
+* @param[in]    params       Pointer to a variable in which to store the parameters.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/ 
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetTimeFilterParams(VzDeviceHandle device, VzTimeFilterParams params);
+
+/**
+* @brief         Get the parameters of the Time Filter feature.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetTimeFilterParams(VzDeviceHandle device, VzTimeFilterParams *pParams);
+
+/**
+* @brief         Set the parameters of the Confidence filter.
+* @param[in]     device       The handle of the device
+* @param[out]    params       Pointer to a variable in which to store the parameters.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetConfidenceFilterParams(VzDeviceHandle device, VzConfidenceFilterParams params);
+
+/**
+* @brief         Get the parameters of the ConfidenceFilter feature.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetConfidenceFilterParams(VzDeviceHandle device, VzConfidenceFilterParams *pParams);
+
+/**
+* @brief        Set the parameters of the FlyingPixel filter.
+* @param[in]    device       The handle of the device.
+* @param[out]   params       Pointer to a variable in which to store the parameters.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetFlyingPixelFilterParams(VzDeviceHandle device, const VzFlyingPixelFilterParams params);
+
+/**
+* @brief         Get the parameters of the Confidence filter.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFlyingPixelFilterParams(VzDeviceHandle device, VzFlyingPixelFilterParams* params);
+
+/**
+* @brief        Enables or disables the FillHole filter
+* @param[in]    device       The handle of the device.
+* @param[in]    bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetFillHoleFilterEnabled(VzDeviceHandle device, bool bEnabled);
+
+/**
+* @brief         Returns the Boolean value of whether the FillHole Filter feature is enabled or disabled.
+* @param[in]     device       The handle of the device
+* @param[out]    pEnabled     Pointer to a variable in which to store the returned Boolean value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFillHoleFilterEnabled(VzDeviceHandle device, bool *pEnabled);
+
+/**
+* @brief        Enables or disables the Spatial filter
+* @param[in]    device       The handle of the device.
+* @param[in]    bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetSpatialFilterEnabled(VzDeviceHandle device, bool bEnabled);
+
+/**
+* @brief         Returns the Boolean value of whether the Spatial Filter feature is enabled or disabled.
+* @param[in]     device       The handle of the device
+* @param[out]    pEnabled     Pointer to a variable in which to store the returned Boolean value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetSpatialFilterEnabled(VzDeviceHandle device, bool *pEnabled);
+
+/**
+* @brief         Enables or disables transforms a color image into the geometry of the depth sensor. When enabled, VZ_GetFrame() can\n
+*                be invoked passing ::VzTransformedColorFrame as the frame type for get a color image which each pixel matches the \n
+*                corresponding pixel coordinates of the depth sensor. The resolution of the transformed color frame is the same as that\n
+*                of the depth image.
+* @param[in]     device       The handle of the device on which to enable or disable mapping.
+* @param[in]     bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetTransformColorImgToDepthSensorEnabled(VzDeviceHandle device, bool bEnabled);
+
+/**
+* @brief         Returns the Boolean value of whether the transformed of the color image to depth sensor space feature is enabled or disabled.
+* @param[in]     device       The handle of the device on which to enable or disable the feature.
+* @param[out]    bEnabled     Pointer to a variable in which to store the returned Boolean value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetTransformColorImgToDepthSensorEnabled(VzDeviceHandle device, bool *bEnabled);
+
+/**
+* @brief         Enables or disables transforms the depth map into the geometry of the color sensor. When enabled, VZ_GetFrame() can\n
+*                be invoked passing ::VzTransformedDepthFrame as the frame type for get a depth image which each pixel matches the \n
+*                corresponding pixel coordinates of the color sensor. The resolution of the transformed depth frame is the same as that\n
+*                of the color image.
+* @param[in]     device       The handle of the device on which to enable or disable mapping.
+* @param[in]     bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetTransformDepthImgToColorSensorEnabled(VzDeviceHandle device, bool bEnabled);
+
+/**
+* @brief         Returns the Boolean value of whether the transformed of the depth image to color space feature is enabled or disabled.
+* @param[in]     device       The handle of the device on which to enable or disable the feature.
+* @param[out]    bEnabled     Pointer to a variable in which to store the returned Boolean value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetTransformDepthImgToColorSensorEnabled(VzDeviceHandle device, bool *bEnabled);
+
+/**
+* @brief         Returns the point value of the frame that the mapping of the depth image to Color space.
+* @param[in]     device           The handle of the device on which to enable or disable the feature.
+* @param[in]     pointInDepth     The point in depth frame.
+* @param[in]     colorSize        The size(x = w,y = h) of color frame.
+* @param[out]    pPointInColor    The point in the color frame.
+* @return        ::VzRetOK        if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_TransformedDepthPointToColorPoint(const VzDeviceHandle device, const VzDepthVector3 depthPoint, const VzVector2u16 colorSize, VzVector2u16* pPointInColor);
+
+/**
+* @brief         Converts the input points from depth coordinate space to world coordinate space.
+* @param[in]     device          The handle of the device on which to perform the operation.
+* @param[in]     pDepthVector    Pointer to a buffer containing the x, y, and z values of the depth coordinates to be converted. \n
+*                                x and y are measured in pixels, where 0, 0 is located at the top left corner of the image. \n
+*                                z is measured in millimeters, based on the ::VzPixelFormat depth frame.
+* @param[out]    pWorldVector    Pointer to a buffer in which to output the converted x, y, and z values of the world coordinates, measured in millimeters.
+* @param[in]     pointCount      The number of points to convert.
+* @param[in]     pSensorParam    The intrinsic parameters for the depth sensor. See ::VzSensorIntrinsicParameters.
+* @return        ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_ConvertDepthToPointCloud(VzDeviceHandle device, VzDepthVector3* pDepthVector, VzVector3f* pWorldVector, int32_t pointCount, VzSensorIntrinsicParameters* pSensorParam);
+
+/**
+* @brief         Converts the input Depth frame from depth coordinate space to world coordinate space on the device. Currently supported depth image types are VzDepthFrame and VzTransformDepthImgToColorSensorFrame.
+* @param[in]     device          The handle of the device on which to perform the operation.
+* @param[in]     pDepthFrame      The depth frame.
+* @param[out]    pWorldVector    Pointer to a buffer in which to output the converted x, y, and z values of the world coordinates, measured in millimeters. The length of pWorldVector must is (VzFrame.width * VzFrame.height).
+* @return        ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_ConvertDepthFrameToPointCloudVector(VzDeviceHandle device, const VzFrame* pDepthFrame, VzVector3f* pWorldVector);
+/**
+* @brief        Sets hotplug status callback function
+* @param[in]    pCallback    Pointer to the callback function. See ::PtrHotPlugStatusCallback 
+* @param[in]    pUserData    Pointer to the user data. See ::PtrHotPlugStatusCallback
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetHotPlugStatusCallback(PtrHotPlugStatusCallback pCallback, const void* pUserData);
+
+/**
+* @brief        Reboot the camera.
+* @param[in]    device          The handle of the device
+* @return       ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_RebootDevie(VzDeviceHandle device);
+
+/**
+* @brief        Set the corresponding property value for the device
+* @param[in]    device          The handle of the device from which to set the property value.
+* @param[in]    propertyKey     The type of property to set on the device.
+* @param[in]    pData           Pointer to a buffer containing the property value.
+* @param[in]    dataSize        The size, in bytes, of the property value contained in pData
+* @return       ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetProperty(VzDeviceHandle device, const char* propertyKey, const void* pData, uint32_t dataSize);
+
+/**
+* @brief 		Returns a specific property value from the device
+* @param[in] 	device			The handle of the device from which to get the property value.
+* @param[in] 	propertyType	The type of property to get from the device
+* @param[out]	pData			Pointer to a buffer to store the returned property value.
+* @param[in]	dataSize		The size, in bytes, of the property value returned in pData
+* @return 		::VzRetOK		if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetProperty(VzDeviceHandle device, const char* propertyKey, void* pData, uint32_t dataSize);
+
+/**
+* @brief         Enables or disables the HDR Mode of the ToF sensor with VzExposureControlMode_Manual. Default enabled,  so if you want switch to the VzExposureControlMode_Auto, set HDR Mode disable firstly.
+* @param[in]     device       The handle of the device on which to enable or disable the feature.
+* @param[in]     bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetHDRModeEnabled(VzDeviceHandle device, bool bEnabled);
+/**
+* @brief         Returns the Boolean value of whether the HDRMode of ToF sensor feature is enabled or disabled.
+* @param[in]     device       The handle of the device on which to enable or disable the feature.
+* @param[in]     bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetHDRModeEnabled(VzDeviceHandle device, bool *bEnabled);
+
+/**
+* @brief         Set the input signal parameters for Hardware Trigger.
+* @param[in]     device       The handle of the device
+* @param[in]     params       Pointer to a variable in which to store the parameters.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetInputSignalParamsForHWTrigger(VzDeviceHandle device, VzInputSignalParamsForHWTrigger params);
+
+/**
+* @brief         Get the Input signal parameters for Hardware Trigger.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetInputSignalParamsForHWTrigger(VzDeviceHandle device, VzInputSignalParamsForHWTrigger *pParams);
+
+/**
+* @brief         Set the output signal parameters.
+* @param[in]     device       The handle of the device
+* @param[in]     params       Pointer to a variable in which to store the parameters.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetOutputSignalParams(VzDeviceHandle device, VzOutputSignalParams params);
+
+/**
+* @brief         Get the output signal parameters.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetOutputSignalParams(VzDeviceHandle device, VzOutputSignalParams *pParams);
+
+/**
+* @brief         Set the parameters by Json file that can be saved by NebulaGUITool.
+* @param[in]     device       The handle of the device.
+* @param[in]     pfilePath    Pointer to the path of Json file.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetParamsByJson(VzDeviceHandle device, char* pfilePath);
+
+/**
+* @brief         Set the color Gain with the exposure mode of RGB sensor in VzExposureControlMode_Manual.
+* @param[in]     device       The handle of the device.
+* @param[in]     params       The value of color Gain.Value range: [1.0 15.5]
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetColorGain(VzDeviceHandle device, float params);
+
+/**
+* @brief         Get the color Gain.
+* @param[in]     device       The handle of the device.
+* @param[out]    params       The value of color Gain.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetColorGain(VzDeviceHandle device, float *pParams);
+
+#endif /* VZENSEDS_API_H */

+ 28 - 0
Tof3DCamera/Ubuntu16.04/Include/VzenseNebula_define.h

@@ -0,0 +1,28 @@
+#ifndef VZENSEDS_DEFINE_H
+#define VZENSEDS_DEFINE_H
+
+#include "VzenseNebula_enums.h"
+#include "VzenseNebula_types.h"
+
+#ifdef PS_EXPORT_ON
+    #ifdef _WIN32
+        #define VZENSE_API_EXPORT __declspec(dllexport)
+    #else
+        #define VZENSE_API_EXPORT __attribute__((visibility("default")))
+    #endif
+#else
+    #ifdef _WIN32
+        #define VZENSE_API_EXPORT __declspec(dllimport)
+    #else
+        #define VZENSE_API_EXPORT __attribute__((visibility("default")))
+    #endif
+#endif
+
+#ifdef __cplusplus
+#define VZENSE_C_API_EXPORT extern "C" VZENSE_API_EXPORT
+#else
+#define VZENSE_C_API_EXPORT VZENSE_API_EXPORT
+#define bool uint8_t
+#endif
+
+#endif /* VZENSEDS_DEFINE_H */

+ 109 - 0
Tof3DCamera/Ubuntu16.04/Include/VzenseNebula_enums.h

@@ -0,0 +1,109 @@
+#ifndef VZENSEDS_ENUMS_H
+#define VZENSEDS_ENUMS_H
+
+/**
+ * @brief Specifies the type of image frame.
+ */
+typedef enum{
+	VzDepthFrame = 0,                           //!< Depth frame with 16 bits per pixel in millimeters.
+	VzIRFrame = 1,                              //!< IR frame with 8 bits per pixel.
+	VzColorFrame = 3,                           //!< Color frame with 24 bits per pixel in RGB/BGR format.
+    VzTransformColorImgToDepthSensorFrame = 4,  //!< Color frame with 24 bits per pixel in RGB/BGR format, that is transformed to depth sensor space where the resolution is the same as the depth frame's resolution.\n 
+	                                            //!< This frame type can be enabled using ::VZ_SetTransformColorImgToDepthSensorEnabled().
+	VzTransformDepthImgToColorSensorFrame = 5,  //!< Depth frame with 16 bits per pixel, in millimeters, that is transformed to color sensor space where the resolution is same as the color frame's resolution.\n 
+	                                            //!< This frame type can be enabled using ::VZ_SetTransformDepthImgToColorSensorEnabled().
+	VzConfidenceFrame = 8,                      //!< Confidence frame with 16 bits per pixel.
+}VzFrameType;
+
+/**
+ * @brief Specifies the image pixel format.
+ */
+typedef enum{
+	VzPixelFormatDepthMM16 = 0,        //!< Depth image pixel format, 16 bits per pixel in mm.
+	VzPixelFormatGray8 = 2,            //!< Gray image pixel format, 8 bits per pixel.
+
+	//Color
+	VzPixelFormatRGB888 = 3,           //!< Color image pixel format, 24 bits per pixel RGB format.
+	VzPixelFormatBGR888 = 4           //!< Color image pixel format, 24 bits per pixel BGR format.
+}VzPixelFormat;
+
+/**
+ * @brief Specifies the type of sensor.
+ */
+typedef enum {
+    VzToFSensor = 0x01,          //!< ToF camera.
+    VzColorSensor = 0x02         //!< Color camera.
+}VzSensorType;
+
+/**
+ * @brief Return status codes for all APIs.\n 
+ * 		  <code>VzRetOK = 0</code> means the API successfully completed its operation.\n 
+ * 		  All other codes indicate a device, parameter, or API usage error.
+ */
+typedef enum
+{
+    VzRetOK                         =  0,   //!< The function completed successfully.
+    VzRetNoDeviceConnected          = -1,   //!< There is no depth camera connected or the camera has not been connected correctly. Check the hardware connection or try unplugging and re-plugging the USB cable.
+    VzRetInvalidDeviceIndex         = -2,   //!< The input device index is invalid.
+    VzRetDevicePointerIsNull        = -3,   //!< The device structure pointer is null.
+    VzRetInvalidFrameType           = -4,   //!< The input frame type is invalid.
+    VzRetFramePointerIsNull         = -5,   //!< The output frame buffer is null.
+    VzRetNoPropertyValueGet         = -6,   //!< Cannot get the value for the specified property.
+    VzRetNoPropertyValueSet         = -7,   //!< Cannot set the value for the specified property.
+    VzRetPropertyPointerIsNull      = -8,   //!< The input property value buffer pointer is null.
+    VzRetPropertySizeNotEnough      = -9,   //!< The input property value buffer size is too small to store the specified property value.
+    VzRetInvalidDepthRange          = -10,  //!< The input depth range mode is invalid.
+    VzRetGetFrameReadyTimeOut       = -11,  //!< Capture the next image frame time out.
+    VzRetInputPointerIsNull         = -12,  //!< An input pointer parameter is null.
+    VzRetCameraNotOpened            = -13,  //!< The camera has not been opened.
+    vzRetInvalidCameraType          = -14,  //!< The specified type of camera is invalid.
+    VzRetInvalidParams              = -15,  //!< One or more of the parameter values provided are invalid.
+    VzRetCurrentVersionNotSupport   = -16,  //!< This feature is not supported in the current version.
+    VzRetUpgradeImgError            = -17,  //!< There is an error in the upgrade file.
+    VzRetUpgradeImgPathTooLong      = -18,  //!< Upgrade file path length greater than 260.
+	VzRetUpgradeCallbackNotSet		= -19,  //!< VZ_SetUpgradeStatusCallback is not called.
+	VzRetProductNotSupport          = -20,  //!< The current product does not support this operation.
+	VzRetNoConfigFolder				= -21,  //!< No product profile found.
+	VzRetWebServerStartError        = -22,  //!< WebServer Start/Restart error(IP or PORT).
+	VzRetGetOverStayFrame           = -23,  //!< The time from frame ready to get frame is out of 1s
+	VzRetCreateLogDirError          = -24,  //!< Create log directory error
+	VzRetCreateLogFileError			= -25,  //!< Create log file error
+	VzRetNoAdapterConnected			= -100,	//!< There is no adapter connected
+	VzRetReInitialized				= -101,	//!< The SDK has been Initialized
+	VzRetNoInitialized				= -102,	//!< The SDK has not been Initialized
+	VzRetCameraOpened				= -103,	//!< The camera has been opened.
+	VzRetCmdError					= -104,	//!< Set/Get cmd control error
+	VzRetCmdSyncTimeOut				= -105,	//!< Set cmd ok.but time out for the sync return 
+    VzRetIPNotMatch                 = -106, //!< IP is not in the same network segment
+    VzRetNotStopStream              = -107, //!< Please invoke VZ_StopStream first to close the data stream
+    VzRetNotStartStream             = -108, //!< Please invoke VZ_StartStream first to get the data stream
+	VzRetNoDriversFolder			= -109, //!< Please invoke VZ_StartStream first to get the data stream
+
+	VzRetOthers = -255,	             //!< An unknown error occurred.
+}VzReturnStatus;
+
+typedef enum {
+	VzConnectUNKNOWN = 0,
+    VzUnconnected = 1,
+    VzConnected = 2,
+    VzOpened = 3,
+    VzUpgradeUnconnected = 4,
+    VzUpgradeConnected = 5,
+}VzConnectStatus;
+
+typedef enum
+{
+    VzActiveMode = 0x00,             //enter the active mode
+    VzHardwareTriggerMode = 0x01,    //enter the hardware salve mode, at this time need to connect the hardware trigger wire, provide hardware signal, to trigger the image
+    VzSoftwareTriggerMode = 0x02,    //enter the software salve mode, at this time need to invoke VZ_SetSoftwareSlaveTrigger, to trigger the image
+}VzWorkMode;
+
+typedef enum
+{
+    VzExposureControlMode_Auto = 0,
+    VzExposureControlMode_Manual = 1,
+}VzExposureControlMode;
+
+
+#endif /* VZENSEDS_ENUMS_H */
+

+ 206 - 0
Tof3DCamera/Ubuntu16.04/Include/VzenseNebula_types.h

@@ -0,0 +1,206 @@
+#ifndef VZENSEDS_TYPES_H
+#define VZENSEDS_TYPES_H
+
+#include <stdint.h>
+#include "VzenseNebula_enums.h"
+
+typedef uint16_t VzDepthPixel;  //!< Depth image pixel type in 16-bit
+typedef uint16_t VzGray16Pixel; //!< Gray image pixel type in 16-bit
+typedef uint8_t VzGray8Pixel;   //!< Gray image pixel type in 8-bit
+
+#pragma pack (push, 1)
+/**
+ * @brief Color image pixel type in 24-bit RGB format.
+ */
+typedef struct
+{
+	uint8_t r;	//!< Red
+	uint8_t g;	//!< Green
+	uint8_t b;	//!< Blue
+} VzRGB888Pixel;
+
+/**
+ * @brief Color image pixel type in 24-bit BGR format.
+ */
+typedef struct
+{
+	uint8_t b;	//!< Blue
+	uint8_t g;	//!< Green
+	uint8_t r;	//!< Red
+} VzBGR888Pixel;
+
+/**
+ * @brief Stores the x, y, and z components of a 3D vector.
+ */
+typedef struct  
+{
+	float x, y, z;	//!< The x, y, and z components of the vector.
+}VzVector3f;
+
+/**
+ * @brief Stores the x, y, and z components of a 2D vector.
+ */
+typedef struct
+{
+	uint16_t x;
+	uint16_t y;
+}VzVector2u16;
+
+/**
+ * @brief Contains depth information for a given pixel.
+ */
+typedef struct
+{
+	int          depthX;    //!< The x coordinate of the pixel.
+	int          depthY;    //!< The y coordinate of the pixel.
+	VzDepthPixel depthZ;    //!< The depth of the pixel, in millimeters.
+}VzDepthVector3;
+
+/**
+ * @brief image resolution
+ */
+typedef struct {
+    int width;
+    int height;
+}VzResolution;
+
+/**
+ * @brief Supported resolutions.
+ */
+typedef struct
+{
+    int count;
+    VzResolution resolution[6];
+}VzResolutionList;
+
+/**
+ * @brief Camera intrinsic parameters and distortion coefficients.
+ */
+typedef struct
+{
+	double	fx;  //!< Focal length x (pixel)
+	double	fy;  //!< Focal length y (pixel)
+	double	cx;  //!< Principal point x (pixel)
+	double	cy;  //!< Principal point y (pixel)
+	double	k1;  //!< Radial distortion coefficient, 1st-order
+	double	k2;  //!< Radial distortion coefficient, 2nd-order
+	double	p1;  //!< Tangential distortion coefficient
+	double	p2;  //!< Tangential distortion coefficient
+	double	k3;  //!< Radial distortion coefficient, 3rd-order
+	double	k4;  //!< Radial distortion coefficient, 4st-order
+	double	k5;  //!< Radial distortion coefficient, 5nd-order
+	double	k6;  //!< Radial distortion coefficient, 6rd-order
+}VzSensorIntrinsicParameters;
+
+/** 
+ * @brief Extrinsic parameters defines the physical relationship form tof sensor to color sensor
+ */
+typedef struct
+{
+	double rotation[9];     //!< Orientation stored as an array of 9 double representing a 3x3 rotation matrix.
+	double translation[3];  //!< Location stored as an array of 3 double representing a 3-D translation vector.
+}VzSensorExtrinsicParameters;
+
+/**
+ * @brief Depth/IR/Color image frame data.
+ */
+typedef struct
+{
+	uint32_t       frameIndex;          //!< The index of the frame.
+	VzFrameType    frameType;           //!< The type of frame. See ::VzFrameType for more information.
+	VzPixelFormat  pixelFormat;         //!< The pixel format used by a frame. See ::VzPixelFormat for more information.
+	uint8_t*       pFrameData;          //!< A buffer containing the frame’s image data.
+	uint32_t       dataLen;             //!< The length of pFrame, in bytes.
+	float          exposureTime;        //!< The exposure time, in milliseconds.
+    uint8_t        depthRange;          //!< The depth range mode of the current frame. Used only for depth frames.
+	uint16_t       width;               //!< The width of the frame, in pixels.
+	uint16_t       height;              //!< The height of the frame, in pixels.
+    uint64_t       deviceTimestamp;     //!< The timestamp of the frame from the device.
+}VzFrame;
+
+typedef struct
+{
+	uint32_t depth : 1;
+	uint32_t ir : 1;
+	uint32_t color : 1;
+	uint32_t transformedColor : 1;
+	uint32_t transformedDepth : 1;
+	uint32_t confidence : 1;
+	uint32_t reserved : 26;
+}VzFrameReady;
+
+typedef void* VzDeviceHandle;
+
+typedef struct
+{
+	char productName[64];
+    char uri[256];
+	char alias[64];
+    char serialNumber[64];
+    char ip[17];
+	VzConnectStatus status;
+}VzDeviceInfo;
+
+typedef struct
+{
+	int threshold;//[0, 3],The larger the value is, the more obvious the filtering effect is and The smaller the point cloud wobble
+    bool enable;
+} VzTimeFilterParams;
+
+typedef struct
+{
+	int threshold;//[0, 100],The larger the value is, the more obvious the filtering effect is and the more points are filtered out
+    bool enable;
+} VzConfidenceFilterParams;
+
+typedef struct
+{
+    int	threshold;//[0, 49],The larger the value is, the more obvious the filtering effect is and the more points are filtered out
+    bool enable;
+} VzFlyingPixelFilterParams;
+
+typedef struct
+{
+    VzExposureControlMode mode;
+    int	exposureTime;              //When the control mode is AE,  exposureTime represents the maximum exposure time.
+                                   //When the control mode is Manual, exposureTime represents the current exposure time.
+} VzExposureTimeParams;
+
+
+
+/**
+ * @brief Error informations about the device
+ */
+typedef struct
+{
+    int errorCount;                     //The count of error messages, the maximum number is 10
+    char errorMessage[10][64];          //The maximum length of each error message is 64(contains '\0').
+} VzDeviceErrorInfo;
+
+typedef struct
+{	
+	uint16_t width;                      //[1,65535],The width of input signal.
+	uint16_t interval;                   //[34000,65535],The interval of input signal.
+	uint8_t polarity;                    //[0,1],0 for active low, 1 for active high.
+}VzInputSignalParamsForHWTrigger;        //Input signal parameters for Hardware Trigger.
+
+typedef struct
+{
+	uint16_t width;                      //[1,65535],The width of output signal.
+	uint16_t delay;                      //[0,65535],The delay time of output signal.
+	uint8_t polarity;                    //[0,1],0 for active low, 1 for active high.
+}VzOutputSignalParams;                   //Output signal parameters.
+
+#pragma pack (pop)
+
+/**
+* @brief hotplug status callback function
+* pInfo     return the info of the Device, See ::VzDeviceInfo
+* state     0:device added , 1:device removed
+* pUserData Pointer to user data, which can be null
+*/
+typedef void(*PtrHotPlugStatusCallback)(const VzDeviceInfo* pInfo, int state, void* pUserData);
+
+typedef void(*PtrUpgradeStatusCallback)(int status, int params, void* pUserData);
+
+#endif /* VZENSEDS_TYPES_H */

+ 13 - 0
Tof3DCamera/Ubuntu16.04/Lib/Config/DS77CLite_0F.json

@@ -0,0 +1,13 @@
+{
+    "productName": "DS77CLite",
+    "connectType":"socket",
+    "colorSensor": [
+        {
+            "type": "gc2053",
+            "resolutionList": ["1600_1200","800_600", "640_480"]
+        }    ],
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 13 - 0
Tof3DCamera/Ubuntu16.04/Lib/Config/DS77CPro_0E.json

@@ -0,0 +1,13 @@
+{
+    "productName": "DS77CPro",
+    "connectType":"socket",
+    "colorSensor": [
+        {
+            "type": "gc2053",
+            "resolutionList": ["1600_1200","800_600", "640_480"]
+        }    ],
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 8 - 0
Tof3DCamera/Ubuntu16.04/Lib/Config/DS77Lite_11.json

@@ -0,0 +1,8 @@
+{
+    "productName": "DS77Lite",
+    "connectType":"socket",
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 8 - 0
Tof3DCamera/Ubuntu16.04/Lib/Config/DS77Pro_10.json

@@ -0,0 +1,8 @@
+{
+    "productName": "DS77Pro",
+    "connectType":"socket",
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 13 - 0
Tof3DCamera/Ubuntu16.04/Lib/Config/DS86_12.json

@@ -0,0 +1,13 @@
+{
+    "productName": "DS86",
+    "connectType":"socket",
+    "colorSensor": [
+    {
+      "type": "gc2053",
+      "resolutionList": [ "1600_1200", "800_600", "640_480" ]
+    }    ],
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 13 - 0
Tof3DCamera/Ubuntu16.04/Lib/Config/DS87_13.json

@@ -0,0 +1,13 @@
+{
+    "productName": "DS87",
+    "connectType":"socket",
+    "colorSensor": [
+    {
+      "type": "gc2053",
+      "resolutionList": [ "1600_1200", "800_600", "640_480" ]
+    }    ],
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

BIN
Tof3DCamera/Ubuntu16.04/Lib/libNebula_api.so.1.2


BIN
Tof3DCamera/Ubuntu16.04/Lib/libNebula_api.so.1.2.4


+ 539 - 0
Tof3DCamera/Ubuntu18.04/Include/VzenseNebula_api.h

@@ -0,0 +1,539 @@
+#ifndef VZENSEDS_API_H
+#define VZENSEDS_API_H
+
+/**
+* @file VzenseDS_api.h
+* @brief Vzense API header file.
+* Copyright (c) 2019-2022 Vzense Interactive, Inc.
+*/
+
+/*! \mainpage VzenseDS API Documentation
+*
+* \section intro_sec Introduction
+*
+* Welcome to the VzenseDS API documentation. This documentation enables you to quickly get started in your development efforts to programmatically interact with the Vzense CW ToF Camera (eg:DS77).
+*/
+
+#include "VzenseNebula_define.h"
+
+/**
+* @brief         Initializes the API on the device. This function must be invoked before any other Vzense APIs.
+* @return        ::VzRetOK if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_Initialize();
+
+/**
+* @brief         Shuts down the API on the device and clears all resources allocated by the API. After invoking this function, no other Vzense APIs can be invoked.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_Shutdown();
+
+/**
+* @brief         Gets the version of SDK.
+* @return        Returns sdk version
+*/
+VZENSE_C_API_EXPORT const char* VZ_GetSDKVersion();
+
+/**
+* @brief         Returns the number of camera devices currently connected.
+* @param[out]    pDeviceCount    Pointer to a 32-bit integer variable in which to return the device count.
+* @return        ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetDeviceCount(uint32_t* pDeviceCount);
+
+/**
+* @brief         Returns the info of the deviceIndex camera device.
+* @param[in]     deviceIndex    The index of the device to open. Device indices range from 0 to device count - 1.
+* @param[out]    pDevicesInfo       Pointer to a buffer in which to store the device info.
+* @return        ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetDeviceInfo(uint32_t deviceIndex, VzDeviceInfo* pDevicesInfo);
+
+/**
+* @brief         Returns the info lists of the deviceCount camera devices.
+* @param[in]     deviceCount         the number of camera devices.
+* @param[out]    pDevicesInfoList    Pointer to a buffer in which to store the devices list infos.
+* @return        ::VzRetOK           if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetDeviceInfoList(uint32_t deviceCount, VzDeviceInfo* pDevicesInfoList);
+
+/**
+* @brief         Opens the device specified by <code>sn</code>. The device must be subsequently closed using VZ_CloseDevice().
+* @param[in]     pURI         the uri of the device. See ::VzDeviceInfo for more information.
+* @param[out]    pDevice     the handle of the device on which to open.
+* @return:       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_OpenDeviceByUri(const char* pURI, VzDeviceHandle* pDevice);
+
+/**
+* @brief         Opens the device specified by <code>alias</code>. The device must be subsequently closed using VZ_CloseDevice().
+* @param[in]     pAlias       the alias of the device. See ::VzDeviceInfo for more information.
+* @param[out]    pDevice     the handle of the device on which to open.
+* @return:       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_OpenDeviceByAlias(const char* pAlias, VzDeviceHandle* pDevice);
+
+/**
+* @brief         Opens the device specified by <code>ip</code>. The device must be subsequently closed using VZ_CloseDevice().
+* @param[in]     pIP          the ip of the device. See ::VzDeviceInfo for more information.
+* @param[out]    pDevice     the handle of the device on which to open.
+* @return:       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_OpenDeviceByIP(const char* pIP, VzDeviceHandle* pDevice);
+
+/**
+* @brief         Closes the device specified by <code>device</code> that was opened using VZ_OpenDevice.
+* @param[in]     pDevice       The handle of the device to close.
+* @return:       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_CloseDevice(VzDeviceHandle* pDevice);
+
+/**
+* @brief         Starts capturing the image stream indicated by <code>device</code>. Invoke VZ_StopStream() to stop capturing the image stream.
+* @param[in]     device          The handle of the device on which to start capturing the image stream.                        
+* @return        ::VzRetOK if    the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_StartStream(VzDeviceHandle device);
+
+/**
+* @brief         Stops capturing the image stream on the device specified by <code>device</code>. that was started using VZ_StartStream.
+* @param[in]     device       The handle of the device on which to stop capturing the image stream.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_StopStream(VzDeviceHandle device);
+
+/**
+* @brief         Captures the next image frame from the device specified by <code>device</code>. This API must be invoked before capturing frame data using VZ_GetFrame().
+* @param[in]     device         The handle of the device on which to read the next frame.
+* @param[in]     waitTime       The unit is millisecond, the value is in the range (0,65535).
+*                               You can change the value according to the frame rate. For example,the frame rate is 30, so the theoretical waittime interval is 33ms, but if set the time value is 20ms,
+*                               it means the max wait time is 20 ms when capturing next frame, so when call the VZ_GetFrameReady, it may return VzRetGetFrameReadyTimeOut(-11).
+*                               So the recommended value is 2 * 1000/ FPS.
+* @param[out]    pFrameReady    Pointer to a buffer in which to store the signal on which image is ready to be get.
+* @return        ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFrameReady(VzDeviceHandle device, uint16_t waitTime, VzFrameReady* pFrameReady);
+
+/**
+* @brief         Returns the image data for the current frame from the device specified by <code>device</code>. Before invoking this API, invoke VZ_GetFrameReady() to capture one image frame from the device.
+* @param[in]     device       The handle of the device to capture an image frame from.
+* @param[in]     frameType    The image frame type.
+* @param[out]    pVzFrame     Pointer to a buffer in which to store the returned image data.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFrame(VzDeviceHandle device, VzFrameType frameType, VzFrame* pVzFrame);
+
+/**
+* @brief        Set the working mode of the camera.
+* @param[in]    device      The handle of the device
+* @param[in]    mode        The work mode of camera. For ActiveMode, set the Time filter default true, for SlaveMode, set the Time filter default false.
+* @return       ::VzRetOK   if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetWorkMode(VzDeviceHandle device, VzWorkMode mode);
+
+/**
+* @brief        Get the working mode of the camera.
+* @param[in]    device      The handle of the device
+* @param[in]    pMode       The work mode of camera.
+* @return       ::VzRetOK   if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetWorkMode(VzDeviceHandle device, VzWorkMode* pMode);
+
+/**
+* @brief        Triggering a frame of image is only useful if the camera is in SoftwareTriggerMode
+* @param[in]    device      The handle of the device.
+* @return       ::VzRetOK   if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetSoftwareSlaveTrigger(VzDeviceHandle device);
+
+/**
+* @brief         Returns the internal intrinsic and distortion coefficient parameters from the device specified by <code>device</code>.
+* @param[in]     device                        The handle of the device from which to get the internal parameters. 
+* @param[in]     sensorType                    The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[out]    pSensorIntrinsicParameters    Pointer to a VzSensorIntrinsicParameters variable in which to store the parameter values.
+* @return        ::VzRetOK                     if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetSensorIntrinsicParameters(VzDeviceHandle device, VzSensorType sensorType, VzSensorIntrinsicParameters* pSensorIntrinsicParameters);
+
+/**
+* @brief         Returns the camera rotation and translation coefficient parameters from the device specified by <code>device</code>.
+* @param[in]     device                        The handle of the device from which to get the extrinsic parameters. 
+* @param[out]    pSensorExtrinsicParameters    Pointer to a ::VzSensorExtrinsicParameters variable in which to store the parameters.
+* @return        ::VzRetOK                     if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetSensorExtrinsicParameters(VzDeviceHandle device, VzSensorExtrinsicParameters* pSensorExtrinsicParameters);
+
+/**
+* @brief         Gets the firmware version number.
+* @param[in]     device              The handle of the device on which to set the pulse count.
+* @param[in]     pFirmwareVersion    Pointer to a variable in which to store the returned fw value.
+* @param[in]     length              The maximum length is 64 bytes.
+* @return        ::VzRetOK          if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFirmwareVersion(VzDeviceHandle device, char* pFirmwareVersion, int length);
+
+/**
+* @brief         Gets the MAC from the device specified by <code>device</code>.
+* @param[in]     device         The handle of the device.
+* @param[out]    pMACAddress    Pointer to a buffer in which to store the device MAC address. the buffer default size is 18, and the last buffer set '\0'.
+* @return        ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetDeviceMACAddress(VzDeviceHandle device, char* pMACAddress);
+
+/**
+* @brief        Sets the device GMM gain on a device.
+* @param[in]    device       The handle of the device on which to set the GMM gain.
+* @param[in]    gmmgain      The GMM gain value to set. See ::VzGMMGain for more information.The GMM gain value is in the range [0,255].
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetIRGMMGain(VzDeviceHandle device, uint8_t gmmgain);
+
+/**
+* @brief        Returns the the device's GMM gain.
+* @param[in]    device       The handle of the device from which to get the GMM gain.
+* @param[out]   pGmmgain      Pointer to a variable in which to store the returned GMM gain.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetIRGMMGain(VzDeviceHandle device, uint8_t* pGmmgain);
+
+/**
+* @brief         Sets the color image pixel format on the device specified by <code>device</code>. Currently only RGB and BGR formats are supported.
+* @param[in]     device         The handle of the device to set the pixel format. 
+* @param[in]     pixelFormat    The color pixel format to use. Pass in one of the values defined by ::VzPixelFormat. Currently only <code>VzPixelFormatRGB888</code> and <code>VzPixelFormatBGR888</code> are supported.
+* @return        ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetColorPixelFormat(VzDeviceHandle device, VzPixelFormat pixelFormat);
+
+/**
+* @brief        Sets the color frame Resolution.
+* @param[in]    device       The handle of the device.
+* @param[in]    w            The width of color image
+* @param[in]    h            The height of color image
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetColorResolution(VzDeviceHandle device, int w, int h);
+
+/**
+* @brief        Returns the the color frame Resolution.
+* @param[in]    device         The handle of the device.
+* @param[out]    pW            The width of color image
+* @param[out]    pH            The height of color image
+* @return       ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetColorResolution(VzDeviceHandle device, int* pW, int* pH);
+
+/**
+* @brief        Gets a list of image resolutions supported by Sensor
+* @param[in]    type           The sensor type
+* @param[out]    pList         List of supported resolutions
+* @return       ::VzRetOK      if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VzGetSupportedResolutionList(VzDeviceHandle device, VzSensorType type, VzResolutionList* pList);
+
+/**
+* @brief         Sets the ToF frame rate.The interface takes a long time, about 500 ms.
+* @param[in]     device       The handle of the device on which to set the framerate.
+* @param[in]     value        The rate value, in range [1,25].
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetFrameRate(VzDeviceHandle device, int value);
+/**
+* @brief         Gets the ToF frame rate.
+* @param[in]     device       The handle of the device on which to get the framerate.
+* @param[in]     pValue       The rate value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFrameRate(VzDeviceHandle device, int* pValue);
+
+/**
+* @brief        Set the exposure mode of sensor.
+* @param[in]    device          The handle of the device on which to set the exposure control mode.
+* @param[in]    sensorType      The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[in]    exposureType    the exposure control mode.
+* @return       ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetExposureControlMode(VzDeviceHandle device, VzSensorType sensorType, VzExposureControlMode controlMode);
+
+/**
+* @brief         Get the exposure mode of sensor.
+* @param[in]     device           The handle of the device on which to get the exposure control mode.
+* @param[in]     sensorType       The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[out]    pControlMode     the exposure control mode.
+* @return        ::VzRetOK        if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetExposureControlMode(VzDeviceHandle device, VzSensorType sensorType, VzExposureControlMode* pControlMode);
+
+/**
+* @brief        Set the exposure time of sensor.
+* @param[in]    device          The handle of the device on which to set the exposure time  in microseconds.
+* @param[in]    sensorType      The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[in]    exposureTime    the exposure time.
+* @return       ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetExposureTime(VzDeviceHandle device, VzSensorType sensorType, VzExposureTimeParams exposureTime);
+
+/**
+* @brief         Get the exposure time of sensor.
+* @param[in]     device           The handle of the device on which to get the exposure time in microseconds.
+* @param[in]     sensorType       The type of sensor (depth or color) from which to get parameter information. Pass in the applicable value defined by ::VzSensorType.
+* @param[out]    pExposureTime    the exposure time.
+* @return        ::VzRetOK        if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetExposureTime(VzDeviceHandle device, VzSensorType sensorType, VzExposureTimeParams* pExposureTime);
+
+/**
+* @brief        Set the parameters of the Time filter.
+* @param[in]    device       The handle of the device
+* @param[in]    params       Pointer to a variable in which to store the parameters.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/ 
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetTimeFilterParams(VzDeviceHandle device, VzTimeFilterParams params);
+
+/**
+* @brief         Get the parameters of the Time Filter feature.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetTimeFilterParams(VzDeviceHandle device, VzTimeFilterParams *pParams);
+
+/**
+* @brief         Set the parameters of the Confidence filter.
+* @param[in]     device       The handle of the device
+* @param[out]    params       Pointer to a variable in which to store the parameters.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetConfidenceFilterParams(VzDeviceHandle device, VzConfidenceFilterParams params);
+
+/**
+* @brief         Get the parameters of the ConfidenceFilter feature.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetConfidenceFilterParams(VzDeviceHandle device, VzConfidenceFilterParams *pParams);
+
+/**
+* @brief        Set the parameters of the FlyingPixel filter.
+* @param[in]    device       The handle of the device.
+* @param[out]   params       Pointer to a variable in which to store the parameters.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetFlyingPixelFilterParams(VzDeviceHandle device, const VzFlyingPixelFilterParams params);
+
+/**
+* @brief         Get the parameters of the Confidence filter.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFlyingPixelFilterParams(VzDeviceHandle device, VzFlyingPixelFilterParams* params);
+
+/**
+* @brief        Enables or disables the FillHole filter
+* @param[in]    device       The handle of the device.
+* @param[in]    bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetFillHoleFilterEnabled(VzDeviceHandle device, bool bEnabled);
+
+/**
+* @brief         Returns the Boolean value of whether the FillHole Filter feature is enabled or disabled.
+* @param[in]     device       The handle of the device
+* @param[out]    pEnabled     Pointer to a variable in which to store the returned Boolean value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetFillHoleFilterEnabled(VzDeviceHandle device, bool *pEnabled);
+
+/**
+* @brief        Enables or disables the Spatial filter
+* @param[in]    device       The handle of the device.
+* @param[in]    bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetSpatialFilterEnabled(VzDeviceHandle device, bool bEnabled);
+
+/**
+* @brief         Returns the Boolean value of whether the Spatial Filter feature is enabled or disabled.
+* @param[in]     device       The handle of the device
+* @param[out]    pEnabled     Pointer to a variable in which to store the returned Boolean value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetSpatialFilterEnabled(VzDeviceHandle device, bool *pEnabled);
+
+/**
+* @brief         Enables or disables transforms a color image into the geometry of the depth sensor. When enabled, VZ_GetFrame() can\n
+*                be invoked passing ::VzTransformedColorFrame as the frame type for get a color image which each pixel matches the \n
+*                corresponding pixel coordinates of the depth sensor. The resolution of the transformed color frame is the same as that\n
+*                of the depth image.
+* @param[in]     device       The handle of the device on which to enable or disable mapping.
+* @param[in]     bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetTransformColorImgToDepthSensorEnabled(VzDeviceHandle device, bool bEnabled);
+
+/**
+* @brief         Returns the Boolean value of whether the transformed of the color image to depth sensor space feature is enabled or disabled.
+* @param[in]     device       The handle of the device on which to enable or disable the feature.
+* @param[out]    bEnabled     Pointer to a variable in which to store the returned Boolean value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetTransformColorImgToDepthSensorEnabled(VzDeviceHandle device, bool *bEnabled);
+
+/**
+* @brief         Enables or disables transforms the depth map into the geometry of the color sensor. When enabled, VZ_GetFrame() can\n
+*                be invoked passing ::VzTransformedDepthFrame as the frame type for get a depth image which each pixel matches the \n
+*                corresponding pixel coordinates of the color sensor. The resolution of the transformed depth frame is the same as that\n
+*                of the color image.
+* @param[in]     device       The handle of the device on which to enable or disable mapping.
+* @param[in]     bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetTransformDepthImgToColorSensorEnabled(VzDeviceHandle device, bool bEnabled);
+
+/**
+* @brief         Returns the Boolean value of whether the transformed of the depth image to color space feature is enabled or disabled.
+* @param[in]     device       The handle of the device on which to enable or disable the feature.
+* @param[out]    bEnabled     Pointer to a variable in which to store the returned Boolean value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetTransformDepthImgToColorSensorEnabled(VzDeviceHandle device, bool *bEnabled);
+
+/**
+* @brief         Returns the point value of the frame that the mapping of the depth image to Color space.
+* @param[in]     device           The handle of the device on which to enable or disable the feature.
+* @param[in]     pointInDepth     The point in depth frame.
+* @param[in]     colorSize        The size(x = w,y = h) of color frame.
+* @param[out]    pPointInColor    The point in the color frame.
+* @return        ::VzRetOK        if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_TransformedDepthPointToColorPoint(const VzDeviceHandle device, const VzDepthVector3 depthPoint, const VzVector2u16 colorSize, VzVector2u16* pPointInColor);
+
+/**
+* @brief         Converts the input points from depth coordinate space to world coordinate space.
+* @param[in]     device          The handle of the device on which to perform the operation.
+* @param[in]     pDepthVector    Pointer to a buffer containing the x, y, and z values of the depth coordinates to be converted. \n
+*                                x and y are measured in pixels, where 0, 0 is located at the top left corner of the image. \n
+*                                z is measured in millimeters, based on the ::VzPixelFormat depth frame.
+* @param[out]    pWorldVector    Pointer to a buffer in which to output the converted x, y, and z values of the world coordinates, measured in millimeters.
+* @param[in]     pointCount      The number of points to convert.
+* @param[in]     pSensorParam    The intrinsic parameters for the depth sensor. See ::VzSensorIntrinsicParameters.
+* @return        ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_ConvertDepthToPointCloud(VzDeviceHandle device, VzDepthVector3* pDepthVector, VzVector3f* pWorldVector, int32_t pointCount, VzSensorIntrinsicParameters* pSensorParam);
+
+/**
+* @brief         Converts the input Depth frame from depth coordinate space to world coordinate space on the device. Currently supported depth image types are VzDepthFrame and VzTransformDepthImgToColorSensorFrame.
+* @param[in]     device          The handle of the device on which to perform the operation.
+* @param[in]     pDepthFrame      The depth frame.
+* @param[out]    pWorldVector    Pointer to a buffer in which to output the converted x, y, and z values of the world coordinates, measured in millimeters. The length of pWorldVector must is (VzFrame.width * VzFrame.height).
+* @return        ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_ConvertDepthFrameToPointCloudVector(VzDeviceHandle device, const VzFrame* pDepthFrame, VzVector3f* pWorldVector);
+/**
+* @brief        Sets hotplug status callback function
+* @param[in]    pCallback    Pointer to the callback function. See ::PtrHotPlugStatusCallback 
+* @param[in]    pUserData    Pointer to the user data. See ::PtrHotPlugStatusCallback
+* @return       ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetHotPlugStatusCallback(PtrHotPlugStatusCallback pCallback, const void* pUserData);
+
+/**
+* @brief        Reboot the camera.
+* @param[in]    device          The handle of the device
+* @return       ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_RebootDevie(VzDeviceHandle device);
+
+/**
+* @brief        Set the corresponding property value for the device
+* @param[in]    device          The handle of the device from which to set the property value.
+* @param[in]    propertyKey     The type of property to set on the device.
+* @param[in]    pData           Pointer to a buffer containing the property value.
+* @param[in]    dataSize        The size, in bytes, of the property value contained in pData
+* @return       ::VzRetOK       if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetProperty(VzDeviceHandle device, const char* propertyKey, const void* pData, uint32_t dataSize);
+
+/**
+* @brief 		Returns a specific property value from the device
+* @param[in] 	device			The handle of the device from which to get the property value.
+* @param[in] 	propertyType	The type of property to get from the device
+* @param[out]	pData			Pointer to a buffer to store the returned property value.
+* @param[in]	dataSize		The size, in bytes, of the property value returned in pData
+* @return 		::VzRetOK		if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetProperty(VzDeviceHandle device, const char* propertyKey, void* pData, uint32_t dataSize);
+
+/**
+* @brief         Enables or disables the HDR Mode of the ToF sensor with VzExposureControlMode_Manual. Default enabled,  so if you want switch to the VzExposureControlMode_Auto, set HDR Mode disable firstly.
+* @param[in]     device       The handle of the device on which to enable or disable the feature.
+* @param[in]     bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetHDRModeEnabled(VzDeviceHandle device, bool bEnabled);
+/**
+* @brief         Returns the Boolean value of whether the HDRMode of ToF sensor feature is enabled or disabled.
+* @param[in]     device       The handle of the device on which to enable or disable the feature.
+* @param[in]     bEnabled     Set to <code>true</code> to enable the feature or <code>false</code> to disable the feature.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetHDRModeEnabled(VzDeviceHandle device, bool *bEnabled);
+
+/**
+* @brief         Set the input signal parameters for Hardware Trigger.
+* @param[in]     device       The handle of the device
+* @param[in]     params       Pointer to a variable in which to store the parameters.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetInputSignalParamsForHWTrigger(VzDeviceHandle device, VzInputSignalParamsForHWTrigger params);
+
+/**
+* @brief         Get the Input signal parameters for Hardware Trigger.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetInputSignalParamsForHWTrigger(VzDeviceHandle device, VzInputSignalParamsForHWTrigger *pParams);
+
+/**
+* @brief         Set the output signal parameters.
+* @param[in]     device       The handle of the device
+* @param[in]     params       Pointer to a variable in which to store the parameters.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetOutputSignalParams(VzDeviceHandle device, VzOutputSignalParams params);
+
+/**
+* @brief         Get the output signal parameters.
+* @param[in]     device       The handle of the device
+* @param[out]    pParams      Pointer to a variable in which to store the returned value.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetOutputSignalParams(VzDeviceHandle device, VzOutputSignalParams *pParams);
+
+/**
+* @brief         Set the parameters by Json file that can be saved by NebulaGUITool.
+* @param[in]     device       The handle of the device.
+* @param[in]     pfilePath    Pointer to the path of Json file.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetParamsByJson(VzDeviceHandle device, char* pfilePath);
+
+/**
+* @brief         Set the color Gain with the exposure mode of RGB sensor in VzExposureControlMode_Manual.
+* @param[in]     device       The handle of the device.
+* @param[in]     params       The value of color Gain.Value range: [1.0 15.5]
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_SetColorGain(VzDeviceHandle device, float params);
+
+/**
+* @brief         Get the color Gain.
+* @param[in]     device       The handle of the device.
+* @param[out]    params       The value of color Gain.
+* @return        ::VzRetOK    if the function succeeded, or one of the error values defined by ::VzReturnStatus.
+*/
+VZENSE_C_API_EXPORT VzReturnStatus VZ_GetColorGain(VzDeviceHandle device, float *pParams);
+
+#endif /* VZENSEDS_API_H */

+ 28 - 0
Tof3DCamera/Ubuntu18.04/Include/VzenseNebula_define.h

@@ -0,0 +1,28 @@
+#ifndef VZENSEDS_DEFINE_H
+#define VZENSEDS_DEFINE_H
+
+#include "VzenseNebula_enums.h"
+#include "VzenseNebula_types.h"
+
+#ifdef PS_EXPORT_ON
+    #ifdef _WIN32
+        #define VZENSE_API_EXPORT __declspec(dllexport)
+    #else
+        #define VZENSE_API_EXPORT __attribute__((visibility("default")))
+    #endif
+#else
+    #ifdef _WIN32
+        #define VZENSE_API_EXPORT __declspec(dllimport)
+    #else
+        #define VZENSE_API_EXPORT __attribute__((visibility("default")))
+    #endif
+#endif
+
+#ifdef __cplusplus
+#define VZENSE_C_API_EXPORT extern "C" VZENSE_API_EXPORT
+#else
+#define VZENSE_C_API_EXPORT VZENSE_API_EXPORT
+#define bool uint8_t
+#endif
+
+#endif /* VZENSEDS_DEFINE_H */

+ 109 - 0
Tof3DCamera/Ubuntu18.04/Include/VzenseNebula_enums.h

@@ -0,0 +1,109 @@
+#ifndef VZENSEDS_ENUMS_H
+#define VZENSEDS_ENUMS_H
+
+/**
+ * @brief Specifies the type of image frame.
+ */
+typedef enum{
+	VzDepthFrame = 0,                           //!< Depth frame with 16 bits per pixel in millimeters.
+	VzIRFrame = 1,                              //!< IR frame with 8 bits per pixel.
+	VzColorFrame = 3,                           //!< Color frame with 24 bits per pixel in RGB/BGR format.
+    VzTransformColorImgToDepthSensorFrame = 4,  //!< Color frame with 24 bits per pixel in RGB/BGR format, that is transformed to depth sensor space where the resolution is the same as the depth frame's resolution.\n 
+	                                            //!< This frame type can be enabled using ::VZ_SetTransformColorImgToDepthSensorEnabled().
+	VzTransformDepthImgToColorSensorFrame = 5,  //!< Depth frame with 16 bits per pixel, in millimeters, that is transformed to color sensor space where the resolution is same as the color frame's resolution.\n 
+	                                            //!< This frame type can be enabled using ::VZ_SetTransformDepthImgToColorSensorEnabled().
+	VzConfidenceFrame = 8,                      //!< Confidence frame with 16 bits per pixel.
+}VzFrameType;
+
+/**
+ * @brief Specifies the image pixel format.
+ */
+typedef enum{
+	VzPixelFormatDepthMM16 = 0,        //!< Depth image pixel format, 16 bits per pixel in mm.
+	VzPixelFormatGray8 = 2,            //!< Gray image pixel format, 8 bits per pixel.
+
+	//Color
+	VzPixelFormatRGB888 = 3,           //!< Color image pixel format, 24 bits per pixel RGB format.
+	VzPixelFormatBGR888 = 4           //!< Color image pixel format, 24 bits per pixel BGR format.
+}VzPixelFormat;
+
+/**
+ * @brief Specifies the type of sensor.
+ */
+typedef enum {
+    VzToFSensor = 0x01,          //!< ToF camera.
+    VzColorSensor = 0x02         //!< Color camera.
+}VzSensorType;
+
+/**
+ * @brief Return status codes for all APIs.\n 
+ * 		  <code>VzRetOK = 0</code> means the API successfully completed its operation.\n 
+ * 		  All other codes indicate a device, parameter, or API usage error.
+ */
+typedef enum
+{
+    VzRetOK                         =  0,   //!< The function completed successfully.
+    VzRetNoDeviceConnected          = -1,   //!< There is no depth camera connected or the camera has not been connected correctly. Check the hardware connection or try unplugging and re-plugging the USB cable.
+    VzRetInvalidDeviceIndex         = -2,   //!< The input device index is invalid.
+    VzRetDevicePointerIsNull        = -3,   //!< The device structure pointer is null.
+    VzRetInvalidFrameType           = -4,   //!< The input frame type is invalid.
+    VzRetFramePointerIsNull         = -5,   //!< The output frame buffer is null.
+    VzRetNoPropertyValueGet         = -6,   //!< Cannot get the value for the specified property.
+    VzRetNoPropertyValueSet         = -7,   //!< Cannot set the value for the specified property.
+    VzRetPropertyPointerIsNull      = -8,   //!< The input property value buffer pointer is null.
+    VzRetPropertySizeNotEnough      = -9,   //!< The input property value buffer size is too small to store the specified property value.
+    VzRetInvalidDepthRange          = -10,  //!< The input depth range mode is invalid.
+    VzRetGetFrameReadyTimeOut       = -11,  //!< Capture the next image frame time out.
+    VzRetInputPointerIsNull         = -12,  //!< An input pointer parameter is null.
+    VzRetCameraNotOpened            = -13,  //!< The camera has not been opened.
+    vzRetInvalidCameraType          = -14,  //!< The specified type of camera is invalid.
+    VzRetInvalidParams              = -15,  //!< One or more of the parameter values provided are invalid.
+    VzRetCurrentVersionNotSupport   = -16,  //!< This feature is not supported in the current version.
+    VzRetUpgradeImgError            = -17,  //!< There is an error in the upgrade file.
+    VzRetUpgradeImgPathTooLong      = -18,  //!< Upgrade file path length greater than 260.
+	VzRetUpgradeCallbackNotSet		= -19,  //!< VZ_SetUpgradeStatusCallback is not called.
+	VzRetProductNotSupport          = -20,  //!< The current product does not support this operation.
+	VzRetNoConfigFolder				= -21,  //!< No product profile found.
+	VzRetWebServerStartError        = -22,  //!< WebServer Start/Restart error(IP or PORT).
+	VzRetGetOverStayFrame           = -23,  //!< The time from frame ready to get frame is out of 1s
+	VzRetCreateLogDirError          = -24,  //!< Create log directory error
+	VzRetCreateLogFileError			= -25,  //!< Create log file error
+	VzRetNoAdapterConnected			= -100,	//!< There is no adapter connected
+	VzRetReInitialized				= -101,	//!< The SDK has been Initialized
+	VzRetNoInitialized				= -102,	//!< The SDK has not been Initialized
+	VzRetCameraOpened				= -103,	//!< The camera has been opened.
+	VzRetCmdError					= -104,	//!< Set/Get cmd control error
+	VzRetCmdSyncTimeOut				= -105,	//!< Set cmd ok.but time out for the sync return 
+    VzRetIPNotMatch                 = -106, //!< IP is not in the same network segment
+    VzRetNotStopStream              = -107, //!< Please invoke VZ_StopStream first to close the data stream
+    VzRetNotStartStream             = -108, //!< Please invoke VZ_StartStream first to get the data stream
+	VzRetNoDriversFolder			= -109, //!< Please invoke VZ_StartStream first to get the data stream
+
+	VzRetOthers = -255,	             //!< An unknown error occurred.
+}VzReturnStatus;
+
+typedef enum {
+	VzConnectUNKNOWN = 0,
+    VzUnconnected = 1,
+    VzConnected = 2,
+    VzOpened = 3,
+    VzUpgradeUnconnected = 4,
+    VzUpgradeConnected = 5,
+}VzConnectStatus;
+
+typedef enum
+{
+    VzActiveMode = 0x00,             //enter the active mode
+    VzHardwareTriggerMode = 0x01,    //enter the hardware salve mode, at this time need to connect the hardware trigger wire, provide hardware signal, to trigger the image
+    VzSoftwareTriggerMode = 0x02,    //enter the software salve mode, at this time need to invoke VZ_SetSoftwareSlaveTrigger, to trigger the image
+}VzWorkMode;
+
+typedef enum
+{
+    VzExposureControlMode_Auto = 0,
+    VzExposureControlMode_Manual = 1,
+}VzExposureControlMode;
+
+
+#endif /* VZENSEDS_ENUMS_H */
+

+ 206 - 0
Tof3DCamera/Ubuntu18.04/Include/VzenseNebula_types.h

@@ -0,0 +1,206 @@
+#ifndef VZENSEDS_TYPES_H
+#define VZENSEDS_TYPES_H
+
+#include <stdint.h>
+#include "VzenseNebula_enums.h"
+
+typedef uint16_t VzDepthPixel;  //!< Depth image pixel type in 16-bit
+typedef uint16_t VzGray16Pixel; //!< Gray image pixel type in 16-bit
+typedef uint8_t VzGray8Pixel;   //!< Gray image pixel type in 8-bit
+
+#pragma pack (push, 1)
+/**
+ * @brief Color image pixel type in 24-bit RGB format.
+ */
+typedef struct
+{
+	uint8_t r;	//!< Red
+	uint8_t g;	//!< Green
+	uint8_t b;	//!< Blue
+} VzRGB888Pixel;
+
+/**
+ * @brief Color image pixel type in 24-bit BGR format.
+ */
+typedef struct
+{
+	uint8_t b;	//!< Blue
+	uint8_t g;	//!< Green
+	uint8_t r;	//!< Red
+} VzBGR888Pixel;
+
+/**
+ * @brief Stores the x, y, and z components of a 3D vector.
+ */
+typedef struct  
+{
+	float x, y, z;	//!< The x, y, and z components of the vector.
+}VzVector3f;
+
+/**
+ * @brief Stores the x, y, and z components of a 2D vector.
+ */
+typedef struct
+{
+	uint16_t x;
+	uint16_t y;
+}VzVector2u16;
+
+/**
+ * @brief Contains depth information for a given pixel.
+ */
+typedef struct
+{
+	int          depthX;    //!< The x coordinate of the pixel.
+	int          depthY;    //!< The y coordinate of the pixel.
+	VzDepthPixel depthZ;    //!< The depth of the pixel, in millimeters.
+}VzDepthVector3;
+
+/**
+ * @brief image resolution
+ */
+typedef struct {
+    int width;
+    int height;
+}VzResolution;
+
+/**
+ * @brief Supported resolutions.
+ */
+typedef struct
+{
+    int count;
+    VzResolution resolution[6];
+}VzResolutionList;
+
+/**
+ * @brief Camera intrinsic parameters and distortion coefficients.
+ */
+typedef struct
+{
+	double	fx;  //!< Focal length x (pixel)
+	double	fy;  //!< Focal length y (pixel)
+	double	cx;  //!< Principal point x (pixel)
+	double	cy;  //!< Principal point y (pixel)
+	double	k1;  //!< Radial distortion coefficient, 1st-order
+	double	k2;  //!< Radial distortion coefficient, 2nd-order
+	double	p1;  //!< Tangential distortion coefficient
+	double	p2;  //!< Tangential distortion coefficient
+	double	k3;  //!< Radial distortion coefficient, 3rd-order
+	double	k4;  //!< Radial distortion coefficient, 4st-order
+	double	k5;  //!< Radial distortion coefficient, 5nd-order
+	double	k6;  //!< Radial distortion coefficient, 6rd-order
+}VzSensorIntrinsicParameters;
+
+/** 
+ * @brief Extrinsic parameters defines the physical relationship form tof sensor to color sensor
+ */
+typedef struct
+{
+	double rotation[9];     //!< Orientation stored as an array of 9 double representing a 3x3 rotation matrix.
+	double translation[3];  //!< Location stored as an array of 3 double representing a 3-D translation vector.
+}VzSensorExtrinsicParameters;
+
+/**
+ * @brief Depth/IR/Color image frame data.
+ */
+typedef struct
+{
+	uint32_t       frameIndex;          //!< The index of the frame.
+	VzFrameType    frameType;           //!< The type of frame. See ::VzFrameType for more information.
+	VzPixelFormat  pixelFormat;         //!< The pixel format used by a frame. See ::VzPixelFormat for more information.
+	uint8_t*       pFrameData;          //!< A buffer containing the frame’s image data.
+	uint32_t       dataLen;             //!< The length of pFrame, in bytes.
+	float          exposureTime;        //!< The exposure time, in milliseconds.
+    uint8_t        depthRange;          //!< The depth range mode of the current frame. Used only for depth frames.
+	uint16_t       width;               //!< The width of the frame, in pixels.
+	uint16_t       height;              //!< The height of the frame, in pixels.
+    uint64_t       deviceTimestamp;     //!< The timestamp of the frame from the device.
+}VzFrame;
+
+typedef struct
+{
+	uint32_t depth : 1;
+	uint32_t ir : 1;
+	uint32_t color : 1;
+	uint32_t transformedColor : 1;
+	uint32_t transformedDepth : 1;
+	uint32_t confidence : 1;
+	uint32_t reserved : 26;
+}VzFrameReady;
+
+typedef void* VzDeviceHandle;
+
+typedef struct
+{
+	char productName[64];
+    char uri[256];
+	char alias[64];
+    char serialNumber[64];
+    char ip[17];
+	VzConnectStatus status;
+}VzDeviceInfo;
+
+typedef struct
+{
+	int threshold;//[0, 3],The larger the value is, the more obvious the filtering effect is and The smaller the point cloud wobble
+    bool enable;
+} VzTimeFilterParams;
+
+typedef struct
+{
+	int threshold;//[0, 100],The larger the value is, the more obvious the filtering effect is and the more points are filtered out
+    bool enable;
+} VzConfidenceFilterParams;
+
+typedef struct
+{
+    int	threshold;//[0, 49],The larger the value is, the more obvious the filtering effect is and the more points are filtered out
+    bool enable;
+} VzFlyingPixelFilterParams;
+
+typedef struct
+{
+    VzExposureControlMode mode;
+    int	exposureTime;              //When the control mode is AE,  exposureTime represents the maximum exposure time.
+                                   //When the control mode is Manual, exposureTime represents the current exposure time.
+} VzExposureTimeParams;
+
+
+
+/**
+ * @brief Error informations about the device
+ */
+typedef struct
+{
+    int errorCount;                     //The count of error messages, the maximum number is 10
+    char errorMessage[10][64];          //The maximum length of each error message is 64(contains '\0').
+} VzDeviceErrorInfo;
+
+typedef struct
+{	
+	uint16_t width;                      //[1,65535],The width of input signal.
+	uint16_t interval;                   //[34000,65535],The interval of input signal.
+	uint8_t polarity;                    //[0,1],0 for active low, 1 for active high.
+}VzInputSignalParamsForHWTrigger;        //Input signal parameters for Hardware Trigger.
+
+typedef struct
+{
+	uint16_t width;                      //[1,65535],The width of output signal.
+	uint16_t delay;                      //[0,65535],The delay time of output signal.
+	uint8_t polarity;                    //[0,1],0 for active low, 1 for active high.
+}VzOutputSignalParams;                   //Output signal parameters.
+
+#pragma pack (pop)
+
+/**
+* @brief hotplug status callback function
+* pInfo     return the info of the Device, See ::VzDeviceInfo
+* state     0:device added , 1:device removed
+* pUserData Pointer to user data, which can be null
+*/
+typedef void(*PtrHotPlugStatusCallback)(const VzDeviceInfo* pInfo, int state, void* pUserData);
+
+typedef void(*PtrUpgradeStatusCallback)(int status, int params, void* pUserData);
+
+#endif /* VZENSEDS_TYPES_H */

+ 13 - 0
Tof3DCamera/Ubuntu18.04/Lib/Config/DS77CLite_0F.json

@@ -0,0 +1,13 @@
+{
+    "productName": "DS77CLite",
+    "connectType":"socket",
+    "colorSensor": [
+        {
+            "type": "gc2053",
+            "resolutionList": ["1600_1200","800_600", "640_480"]
+        }    ],
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 13 - 0
Tof3DCamera/Ubuntu18.04/Lib/Config/DS77CPro_0E.json

@@ -0,0 +1,13 @@
+{
+    "productName": "DS77CPro",
+    "connectType":"socket",
+    "colorSensor": [
+        {
+            "type": "gc2053",
+            "resolutionList": ["1600_1200","800_600", "640_480"]
+        }    ],
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 8 - 0
Tof3DCamera/Ubuntu18.04/Lib/Config/DS77Lite_11.json

@@ -0,0 +1,8 @@
+{
+    "productName": "DS77Lite",
+    "connectType":"socket",
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 8 - 0
Tof3DCamera/Ubuntu18.04/Lib/Config/DS77Pro_10.json

@@ -0,0 +1,8 @@
+{
+    "productName": "DS77Pro",
+    "connectType":"socket",
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 13 - 0
Tof3DCamera/Ubuntu18.04/Lib/Config/DS86_12.json

@@ -0,0 +1,13 @@
+{
+    "productName": "DS86",
+    "connectType":"socket",
+    "colorSensor": [
+    {
+      "type": "gc2053",
+      "resolutionList": [ "1600_1200", "800_600", "640_480" ]
+    }    ],
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 13 - 0
Tof3DCamera/Ubuntu18.04/Lib/Config/DS87_13.json

@@ -0,0 +1,13 @@
+{
+    "productName": "DS87",
+    "connectType":"socket",
+    "colorSensor": [
+    {
+      "type": "gc2053",
+      "resolutionList": [ "1600_1200", "800_600", "640_480" ]
+    }    ],
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 1 - 0
Tof3DCamera/Ubuntu18.04/Lib/libNebula_api.so.1.2

@@ -0,0 +1 @@
+libNebula_api.so.1.2.4

BIN
Tof3DCamera/Ubuntu18.04/Lib/libNebula_api.so.1.2.4


+ 283 - 0
Tof3DCamera/VzenseDS_api.py

@@ -0,0 +1,283 @@
+from Tof3DCamera.VzenseDS_define import *
+import platform
+import os
+import ctypes
+from ctypes import *
+gCallbackFuncList=[]
+
+class VzenseTofCam():
+    device_handle = c_void_p(0)
+    def __init__(self):
+        system_ = platform.system().lower()
+        machine_ = platform.machine().lower()
+        architecture_ = platform.architecture()[0]
+        print('system:',system_)
+        print('machine_:',machine_)
+        print('architecture:',architecture_)
+        if system_ == 'linux':
+            if machine_ == 'x86_64':
+                os_info = os.uname()
+                print('os_info:',type(os_info))
+                system_info = os_info.version
+                print('version:',system_info)
+                if system_info.find('18.04') != -1 or system_info.find('20.04') != -1:
+                    libpath = os.path.dirname(os.path.abspath(__file__))+"/Ubuntu18.04/Lib/libNebula_api.so"
+                    print("load lib from ", libpath)
+                    self.vz_cam_lib = cdll.LoadLibrary(libpath)
+                else:
+                    libpath = os.path.dirname(os.path.abspath(__file__))+"/Ubuntu16.04/Lib/libNebula_api.so"
+                    print(libpath)
+                    self.vz_cam_lib = cdll.LoadLibrary(libpath)
+            elif machine_ == 'aarch64':
+                libpath = os.path.dirname(os.path.abspath(__file__))+"/AArch64/Lib/libNebula_api.so"
+                print(libpath)
+                self.vz_cam_lib = cdll.LoadLibrary(libpath)
+            else:
+                print('do not supported OS', system_, machine_)
+                exit()
+        elif platform.system() == 'Windows':
+            if machine_ == 'amd64':
+                if architecture_ == '64bit':
+                    libpath = os.path.dirname(os.path.abspath(__file__))+"/Windows/Bin/x64/Nebula_api.dll"
+                    print(libpath)
+                    self.vz_cam_lib = cdll.LoadLibrary(libpath)
+                else:
+                    libpath = os.path.dirname(os.path.abspath(__file__))+"/Windows/Bin/x86/Nebula_api.dll"
+                    print(libpath)
+                    self.vz_cam_lib = cdll.LoadLibrary(libpath)
+            else:
+                print('do not supported OS', system_, machine_)
+                exit()
+        else:
+            print('do not supported OS', system_, machine_)
+            exit()
+            
+        self.device_handle = c_void_p(0)
+        self.vz_cam_lib.VZ_Initialize()
+        
+    def __del__(self):
+        self.vz_cam_lib.VZ_Shutdown()
+    
+    def VZ_GetSDKVersion(self): 
+        tmp = c_char * 64
+        version = tmp()
+        return self.vz_cam_lib.VZ_GetSDKVersion(version),version.value
+ 
+    def VZ_GetDeviceCount(self):
+        count = c_int()
+        self.vz_cam_lib.VZ_GetDeviceCount(byref(count))
+        return count.value
+    
+    def VZ_GetDeviceInfoList(self, cam_count = 1):
+        tmp  = VzDeviceInfo* cam_count
+        device_infolist = tmp() 
+        return self.vz_cam_lib.VZ_GetDeviceInfoList(cam_count, device_infolist),device_infolist
+    
+    def VZ_GetDeviceInfo(self, cam_index = 0):
+        device_info = VzDeviceInfo()
+        return self.vz_cam_lib.VZ_GetDeviceInfo(cam_index,byref(device_info)), device_info
+         
+    def VZ_OpenDeviceByUri(self,  uri=c_char_p()):
+        if uri:
+            return self.vz_cam_lib.VZ_OpenDeviceByUri(uri, byref(self.device_handle))
+        else:
+            return VzReturnStatus.VzRetInputPointerIsNull
+    
+    def VZ_OpenDeviceByAlias(self,  alias=c_char_p()):
+        if alias:
+            return self.vz_cam_lib.VZ_OpenDeviceByAlias(alias, byref(self.device_handle))
+        else:
+            return VzReturnStatus.VzRetInputPointerIsNull
+    
+    def VZ_OpenDeviceByIP(self,  ip=c_char_p()):
+        if ip:
+            return self.vz_cam_lib.VZ_OpenDeviceByIP(ip, byref(self.device_handle))
+        else:
+            return VzReturnStatus.VzRetInputPointerIsNull, 0
+        
+    def VZ_CloseDevice(self):
+        return self.vz_cam_lib.VZ_CloseDevice(byref(self.device_handle))
+
+    def VZ_StartStream(self):
+        return self.vz_cam_lib.VZ_StartStream(self.device_handle)
+         
+    def VZ_StopStream(self):
+        return self.vz_cam_lib.VZ_StopStream(self.device_handle)
+         
+    def VZ_GetFrameReady(self,waitTime = c_uint16(33)):
+        frameready = VzFrameReady()
+        return self.vz_cam_lib.VZ_GetFrameReady(self.device_handle, waitTime, byref(frameready)), frameready
+
+    def VZ_GetFrame(self,  frametype = VzFrameType.VzDepthFrame):   
+        Vzframe = VzFrame() 
+        return self.vz_cam_lib.VZ_GetFrame(self.device_handle, frametype.value, byref(Vzframe)), Vzframe
+       
+    def VZ_SetWorkMode(self,  mode = VzWorkMode.ActiveMode):
+        return self.vz_cam_lib.VZ_SetWorkMode(self.device_handle, mode.value) 
+               
+    def VZ_GetWorkMode(self):
+        mode = VzWorkMode(0)
+        return self.vz_cam_lib.VZ_GetWorkMode(self.device_handle, byref(mode)), mode
+
+    def VZ_SetSoftwareSlaveTrigger(self):
+        return self.vz_cam_lib.VZ_SetSoftwareSlaveTrigger(self.device_handle)
+    
+    def VZ_RebootDevie(self):
+        return self.vz_cam_lib.VZ_RebootDevie(self.device_handle)
+    
+    def VZ_GetSensorIntrinsicParameters(self, sensorType = VzSensorType.VzToFSensor):
+        CameraParameters = VzSensorIntrinsicParameters()
+        return self.vz_cam_lib.VZ_GetSensorIntrinsicParameters(self.device_handle, sensorType.value, byref(CameraParameters)), CameraParameters
+
+    def VZ_GetSensorExtrinsicParameters(self):
+        CameraExtrinsicParameters = VzSensorExtrinsicParameters()
+        return self.vz_cam_lib.VZ_GetSensorExtrinsicParameters(self.device_handle, byref(CameraExtrinsicParameters)), CameraExtrinsicParameters
+    
+    def VZ_GetFirmwareVersion(self): 
+        tmp = c_char * 64
+        fw = tmp()
+        return self.vz_cam_lib.VZ_GetFirmwareVersion(self.device_handle, fw, 63),fw.value
+
+    def VZ_GetDeviceMACAddress(self):
+        tmp = c_char * 18
+        mac = tmp()
+        return self.vz_cam_lib.VZ_GetDeviceMACAddress(self.device_handle, mac), mac.value
+
+    def VZ_SetIRGMMGain(self, gmmgain = c_uint8(20)):
+        return self.vz_cam_lib.VZ_SetIRGMMGain(self.device_handle, gmmgain) 
+     
+    def VZ_GetIRGMMGain(self):
+        gmmgain = c_uint8(1)
+        return self.vz_cam_lib.VZ_GetIRGMMGain(self.device_handle, byref(gmmgain)), gmmgain.value
+
+    def VZ_SetColorPixelFormat(self,pixelFormat=VzPixelFormat.VzPixelFormatBGR888):
+        return self.vz_cam_lib.VZ_SetColorPixelFormat(self.device_handle, pixelFormat)
+
+    def VZ_SetColorResolution(self, w = c_int32(1600), h = c_int32(1200)):
+        return self.vz_cam_lib.VZ_SetColorResolution(self.device_handle, w, h) 
+     
+    def VZ_GetColorResolution(self):
+        w = c_int32(1600)
+        h = c_int32(1200)
+        return self.vz_cam_lib.VZ_GetColorResolution(self.device_handle, byref(w), byref(h)), w, h
+        
+    def VZ_SetFrameRate(self, value = c_uint8(30)):
+        return self.vz_cam_lib.VZ_SetFrameRate(self.device_handle, value) 
+     
+    def VZ_GetFrameRate(self):
+        value = c_uint8(1)
+        return self.vz_cam_lib.VZ_GetFrameRate(self.device_handle, byref(value)), value.value
+
+    def VZ_SetExposureControlMode(self, sensorType = VzSensorType.VzToFSensor, mode = VzExposureControlMode.VzExposureControlMode_Manual):
+        return self.vz_cam_lib.VZ_SetExposureControlMode(self.device_handle, sensorType.value, mode.value) 
+    
+    def VZ_SetExposureTime(self, sensorType = VzSensorType.VzToFSensor, params = c_int32(0)):
+        ExposureTime = VzExposureTimeParams(VzExposureControlMode.VzExposureControlMode_Manual.value,params) 
+        return self.vz_cam_lib.VZ_SetExposureTime(self.device_handle, sensorType.value, ExposureTime) 
+     
+    def VZ_GetExposureTime(self, sensorType = VzSensorType.VzToFSensor):
+        params = VzExposureTimeParams(VzExposureControlMode.VzExposureControlMode_Manual.value,0)
+        return self.vz_cam_lib.VZ_GetExposureTime(self.device_handle, sensorType.value, byref(params)), params
+ 
+    def VZ_SetTimeFilterParams(self, params = VzTimeFilterParams()): 
+        return self.vz_cam_lib.VZ_SetTimeFilterParams(self.device_handle, params)
+    
+    def VZ_GetTimeFilterParams(self): 
+        params = VzTimeFilterParams()
+        return self.vz_cam_lib.VZ_GetTimeFilterParams(self.device_handle, byref(params)),params
+
+    def VZ_SetConfidenceFilterParams(self, params = VzConfidenceFilterParams()): 
+        return self.vz_cam_lib.VZ_SetConfidenceFilterParams(self.device_handle, params)
+    
+    def VZ_GetConfidenceFilterParams(self): 
+        params = VzConfidenceFilterParams()
+        return self.vz_cam_lib.VZ_GetConfidenceFilterParams(self.device_handle, byref(params)),params
+    
+    def VZ_SetFlyingPixelFilterParams(self, params = VzFlyingPixelFilterParams()): 
+        return self.vz_cam_lib.VZ_SetFlyingPixelFilterParams(self.device_handle, params)
+    
+    def VZ_GetFlyingPixelFilterParams(self): 
+        params = VzFlyingPixelFilterParams()
+        return self.vz_cam_lib.VZ_GetFlyingPixelFilterParams(self.device_handle, byref(params)),params
+
+    def VZ_SetFillHoleFilterEnabled(self, enable = c_bool(True)): 
+        return self.vz_cam_lib.VZ_SetFillHoleFilterEnabled(self.device_handle, enable)
+    
+    def VZ_GetFillHoleFilterEnabled(self): 
+        enable = c_bool(True)
+        return self.vz_cam_lib.VZ_GetFillHoleFilterEnabled(self.device_handle, byref(enable)),enable.value
+
+    def VZ_SetSpatialFilterEnabled(self, enable = c_bool(True)): 
+        return self.vz_cam_lib.VZ_SetSpatialFilterEnabled(self.device_handle, enable)
+    
+    def VZ_GetSpatialFilterEnabled(self): 
+        enable = c_bool(True)
+        return self.vz_cam_lib.VZ_GetSpatialFilterEnabled(self.device_handle, byref(enable)),enable.value
+
+    def VZ_SetTransformColorImgToDepthSensorEnabled(self, enabled = c_bool(True)): 
+        return self.vz_cam_lib.VZ_SetTransformColorImgToDepthSensorEnabled(self.device_handle,  enabled)
+    
+    def VZ_GetTransformColorImgToDepthSensorEnabled(self): 
+        enabled = c_bool(True)
+        return self.vz_cam_lib.VZ_GetTransformColorImgToDepthSensorEnabled(self.device_handle,  byref(enabled)),enabled
+
+    def VZ_SetTransformDepthImgToColorSensorEnabled(self, enabled = c_bool(True)): 
+        return self.vz_cam_lib.VZ_SetTransformDepthImgToColorSensorEnabled(self.device_handle,  enabled)
+    
+    def VZ_GetTransformDepthImgToColorSensorEnabled(self): 
+        enabled = c_bool(True)
+        return self.vz_cam_lib.VZ_GetTransformDepthImgToColorSensorEnabled(self.device_handle,  byref(enabled)),enabled
+
+    def VZ_ConvertDepthFrameToPointCloudVector(self, depthFrame = VzFrame()): 
+        len = depthFrame.width*depthFrame.height
+        tmp =VzVector3f*len
+        pointlist = tmp()
+        return self.vz_cam_lib.VZ_ConvertDepthFrameToPointCloudVector(self.device_handle, byref(depthFrame) ,pointlist),pointlist
+ 
+    def VZ_SetHotPlugStatusCallback(self,callbackfunc= c_void_p): 
+        callbackFunc_= ctypes.CFUNCTYPE(c_void_p,POINTER(VzDeviceInfo),c_int32)(callbackfunc)    
+        gCallbackFuncList.append(callbackFunc_)
+        return self.vz_cam_lib.VZ_SetHotPlugStatusCallback(callbackFunc_)
+
+    def VZ_GetManaulMaxExposureTime(self):     
+        tmp = r"Py_ToFExposureTimeMax"
+        propertyKey = (c_char * 100)(*bytes(tmp, 'utf-8')) 
+        maxExposureTime = VzExposureTimeParams(VzExposureControlMode.VzExposureControlMode_Manual.value) 
+        return self.vz_cam_lib.VZ_GetProperty(self.device_handle,   byref(propertyKey),  byref(maxExposureTime),8),maxExposureTime.exposureTime
+
+    def VZ_SetParamsByJson(self, imgpath):
+        pimgpath = (c_char * 1000)(*bytes(imgpath, 'utf-8'))
+        return self.vz_cam_lib.VZ_SetParamsByJson(self.device_handle,  byref(pimgpath))
+
+    def VZ_SetColorGain(self, params = c_float(1.0)):
+        return self.vz_cam_lib.VZ_SetColorGain(self.device_handle,  params)
+
+    def VZ_GetColorGain(self):
+        tmp = c_float*1
+        params = tmp()
+        return self.vz_cam_lib.VZ_GetColorGain(self.device_handle,  params), params
+
+    def VZ_GetProperty(self, propertyKey=c_char_p(), pData= c_void_p, dataSize = c_int32(8)):
+        return self.vz_cam_lib.VZ_GetProperty(self.device_handle,  propertyKey, pData, dataSize),pData
+
+    def VZ_GetAutoMaxExposureTime(self):
+        tmp = r"Py_RGBExposureTimeMax"
+        propertyKey = (c_char * 100)(*bytes(tmp, 'utf-8'))
+        maxExposureTime = VzExposureTimeParams(VzExposureControlMode.VzExposureControlMode_Auto.value)
+        return self.vz_cam_lib.VZ_GetProperty(self.device_handle, byref(propertyKey), byref(maxExposureTime),
+                                              8), maxExposureTime.exposureTime
+
+    def VZ_GetManualMaxExposureTime(self):
+        tmp = r"Py_RGBExposureTimeMax"
+        propertyKey = (c_char * 100)(*bytes(tmp, 'utf-8'))
+        maxExposureTime = VzExposureTimeParams(VzExposureControlMode.VzExposureControlMode_Manual.value)
+        return self.vz_cam_lib.VZ_GetProperty(self.device_handle, byref(propertyKey), byref(maxExposureTime),
+                                              8), maxExposureTime.exposureTime
+
+    def VZ_SetAutoExposureTime(self, sensorType = VzSensorType.VzColorSensor, params = c_int32(0)):
+        ExposureTime = VzExposureTimeParams(VzExposureControlMode.VzExposureControlMode_Auto.value,params)
+        return self.vz_cam_lib.VZ_SetExposureTime(self.device_handle, sensorType.value, ExposureTime)
+
+    def VZ_GetAutoExposureTime(self, sensorType = VzSensorType.VzColorSensor):
+        params = VzExposureTimeParams(VzExposureControlMode.VzExposureControlMode_Auto.value,0)
+        return self.vz_cam_lib.VZ_GetExposureTime(self.device_handle, sensorType.value, byref(params)), params

+ 3 - 0
Tof3DCamera/VzenseDS_define.py

@@ -0,0 +1,3 @@
+from Tof3DCamera.VzenseDS_enums import *
+from Tof3DCamera.VzenseDS_types import *
+ 

+ 81 - 0
Tof3DCamera/VzenseDS_enums.py

@@ -0,0 +1,81 @@
+import os, platform, numpy
+from ctypes import *
+from enum import Enum
+
+class VzFrameType(Enum):
+    VzDepthFrame       = 0     
+    VzIRFrame          = 1
+    VzColorFrame = 3
+    VzTransformColorImgToDepthSensorFrame = 4
+    VzTransformDepthImgToColorSensorFrame = 5
+    VzConfidenceFrame  = 8 	
+        
+class VzSensorType(Enum):
+    VzToFSensor = 0x01
+    VzColorSensor = 0x02
+    
+class VzPixelFormat(Enum):
+    VzPixelFormatDepthMM16 = 0
+    VzPixelFormatGray8     = 2   
+    VzPixelFormatRGB888    = 3
+    VzPixelFormatBGR888    = 4   
+
+class VzReturnStatus(Enum):
+    VzRetOK                         =  0
+    VzRetNoDeviceConnected          = -1
+    VzRetInvalidDeviceIndex         = -2
+    VzRetDevicePointerIsNull        = -3
+    VzRetInvalidFrameType           = -4
+    VzRetFramePointerIsNull         = -5
+    VzRetNoPropertyValueGet         = -6
+    VzRetNoPropertyValueSet         = -7
+    VzRetPropertyPointerIsNull      = -8
+    VzRetPropertySizeNotEnough      = -9
+    VzRetInvalidDepthRange          = -10
+    VzRetGetFrameReadyTimeOut       = -11
+    VzRetInputPointerIsNull         = -12
+    VzRetCameraNotOpened            = -13
+    VzRetInvalidCameraType          = -14
+    VzRetInvalidParams              = -15
+    VzRetCurrentVersionNotSupport   = -16
+    VzRetUpgradeImgError            = -17
+    VzRetUpgradeImgPathTooLong      = -18
+    VzRetUpgradeCallbackNotSet		= -19
+    VzRetNoAdapterConnected			= -100
+    VzRetReInitialized				= -101
+    VzRetNoInitialized				= -102
+    VzRetCameraOpened				= -103
+    VzRetCmdError					= -104
+    VzRetCmdSyncTimeOut				= -105
+    VzRetIPNotMatch					= -106
+    VzRetNotStopStream              = -107
+    VzRetNotStartStream             = -108
+    VzRetOthers                     = -255
+    
+class VzConnectStatus(Enum):
+    ConnectUNKNOWN   = 0
+    Unconnected      = 1
+    Connected        = 2
+    Opened           = 3
+    UpgradeUnconnected = 4
+    UpgradeConnected = 5
+
+class VzDeviceType(Enum):
+    NONE      = 0
+    DS77Lite  = 0x0E
+    DS77CLite = 0x0F
+    DS77Pro   = 0x10
+    DS77CPro  = 0x11
+    DS86      = 0x12
+    DS87      = 0x13
+
+class VzWorkMode(Enum):
+    ActiveMode          = 0x00
+    HardwareTriggerMode = 0x01
+    SoftwareTriggerMode = 0x02
+    
+class VzExposureControlMode(Enum):
+    VzExposureControlMode_Auto   = 0
+    VzExposureControlMode_Manual = 1
+ 
+

+ 114 - 0
Tof3DCamera/VzenseDS_types.py

@@ -0,0 +1,114 @@
+import os, platform, numpy
+from ctypes import *
+from enum import Enum
+ 
+
+class VzRGB888Pixel(Structure):
+    _pack_ = 1
+    _fields_ = [("r", c_uint8),
+                ("g", c_uint8),
+                ("b", c_uint8)]
+
+class VzBGR888Pixel(Structure):
+    _pack_ = 1
+    _fields_ = [("g", c_uint8),
+                ("g", c_uint8),
+                ("r", c_uint8)]
+
+class VzVector3f(Structure):
+    _pack_ = 1
+    _fields_ = [("x", c_float),
+                ("y", c_float),
+                ("z", c_float)]  
+
+class VzVector2u16(Structure):
+    _pack_ = 1
+    _fields_ = [("x", c_uint16),
+                ("y", c_uint16)]  
+
+class VzDepthVector3(Structure):
+    _pack_ = 1
+    _fields_ = [("depthX", c_int),
+                ("depthY", c_int),
+                ("depthZ", c_uint16)] 
+
+class VzSensorIntrinsicParameters(Structure):
+    _pack_ = 1
+    _fields_ = [("fx", c_double),
+                ("fy", c_double),
+                ("cx", c_double),
+                ("cy", c_double),
+                ("k1", c_double),
+                ("k2", c_double),
+                ("p1", c_double),
+                ("p2", c_double),
+                ("k3", c_double),
+                ("k4", c_double),
+                ("k5", c_double),
+                ("k6", c_double)] 
+
+class VzSensorExtrinsicParameters(Structure):
+    _pack_ = 1
+    _fields_ = [("rotation", c_double * 9),
+                ("translation", c_double * 3)]  
+
+class VzTimeStamp(Structure):
+    _pack_ = 1       
+    _fields_ = [("tm_sec", c_uint16),
+                ("tm_min", c_uint16),
+                ("tm_hour", c_uint16),
+                ("tm_msec", c_uint16)]     
+
+class VzFrame(Structure):
+    _pack_ = 1
+    _fields_ = [("frameIndex", c_uint32),
+                ("frameType", c_int32),
+                ("pixelFormat", c_int32),
+                ("pFrameData", POINTER(c_uint8)),
+                ("dataLen", c_uint32),
+                ("exposureTime", c_float),
+                ("depthRange", c_uint8),
+                ("width", c_uint16),
+                ("height", c_uint16),
+                ("hardwaretimestamp", c_uint64)]
+
+class VzFrameReady(Structure):
+    _pack_ = 1
+    _fields_ = [("depth", c_uint, 1),
+                ("ir", c_uint, 1),
+                ("color", c_uint, 1),
+                ("transformedColor", c_uint, 1),
+                ("transformedDepth", c_uint, 1),
+                ("transformedIR", c_uint, 1),
+                ("confidence", c_uint, 1),
+                ("reserved", c_uint, 25)]
+
+class VzDeviceInfo(Structure):
+    _pack_ = 1
+    _fields_ = [("productName", c_char * 64),
+                ("uri", c_char * 256),
+                ("alias", c_char * 64),                
+                ("serialNumber", c_char * 64),
+                ("ip", c_char * 17),
+                ("status", c_int32)]
+
+class VzConfidenceFilterParams(Structure):
+    _pack_ = 1
+    _fields_ = [("threshold", c_int32),
+                ("enable", c_bool)]
+
+class VzFlyingPixelFilterParams(Structure):
+    _pack_ = 1
+    _fields_ = [("threshold", c_int32),
+                ("enable", c_bool)]
+
+class VzTimeFilterParams(Structure):
+    _pack_ = 1
+    _fields_ = [("threshold", c_int32),
+                ("enable", c_bool)]
+
+class VzExposureTimeParams(Structure):
+    _pack_ = 1
+    _fields_ = [("mode", c_int32),
+                ("exposureTime", c_int32)]
+ 

+ 13 - 0
Tof3DCamera/Windows/Bin/x64/Config/DS77CLite_0F.json

@@ -0,0 +1,13 @@
+{
+    "productName": "DS77CLite",
+    "connectType":"socket",
+    "colorSensor": [
+        {
+            "type": "gc2053",
+            "resolutionList": ["1600_1200","800_600", "640_480"]
+        }    ],
+    "toFSensor": [
+        {
+            "type": "sony_cw_2022"
+        }]
+}

+ 0 - 0
Tof3DCamera/Windows/Bin/x64/Config/DS77CPro_0E.json


Some files were not shown because too many files changed in this diff