### Start Device Streams for Multi-Device Synchronization Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-MultiDeviceSync/MultiDeviceSync_EN.md This example demonstrates starting data streams for secondary and primary devices. It's recommended to start the secondary device streams first, followed by a delay, and then start the primary device streams to ensure proper synchronization and avoid signal loss. ```cpp std::cout << "Secondary devices start..." << std::endl; int deviceIndex = 0; // Sencondary device display first for(auto itr = secondary_devices.begin(); itr != secondary_devices.end(); itr++) { auto depthHolder = createPipelineHolder(*itr, OB_SENSOR_DEPTH, deviceIndex); pipelineHolderList.push_back(depthHolder); startStream(depthHolder); auto colorHolder = createPipelineHolder(*itr, OB_SENSOR_COLOR, deviceIndex); pipelineHolderList.push_back(colorHolder); startStream(colorHolder); deviceIndex++; } // Delay and wait for 5s to ensure that the initialization of the slave device is completed std::this_thread::sleep_for(std::chrono::milliseconds(5000)); std::cout << "Primary device start..." << std::endl; deviceIndex = secondary_devices.size(); // Primary device display after primary devices. for(auto itr = primary_devices.begin(); itr != primary_devices.end(); itr++) { auto depthHolder = createPipelineHolder(*itr, OB_SENSOR_DEPTH, deviceIndex); startStream(depthHolder); pipelineHolderList.push_back(depthHolder); auto colorHolder = createPipelineHolder(*itr, OB_SENSOR_COLOR, deviceIndex); startStream(colorHolder); pipelineHolderList.push_back(colorHolder); deviceIndex++; } ``` -------------------------------- ### start (no args) Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Pipeline-members.html Starts the pipeline with default configuration. ```APIDOC ## start() ### Description Starts the pipeline with default configuration. ### Method [Method details not provided in source] ### Endpoint [Endpoint details not provided in source] ### Parameters [No parameters documented] ### Request Example [No request example provided] ### Response [No response details provided] ``` -------------------------------- ### start (with Config) Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Pipeline-members.html Starts the pipeline with a specified configuration. ```APIDOC ## start(std::shared_ptr< Config > config) ### Description Starts the pipeline with a specified configuration. ### Method [Method details not provided in source] ### Endpoint [Endpoint details not provided in source] ### Parameters #### Path Parameters - **config** (std::shared_ptr< Config >) - Description not provided in source ### Request Example [No request example provided] ### Response [No response details provided] ``` -------------------------------- ### start Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Playback-members.html Starts playback with a callback and optional media type. ```APIDOC ## start ### Description Starts playback with a callback and optional media type. ### Method [Method not specified in source] ### Endpoint [Endpoint not specified in source] ### Parameters #### Path Parameters - **callback** (PlaybackCallback) - Required - The callback function to be invoked during playback. - **type** (OBMediaType) - Optional - The type of media to play. Defaults to OB_MEDIA_ALL. ### Request Example [No request example provided in source] ### Response #### Success Response (200) [Response details not specified in source] #### Response Example [No response example provided in source] ``` -------------------------------- ### start (with Config and Callback) Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Pipeline-members.html Starts the pipeline with a specified configuration and a frame set callback. ```APIDOC ## start(std::shared_ptr< Config > config, FrameSetCallback callback) ### Description Starts the pipeline with a specified configuration and a frame set callback. ### Method [Method details not provided in source] ### Endpoint [Endpoint details not provided in source] ### Parameters #### Path Parameters - **config** (std::shared_ptr< Config >) - Description not provided in source - **callback** (FrameSetCallback) - Description not provided in source ### Request Example [No request example provided] ### Response [No response details provided] ``` -------------------------------- ### Start Pipeline Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-HdrMerge/README.md Starts the data pipeline using the previously configured settings. ```cpp pipe.start(config); ``` -------------------------------- ### Start Pipeline Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-DepthViewer/README.md Start the pipeline with the specified configuration to begin data generation. ```cpp pipe.start(config); ``` -------------------------------- ### Start Pipeline Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Pipeline.html Starts the pipeline with the specified configuration parameters. ```APIDOC ## start(std::shared_ptr config) ### Description Starts the pipeline with configuration parameters. ### Parameters - **config** (std::shared_ptr) - The parameter configuration of the pipeline. ``` -------------------------------- ### Start Pipeline Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/c/Sample-PointCloud/README.md Starts the configured pipeline to begin data streaming from the device. ```c ob_pipeline_start_with_config(pipeline, config, &error); ``` -------------------------------- ### CMakeLists.txt Configuration Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-QuickStart/CMakeLists.txt This snippet defines the build configuration for the Orbbec SDK QuickStart project. It sets the minimum required CMake version, project name, links the Orbbec SDK libraries, and specifies include directories for both build and install targets. ```cmake cmake_minimum_required(VERSION 3.1.15) project(OBQuickStart) add_executable(${PROJECT_NAME} QuickStart.cpp) target_link_libraries(${PROJECT_NAME} ${OrbbecSDK_LIBS} ) target_include_directories(${PROJECT_NAME} PUBLIC $ $ $ ${OrbbecSDK_INCLUDE_DIRS} ) ``` -------------------------------- ### Command-line Start Device Streams Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-MultiDeviceSync/MultiDeviceSync_EN.md Run 'MultiDeviceSync.exe' and select option '1' to start the depth and RGB data streams for the configured devices. This is the recommended method after initial configuration. ```bash Please select options: 0 --> config devices 1 --> start stream input: 1 start secondary devices... start primary devices... ``` -------------------------------- ### Start Pipeline C++ Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-ColorViewer/README.md Start the pipeline with the specified configuration to begin data streaming. ```cpp // Start the pipeline with config pipe.start(config); ``` -------------------------------- ### Start Pipeline with Configuration Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/c/Sample-AlignFilterViewer/README.md Starts the Orbbec SDK pipeline using the previously created configuration, which includes enabled streams and alignment settings. ```c // Start the pipeline with config ob_pipeline_start_with_config(pipeline, config, &error); check_error(error); ``` -------------------------------- ### start Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/functions_s.html Starts the operation of a Pipeline, Playback, Recorder, or Sensor. ```APIDOC ## start() ### Description Starts the operation of a Pipeline, Playback, Recorder, or Sensor. ### Method (Not specified, likely a member function of a class) ### Endpoint (Not applicable for SDK functions) ### Parameters (Not specified in the source) ### Request Example (Not specified in the source) ### Response (Not specified in the source) ``` -------------------------------- ### start Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/functions_func_s.html Starts the operation of a pipeline, playback, recorder, or sensor. ```APIDOC ## start ### Description Starts the operation of a pipeline, playback, recorder, or sensor. ### Method [Method signature or type not specified in source] ### Endpoint [Endpoint not specified in source] ### Parameters [Parameters not specified in source] ### Request Example [Request example not specified in source] ### Response [Response details not specified in source] ``` -------------------------------- ### Start Pipeline Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-SaveToDisk/README.md Starts the configured OrbbecSDK pipeline to begin streaming data. ```cpp pipeline.start( config ); ``` -------------------------------- ### Start Pipeline Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-AlignFilterViewer/README.md Starts the Orbbec SDK pipeline using the provided configuration, enabling data streaming. ```cpp pipe.start(config); ``` -------------------------------- ### Start Pipeline Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-PointCloud/README.md Starts the configured pipeline to begin streaming data. Ensure all configurations are set before calling this method. ```cpp pipeline.start( config ); ``` -------------------------------- ### startRecord Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/functions_s.html Starts recording for a Pipeline. ```APIDOC ## startRecord() ### Description Starts recording for a Pipeline. ### Method (Not specified, likely a member function of a class) ### Endpoint (Not applicable for SDK functions) ### Parameters (Not specified in the source) ### Request Example (Not specified in the source) ### Response (Not specified in the source) ``` -------------------------------- ### Start Stream and Recording Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-Recorder/README.md Start the pipeline with the specified configuration. Simultaneously, begin recording the video stream to a file named 'OrbbecPipeline.bag'. If no configuration is provided, default settings are used. ```cpp pipe.start(config); pipe.startRecord("./OrbbecPipeline.bag"); ``` -------------------------------- ### ob_pipeline_start_with_config Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/Pipeline_8h.html Start the pipeline with configuration parameters. ```APIDOC ## ob_pipeline_start_with_config ### Description Start the pipeline with configuration parameters. ### Signature ```c void ob_pipeline_start_with_config(ob_pipeline *pipeline, ob_config *config, ob_error **error) ``` ### Parameters #### Pipeline - **pipeline** (ob_pipeline *) - Pointer to the `ob_pipeline` object to start. #### Configuration - **config** (ob_config *) - Pointer to an `ob_config` structure containing the desired configuration. #### Error Parameter - **error** (ob_error **) - Pointer to an ob_error structure to store any error information. ``` -------------------------------- ### start Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Sensor-members.html Starts streaming data from the sensor with a specified stream profile and callback. ```APIDOC ## start ### Description Starts streaming data from the sensor with a specified stream profile and callback. ### Method [Method not specified in source] ### Endpoint [Endpoint not specified in source] ### Parameters * **streamProfile** (std::shared_ptr< StreamProfile >) - Required - The stream profile to use for streaming. * **callback** (FrameCallback) - Required - The callback function to be invoked when a frame is received. ### Request Example None specified. ### Response None specified. ### Response Example None specified. ``` -------------------------------- ### Start Infrared Pipeline Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/c/Sample-InfraredViewer/README.md Initiates the infrared stream by starting the pipeline with the previously configured settings. Ensure the configuration is valid before calling this function. ```c // Start the pipeline with config ob_pipeline_start_with_config(pipeline, config, &error); check_error(error); ``` -------------------------------- ### startRecord Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/functions_func_s.html Starts recording within a pipeline. ```APIDOC ## startRecord ### Description Starts recording within a pipeline. ### Method [Method signature or type not specified in source] ### Endpoint [Endpoint not specified in source] ### Parameters [Parameters not specified in source] ### Request Example [Request example not specified in source] ### Response [Response details not specified in source] ``` -------------------------------- ### ob_pipeline_start Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/Pipeline_8h.html Start the pipeline with default parameters. ```APIDOC ## ob_pipeline_start ### Description Start the pipeline with default parameters. ### Signature ```c void ob_pipeline_start(ob_pipeline *pipeline, ob_error **error) ``` ### Parameters #### Pipeline - **pipeline** (ob_pipeline *) - Pointer to the `ob_pipeline` object to start. #### Error Parameter - **error** (ob_error **) - Pointer to an ob_error structure to store any error information. ``` -------------------------------- ### Start Pipeline with Configuration Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/c/Sample-DoubleInfraredViewer/README.md Starts the OrbbecSDK pipeline using the previously configured settings. This call initiates data streaming from the enabled sensors. ```c ob_pipeline_start_with_config(pipeline, config, &error); check_error(error); ``` -------------------------------- ### startRecord Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Pipeline-members.html Starts recording the pipeline output to a file. ```APIDOC ## startRecord ### Description Starts recording the pipeline output to a file. ### Method [Method details not provided in source] ### Endpoint [Endpoint details not provided in source] ### Parameters #### Path Parameters - **filename** (const char *) - Description not provided in source ### Request Example [No request example provided] ### Response [No response details provided] ``` -------------------------------- ### Start Pipeline with Callback Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-MultiStream/README.md Starts the main pipeline with the specified configuration and registers a callback to process incoming frames. Frames are stored in a map keyed by frame type. ```cpp // Start the pipeline with config std::mutex frameMutex; std::map> frameMap; pipe.start(config, [&](std::shared_ptr frameset) { auto count = frameset->frameCount(); for(int i = 0; i < count; i++) { auto frame = frameset->getFrame(i); std::unique_lock lk(frameMutex); frameMap[frame->type()] = frame; } }); ``` -------------------------------- ### Start Pipeline with Callback Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-NetDevice/README.md Start the pipeline with the specified configuration and a callback function to process incoming framesets. The callback uses a mutex to safely update the current frameset. ```cpp // Pass in the configuration and start the pipeline pipe->start(config, [&](std::shared_ptr frameSet) { std::lock_guard lock(frameSetMutex); currentFrameSet = frameSet; }); ``` -------------------------------- ### ob_recorder_start Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/RecordPlayback_8h.html Starts the recording process. ```APIDOC ## ob_recorder_start ### Description Start recording. ### Parameters - **recorder** (ob_recorder*) - in - Pointer to the recorder object. - **filename** (const char*) - in - Recorded file name. - **async** (bool) - in - Whether to record asynchronously. - **error** (ob_error**) - out - Pointer to log error messages. ``` -------------------------------- ### Install libudev-dev on Linux Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/tutorial/English/Environment_Configuration.md Installs the libudev development library required for system environment configuration on Linux. ```bash sudo apt install libudev-dev ``` -------------------------------- ### Install OrbbecSDK udev rules on Linux Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/tutorial/English/Environment_Configuration.md Makes the OrbbecSDK's udev rules file executable and then installs it to grant necessary USB access rights. ```bash sudo chmod +x ./install_udev_rules.sh sudo ./install_udev_rules.sh ``` -------------------------------- ### Start the pipeline with default configuration Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-QuickStart/README.md Starts the Orbbec SDK pipeline. By default, it enables Depth and Color streams. Modify the OrbbecSDKConfig_v1.0.xml file to enable IR streams. ```cpp pipe.start(); ``` -------------------------------- ### Get frame data from the pipeline Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-QuickStart/README.md Waits for and retrieves frame data, including color and depth frames, from the started pipeline. ```cpp auto frameSet = pipe.waitForFrames(); auto colorFrame = frameSet->colorFrame(); auto depthFrame = frameSet->depthFrame(); ``` -------------------------------- ### ob_video_frame_pixel_available_bit_size Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/Frame_8h_source.html Gets the effective number of bits per pixel for a video frame. For example, in a Y16 format frame, only the lower 10 bits might be effective. ```APIDOC ## ob_video_frame_pixel_available_bit_size ### Description Get the effective number of pixels (such as Y16 format frame, but only the lower 10 bits are effective...) ### Signature uint8_t ob_video_frame_pixel_available_bit_size(ob_frame *frame, ob_error **error) ### Parameters - `frame` (ob_frame *) - Pointer to the frame object. - `error` (ob_error **) - Pointer to an error object to store error information. ### Returns - The effective number of bits per pixel, or 0 if an error occurred. ``` -------------------------------- ### ob_pipeline_start Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/Pipeline_8h_source.html Starts the pipeline using its default parameters. ```APIDOC ## ob_pipeline_start ### Description Start the pipeline with default parameters. ### Signature void ob_pipeline_start(ob_pipeline *pipeline, ob_error **error) ### Parameters - **pipeline** (ob_pipeline *) - Pointer to the pipeline object. - **error** (ob_error **) - Pointer to a pointer for error handling. ### Returns void ``` -------------------------------- ### Get Gyroscope Data Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-ImuReader/README.md Retrieves gyroscope sensor data. It configures the stream profile and starts a callback to process incoming gyro frames, printing data at a reduced frequency. ```cpp // Get Gyroscope Sensor gyroSensor = dev->getSensorList()->getSensor(OB_SENSOR_GYRO); if(gyroSensor) { // Get configuration list auto profiles = gyroSensor->getStreamProfileList(); // Select the first profile to open stream auto profile = profiles->getProfile(OB_PROFILE_DEFAULT); gyroSensor->start(profile, [](std::shared_ptr frame) { std::unique_lock lk(printerMutex); auto timeStamp = frame->timeStamp(); auto index = frame->index(); auto gyroFrame = frame->as(); if(gyroFrame != nullptr && (index % 50) == 2) { //( timeStamp % 500 ) < 2: Reduce printing frequency auto value = gyroFrame->value(); std::cout << "Gyro Frame: \n\r{\n\r" << " tsp = " << timeStamp << "\n\r" << " temperature = " << gyroFrame->temperature() << "\n\r" << " gyro.x = " << value.x << " rad/s" << "\n\r" << " gyro.y = " << value.y << " rad/s" << "\n\r" << " gyro.z = " << value.z << " rad/s" << "\n\r" << "}\n\r" << std::endl; } }); } ``` -------------------------------- ### Get Accelerometer Data and Stop Streams Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-ImuReader/README.md Retrieves accelerometer sensor data, configures its stream profile, and starts a callback to process incoming accel frames. It also includes logic to stop both gyroscope and accelerometer streams. ```cpp accelSensor = dev->getSensorList()->getSensor(OB_SENSOR_ACCEL); if(accelSensor) { // Get configuration list auto profiles = accelSensor->getStreamProfileList(); // Select the first profile to open stream auto profile = profiles->getProfile(OB_PROFILE_DEFAULT); accelSensor->start(profile, [](std::shared_ptr frame) { std::unique_lock lk(printerMutex); auto timeStamp = frame->timeStamp(); auto index = frame->index(); auto accelFrame = frame->as(); if(accelFrame != nullptr && (index % 50) == 0) { auto value = accelFrame->value(); std::cout << "Accel Frame: \n\r{\n\r" << " tsp = " << timeStamp << "\n\r" << " temperature = " << accelFrame->temperature() << "\n\r" << " accel.x = " << value.x << " m/s^2" << "\n\r" << " accel.y = " << value.y << " m/s^2" << "\n\r" << " accel.z = " << value.z << " m/s^2" << "\n\r" << "}\n\r" << std::endl; } }); } // turn off the stream if(gyroSensor) { gyroSensor->stop(); } if(accelSensor) { accelSensor->stop(); } ``` -------------------------------- ### ob::Pipeline::start() Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Pipeline.html Starts the pipeline with default configuration parameters. ```APIDOC ## start() ### Description Starts the pipeline with default configuration parameters. ### Method void ### Parameters None ``` -------------------------------- ### Install Target Files Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/c/Sample-AlignFilterViewer/CMakeLists.txt Defines installation rules for the target executable, placing it in 'bin' for runtime, and libraries/archives in 'lib'. This is used when installing the project. ```cmake install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) ``` -------------------------------- ### Create Device Instance Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-HelloOrbbec/README.md Creates a device instance from the list of discovered devices. This example selects the first device found (index 0). ```cpp //Create a device, where 0 represents the index of the first device auto dev = devList->getDevice(0); ``` -------------------------------- ### Get Device Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Frame.html Get the owner device of the frame. ```APIDOC ## getDevice ### Description Get the owner device of the frame. ### Method std::shared_ptr< Device > getDevice () ### Return Value Returns a shared pointer to the owner device of the frame. ``` -------------------------------- ### Get Sensor Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Frame.html Get the owner sensor of the frame. ```APIDOC ## getSensor ### Description Get the owner sensor of the frame. ### Method std::shared_ptr< Sensor > getSensor () ### Return Value Returns a shared pointer to the owner sensor of the frame. ``` -------------------------------- ### Start Pipeline with Configuration Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/c/Sample-ColorViewer/README.md Initiates the Orbbec pipeline using the previously created configuration. This step begins data streaming from the device. ```c ob_pipeline_start_with_config(pipe, config, &error); ``` -------------------------------- ### Get Stream Profile Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Frame.html Get the StreamProfile of the frame. ```APIDOC ## getStreamProfile ### Description Get the StreamProfile of the frame. ### Method std::shared_ptr< StreamProfile > getStreamProfile () ### Return Value Returns a shared pointer to the StreamProfile of the frame. ``` -------------------------------- ### Start Pipeline Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/c/Sample-HdrMerge/README.md Initiates the data stream from the configured pipeline. Ensure the pipeline and configuration are set up correctly before calling this. ```c ob_pipeline_start_with_config(pipeline, config, &error); ``` -------------------------------- ### Get Metadata Value Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Frame.html Get the metadata value. ```APIDOC ## getMetadataValue ### Description Get the metadata value. ### Method int64_t getMetadataValue (OBFrameMetadataType type) ### Parameters #### Path Parameters - **type** (OBFrameMetadataType) - Required - The type of metadata to retrieve. ### Return Value Returns the metadata value. ``` -------------------------------- ### Install Homebrew on macOS Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/tutorial/English/Environment_Configuration.md Install Homebrew, a package manager for macOS, which is essential for easily installing development tools and libraries like CMake and OpenCV. ```bash /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" ``` -------------------------------- ### Configure Program Options Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-MultiDeviceSync/README.md Presents user options for configuring devices or starting streams. Requires user input to proceed. ```cpp std::cout << "Please select options: " << std::endl; std::cout << " 0 --> config devices" << std::endl; std::cout << " 1 --> start stream" << std::endl; std::cout << "input: "; int index = -1; std::cin >> index; ``` -------------------------------- ### ob_playback_start Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/RecordPlayback_8h.html Starts playback, returning data via a callback. ```APIDOC ## ob_playback_start ### Description Start playback, with data returned from the callback. ### Parameters - **playback** (ob_playback*) - in - **callback** (ob_playback_callback) - The callback function to handle playback data. - **user_data** (void*) - User-defined data to pass to the callback. - **type** (ob_media_type) - The type of media to play back. - **error** (ob_error**) - out - Pointer to log error messages. ``` -------------------------------- ### ob_pipeline_start_with_config Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/Pipeline_8h_source.html Starts the pipeline using the provided configuration parameters. ```APIDOC ## ob_pipeline_start_with_config ### Description Start the pipeline with configuration parameters. ### Signature void ob_pipeline_start_with_config(ob_pipeline *pipeline, ob_config *config, ob_error **error) ### Parameters - **pipeline** (ob_pipeline *) - Pointer to the pipeline object. - **config** (ob_config *) - Pointer to the configuration object. - **error** (ob_error **) - Pointer to a pointer for error handling. ### Returns void ``` -------------------------------- ### Playback::start Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Playback.html Starts the playback process, delivering data through a callback function. ```APIDOC ## start(PlaybackCallback callback, OBMediaType type = OB_MEDIA_ALL) ### Description Start playback. The playback data is returned from the callback. Throws an exception on failure. ### Parameters - **callback** (PlaybackCallback) - The callback for playback data. - **type** (OBMediaType) - The type of playback data. Defaults to OB_MEDIA_ALL. ``` -------------------------------- ### Compile and Run macOS Samples Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/tutorial/English/Environment_Configuration.md Compile and run the OrbbecSDK samples on macOS. This includes creating a build directory, configuring with CMake, making the project, installing, and executing the sample binary. ```bash cd OrbbecSDK mkdir build cd build cmake .. && make -j8 make install cd install/bin sudo ./OBHelloOrbbec ``` -------------------------------- ### Get Camera Parameter List Count Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/Device_8h_source.html Gets the number of camera parameters in a list. ```APIDOC ## ob_camera_param_list_count ### Description Gets the number of camera parameters in a list. ### Function Signature uint32_t ob_camera_param_list_count(ob_camera_param_list *param_list, ob_error **error); ### Parameters - **param_list** (*ob_camera_param_list* *) - Pointer to the camera parameter list. - **error** (*ob_error* **) - Pointer to a pointer to store error information. ### Returns - Returns a uint32_t representing the count of camera parameters on success. - Returns 0 on failure. ``` -------------------------------- ### Variables starting with 'i' Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/functions_vars_i.html This section details variables that start with the letter 'i', including their types and the classes they belong to. ```APIDOC ## Variables ### id - **Type**: [OBPropertyItem](structOBPropertyItem.html#ac8bdcd2e6ca56004b5e380356b293e2b) - **Description**: Identifier for a property item. ### impl_ - **Type**: [ob::Device](classob_1_1Device.html#affe52066e4c9993e4ed8bdf47fd15d48), [ob::Filter](classob_1_1Filter.html#ac80715de348ec5eedcaa8eaf019b7587), [ob::Frame](classob_1_1Frame.html#a2683616ec8b3346cf9412051779b9721), [ob::Sensor](classob_1_1Sensor.html#a5b82258d1cacac7162763da9298a4bb4), [ob::StreamProfile](classob_1_1StreamProfile.html#a666c4ae5317ebe38efb63833231ebdaa), [ob::StreamProfileList](classob_1_1StreamProfileList.html#a24ceb6b2aa542cd316cee6c4ab2a15e7) - **Description**: Internal implementation details for various classes. ### imuTemp - **Type**: [OBDeviceTemperature](structOBDeviceTemperature.html#a216f0f34b5ff54e64f2674cd41fe90da) - **Description**: Temperature reading from the IMU sensor. ### intrinsics - **Type**: [OBCalibrationParam](structOBCalibrationParam.html#a9c87b9d1b08cdea2885dd407c4b79bea) - **Description**: Camera intrinsic calibration parameters. ### irLeftTemp - **Type**: [OBDeviceTemperature](structOBDeviceTemperature.html#a52a6b76be7b79347e8e7aefb938a3690) - **Description**: Temperature reading from the left IR sensor. ### irRightTemp - **Type**: [OBDeviceTemperature](structOBDeviceTemperature.html#a0dcab19faea03411a3c46acfb2c091b6) - **Description**: Temperature reading from the right IR sensor. ### irTemp - **Type**: [OBDeviceTemperature](structOBDeviceTemperature.html#a2a3a4d01b0e9e354fec9bb7378359d02) - **Description**: General temperature reading from the IR sensor. ### irTriggerSignalInDelay - **Type**: [OBDeviceSyncConfig](structOBDeviceSyncConfig.html#a9a26f092fcd880d683a7ee39d11b1645) - **Description**: Delay configuration for the IR trigger signal input. ### isMirrored - **Type**: [OBCameraParam](structOBCameraParam.html#a214e4a8c69cf4d6e7f50c0ebe9772efb) - **Description**: Boolean flag indicating if the camera view is mirrored. ### itemCount - **Type**: [OBDataBundle](structOBDataBundle.html#a6662b409fe251df58966a04d7d69c09d) - **Description**: Number of items in a data bundle. ### itemTypeSize - **Type**: [OBDataBundle](structOBDataBundle.html#a6e86b50432b1c9b1f4ae295fdc7cf17a) - **Description**: Size of each item type within a data bundle. ``` -------------------------------- ### CMake Project Setup and Linking Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/c/Sample-DepthWorkMode/CMakeLists.txt Configures the minimum CMake version, names the project, adds an executable, and links necessary libraries including OrbbecSDK. ```cmake cmake_minimum_required(VERSION 3.1.15) project(ob_depth_work_mode) ``` ```cmake add_executable(${PROJECT_NAME} depth_work_mode.cpp ) ``` ```cmake target_link_libraries(${PROJECT_NAME} ${OrbbecSDK_LIBS} ) ``` -------------------------------- ### Install macOS Dependencies Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/tutorial/English/Environment_Configuration.md Install necessary development tools such as CMake and OpenCV on macOS using Homebrew. ```bash brew install cmake opencv ``` -------------------------------- ### ob_device_list_get_device Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/Device_8h.html Create a device. ```APIDOC ## ob_device_list_get_device ### Description Create a device. ### Parameters - **list** (ob_device_list *) - Pointer to the device list. - **index** (uint32_t) - The index of the device. - **error** (ob_error **) - Pointer to an error structure to store error information. ### Returns - ob_device * - A pointer to the created device object, or NULL if an error occurs. ``` -------------------------------- ### Get Depth Work Mode List Count Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/Device_8h_source.html Gets the number of depth work modes in a list. ```APIDOC ## ob_depth_work_mode_list_count ### Description Gets the number of depth work modes in a list. ### Function Signature uint32_t ob_depth_work_mode_list_count(ob_depth_work_mode_list *work_mode_list, ob_error **error); ### Parameters - **work_mode_list** (*ob_depth_work_mode_list* *) - Pointer to the depth work mode list. - **error** (*ob_error* **) - Pointer to a pointer to store error information. ### Returns - Returns a uint32_t representing the count of depth work modes on success. - Returns 0 on failure. ``` -------------------------------- ### Install libusb-dev on Linux Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/tutorial/English/Environment_Configuration.md Installs the libusb development library required for USB access rights configuration on Linux. ```bash sudo apt install libusb-dev ``` -------------------------------- ### startRecord Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Pipeline.html Initiates the recording of camera data to a specified file. ```APIDOC ## startRecord() ### Description Start recording. ### Parameters * **filename** (const char *) - The name of the record file ``` -------------------------------- ### Implement Firmware Upgrade Callback and Perform Upgrade (C) Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/c/Sample-FirmwareUpgrade/README.md Implement the `device_upgrade_callback` to handle different firmware upgrade states. Call `ob_device_upgrade` to initiate the upgrade process, ensuring the firmware file has a .img or .bin extension. The `check_error` function should be used to handle potential errors during the upgrade. ```c // Implement firmware upgrade callback interface for C API; void device_upgrade_callback(ob_upgrade_state state, const char *message, uint8_t percent, void *user_data) { if(state == STAT_START) { printf("Upgrade Firmware start\n"); } else if(state == STAT_FILE_TRANSFER) { printf("Upgrade Firmware file transfer, percent: %u\n", (uint32_t)percent); } else if(state == STAT_IN_PROGRESS) { printf("Upgrade Firmware in progress, percent: %u\n", (uint32_t)percent); } else if(state == STAT_DONE) { // Firmware upgrade successful printf("Upgrade Firmware done, percent: %u\n", (uint32_t)percent); is_upgrade_success_ = true; } else if(state == STAT_VERIFY_IMAGE) { printf("Upgrade Firmware verify image\n"); } else { // Firmware upgrade failed printf("Upgrade Firmware failed. state: %d, errMsg: %s, percent: %u \n", (int)state, message ? message : "", (uint32_t)percent); } } // Perform firmware upgrades on the target device bool upgrade_firmware(ob_device *device, const char *firmwarePath) { const char *index = strstr(firmwarePath, ".img"); bool isImgFile = (bool)index; index = strstr(firmwarePath, ".bin"); bool isBinFile = (bool)index; if(!(isImgFile || isBinFile)) { // Firmware upgrade files are usually bin or img. In actual business, it is best to use information such as file name and file MD5 to prevent errors printf("Upgrade Fimware failed. invalid firmware file: %s\n", firmwarePath); return false; } // Call the firmware upgrade interface for upgrading; is_upgrade_success_ = false; ob_error *error = NULL; ob_device_upgrade(device, firmwarePath, device_upgrade_callback, false, &callback_user_data_, &error); check_error(error); return is_upgrade_success_; } ``` -------------------------------- ### Variables starting with 'b' Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/functions_vars_b.html This section lists variables that start with the letter 'b', along with their respective data types and the structures they belong to. ```APIDOC ## Variables ### b * `b` : [OBColorPoint](structOBColorPoint.html#a479d6d154f5d673c41b3197ff708fd22) * `baseline` : [BASELINE_CALIBRATION_PARAM](structBASELINE__CALIBRATION__PARAM.html#a94c00a31d7ff90eaaf9d84e4f1e95932) * `bias` : [OBAccelIntrinsic](structOBAccelIntrinsic.html#a394dc459a50aa3fd03de9570293975e2), [OBGyroIntrinsic](structOBGyroIntrinsic.html#aa7bc8a5c9a7df2dd9785392fb4788968) ``` -------------------------------- ### Command-line Device Configuration Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-MultiDeviceSync/MultiDeviceSync_EN.md Execute 'MultiDeviceSync.exe' and select option '0' to configure connected devices based on the 'MultiDeviceSyncConfig.json' settings. The program will apply the configuration and prompt for a device reboot. ```bash Please select options: 0 --> config devices 1 --> start stream input: 0 config[0]: SN=CL2LC2P0089, mode=OB_MULTI_DEVICE_SYNC_MODE_PRIMARY config[1]: SN=CL2LC2P00C0, mode=OB_MULTI_DEVICE_SYNC_MODE_SECONDARY Device sn[CL2LC2P0089] is configured, rebooting... Device sn[CL2LC2P00C0] is configured, rebooting... ``` -------------------------------- ### startRecord Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/Pipeline_8hpp_source.html Starts recording the pipeline's output to a specified file. ```APIDOC ## startRecord ### Description Starts recording the pipeline's output to a specified file. ### Method Signature `void startRecord(const char *filename);` ### Parameters * **filename** (const char *) - The name of the file to save the recording to. ``` -------------------------------- ### Create Context and Query Devices C++ Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-MultiDevice/README.md Initializes a context to discover and list connected Orbbec devices. This is the first step before creating device objects. ```cpp ob::Context ctx; // Query the list of connected devices auto devList = ctx.queryDeviceList(); // Get the number of connected devices int devCount = devList->deviceCount(); ``` -------------------------------- ### Install udev Rules on Linux Source: https://github.com/orbbec/orbbecsdk/blob/main/README.md Execute these commands on Linux to install udev rules if not using a debian package. This ensures proper device detection. ```bash cd OrbbecSDK/misc/scripts sudo chmod +x ./install_udev_rules.sh sudo ./install_udev_rules.sh sudo udevadm control --reload && sudo udevadm trigger ``` -------------------------------- ### ob_playback_start Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/RecordPlayback_8h_source.html Initiates playback of a recording, with data delivered via a callback function. ```APIDOC ## ob_playback_start ### Description Start playback, with data returned from the callback. ### Method `ob_playback_start` ### Parameters - `playback` (*ob_playback*) - Pointer to the playback object. - `callback` (*ob_playback_callback*) - The callback function to receive playback data. - `user_data` (*void*) - User-defined data to be passed to the callback. - `type` (*ob_media_type*) - The type of media to play back. - `error` (**ob_error**) - Pointer to a pointer to store error information. ``` -------------------------------- ### Variables starting with 's' Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/functions_vars_s.html This section details variables found in various OrbbecSDK structures, categorized by their names starting with 's'. Each variable is listed with its associated structure(s). ```APIDOC ## Variables ### - s - * **scaleMisalignment** : [OBAccelIntrinsic](structOBAccelIntrinsic.html#a4df4b6d3b6c32ff0bfe28e7af4f6427c), [OBGyroIntrinsic](structOBGyroIntrinsic.html#a4c28199aad7e270b8b01e059097309ae) * **sequence_name** : [HDR_CONFIG](structHDR__CONFIG.html#abfe46f1b827959fa521e70c5f4f4e3b8) * **sequenceSelectId** : [OBSequenceIdItem](structOBSequenceIdItem.html#aaf68fd366f52e144a6c30b2a9da22ed9) * **size** : [OBDataChunk](structOBDataChunk.html#af80b0059d918467b6b58e56b798c8ad1), [OBSpatialFastFilterParams](structOBSpatialFastFilterParams.html#af81b1456ed9bd592f5db230437d1fe6f), [OBSpatialModerateFilterParams](structOBSpatialModerateFilterParams.html#a31ee784cadfb7c4519d975fc0e185a1a) * **status** : [ob_error](structob__error.html#afc2451cf30a6e060b284e38ec60c2993) * **step** : [OBBoolPropertyRange](structOBBoolPropertyRange.html#ac3fa21c03a908853058b4ab33451fb22), [OBFloatPropertyRange](structOBFloatPropertyRange.html#ae67f00fcb8e7a103b749835a0e0cbaa5), [OBIntPropertyRange](structOBIntPropertyRange.html#a01e6e87553be91eaff2ac559eb114f94), [OBUint16PropertyRange](structOBUint16PropertyRange.html#a9b8f44727363292d3c98c8fdda390da2), [OBUint8PropertyRange](structOBuint8PropertyRange.html#aa194063572042e15f7c8ab1d35140651) * **syncMode** : [ob_multi_device_sync_config](structob__multi__device__sync__config.html#a8cc39ed5db27676bdf5cffcb5ccbed67), [OBDeviceSyncConfig](structOBDeviceSyncConfig.html#a19078aa83a64a13f659613811f27b152) ``` -------------------------------- ### Create Pipeline and Configure Streams Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/c/Sample-PointCloud/README.md Initializes an `ob_pipeline` and `ob_config` to set up color and depth streams. It attempts to find the best available depth-to-color alignment mode (hardware or software). ```c pipeline = ob_create_pipeline( &error ); ob_config* config = ob_create_config( &error ); ob_stream_profile_list *colorProfiles = ob_pipeline_get_stream_profile_list(pipeline, OB_SENSOR_COLOR, &error); if(error) { printf("Current device is not support color sensor!\n"); ob_delete_error(error); error = NULL; ob_config_set_align_mode(config, ALIGN_DISABLE, &error); check_error(error); } if(colorProfiles) { color_profile = ob_stream_profile_list_get_profile(colorProfiles, OB_PROFILE_DEFAULT, &error); } if(color_profile) { depthProfiles = ob_get_d2c_depth_profile_list(pipeline, color_profile, ALIGN_D2C_HW_MODE, &error); check_error(error); int d2cCount = ob_stream_profile_list_count(depthProfiles, &error); check_error(error); if(d2cCount > 0) { align_mode = ALIGN_D2C_HW_MODE; } else { depthProfiles = ob_get_d2c_depth_profile_list(pipeline, color_profile, ALIGN_D2C_SW_MODE, &error); check_error(error); d2cCount = ob_stream_profile_list_count(depthProfiles, &error); check_error(error); if(d2cCount > 0) { align_mode = ALIGN_D2C_SW_MODE; } } } else { depthProfiles = ob_pipeline_get_stream_profile_list(pipeline, OB_SENSOR_DEPTH, &error); check_error(error); } ``` -------------------------------- ### CMakeLists.txt for Orbbec Hello World Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/c/Sample-HelloOrbbec/CMakeLists.txt Configures the build for the ob_hello_orbbec executable. It specifies the minimum CMake version, project name, links the Orbbec SDK libraries, sets include directories, and defines installation rules. ```cmake cmake_minimum_required(VERSION 3.1.15) project(ob_hello_orbbec) add_executable(${PROJECT_NAME} hello_orbbec.c ) target_link_libraries(${PROJECT_NAME} ${OrbbecSDK_LIBS} ) target_include_directories(${PROJECT_NAME} PUBLIC $ $ $ ${OrbbecSDK_INCLUDE_DIRS} ) install(TARGETS ${PROJECT_NAME} EXPORT ${PROJECT_NAME}Targets RUNTIME DESTINATION bin LIBRARY DESTINATION lib ARCHIVE DESTINATION lib ) ``` -------------------------------- ### Get All Properties Prompt Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-SensorControl/README.md Prompts the user to input '?' to retrieve all device properties. ```cpp std::cout << "Input \"?\" to get all properties." << std::endl; std::getline(std::cin, choice); ``` -------------------------------- ### Check Orbbec SDK Package Path on Linux Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/tutorial/English/Installation_guidance.md After installation via .deb package, use this command to verify the installation path of the Orbbec SDK, including header and library files located in /usr/local. ```bash dpkg -L orbbecsdk ``` -------------------------------- ### Start Separate IMU Pipeline Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-MultiStream/README.md Initializes and starts a separate pipeline specifically for IMU data (Accelerometer and Gyroscope) due to its higher frame rate. Includes error handling if IMU sensors are not found. ```cpp auto dev = pipe.getDevice(); auto imuPipeline = std::make_shared(dev); std::mutex imuFrameMutex; std::map> imuFrameMap; try { auto accelProfiles = imuPipeline->getStreamProfileList(OB_SENSOR_ACCEL); auto gyroProfiles = imuPipeline->getStreamProfileList(OB_SENSOR_GYRO); auto accelProfile = accelProfiles->getProfile(OB_PROFILE_DEFAULT); auto gyroProfile = gyroProfiles->getProfile(OB_PROFILE_DEFAULT); std::shared_ptr imuConfig = std::make_shared(); imuConfig->enableStream(accelProfile); imuConfig->enableStream(gyroProfile); imuPipeline->start(imuConfig, [&](std::shared_ptr frameset) { auto count = frameset->frameCount(); for(int i = 0; i < count; i++) { auto frame = frameset->getFrame(i); std::unique_lock lk(imuFrameMutex); imuFrameMap[frame->type()] = frame; } }); } catch(...) { std::cout << "IMU sensor not found!" << std::endl; imuPipeline.reset(); } ``` -------------------------------- ### Initialize Point Cloud Filter and Set Camera Parameters Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-PointCloud/README.md Create a point cloud filter object and configure it with camera intrinsic parameters obtained from the pipeline. It's recommended to set up the device and pipeline before creating the filter. ```cpp // Create a point cloud filter object (when creating a point cloud filter, device parameters are obtained within the Pipeline, so it is recommended to configure the device as much as possible before creating the filter) ob::PointCloudFilter pointCloud; // Get camera internal parameters and input them into the point cloud filter auto cameraParam = pipeline.getCameraParam(); pointCloud.setCameraParam(cameraParam); ``` -------------------------------- ### type() Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1StreamProfile.html Get the type of stream. ```APIDOC ## type() ### Description Get the type of stream. ### Method const ### Returns OBStreamType - return the type of the stream ``` -------------------------------- ### format() Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1StreamProfile.html Get the format of the stream. ```APIDOC ## format() ### Description Get the format of the stream. ### Method const ### Returns OBFormat - return the format of the stream ``` -------------------------------- ### Context.hpp Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/dir_551f50d4f6202563ca607f3aa0b67db1.html The SDK context class serves as the entry point to the underlying SDK. It is used to query device lists, handle device callbacks, and set the log level. ```APIDOC ## Context Class ### Description The SDK context class is the primary interface for interacting with the OrbbecSDK. It allows users to discover connected devices, manage device event notifications, and configure SDK logging behavior. ### Usage ```cpp // Include the header #include // Create a context object Orbbec::Context context; // Query device list auto devices = context.queryDevices(); // Set log level (example) context.setLogLevel(Orbbec::LogLevel::Debug); ``` ### Key Features - Device Discovery - Device Callback Handling - Log Level Configuration ``` -------------------------------- ### Metadata Source: https://github.com/orbbec/orbbecsdk/blob/main/doc/api/English/classob_1_1Frame.html Get the metadata of the frame. ```APIDOC ## metadata ### Description Get the metadata of the frame. ### Method void* metadata () ### Return Value Returns a pointer to the frame metadata. ``` -------------------------------- ### Enable Playback Source: https://github.com/orbbec/orbbecsdk/blob/main/examples/cpp/Sample-Playback/README.md Start the playback pipeline to begin processing frames from the loaded file. ```cpp //Enable playback pipe.start(NULL); ```