Use the SDK interface to demonstrate post-processing operations, display post-processed images, and exit the program using the ESC_KEY key
Pipeline is a pipeline for processing data streams, providing multi-channel stream configuration, switching, frame aggregation, and frame synchronization functions
Frameset is a combination of different types of Frames
win is used to display the frame data.
-
Get the device and sensor, and create the list of recommended filters for the sensor
auto device = pipe.getDevice(); auto sensor = device->getSensor(OB_SENSOR_DEPTH); auto filterList = sensor->createRecommendedFilters();
-
The filter operation.
- Get the type of filter
filter->getName()
- Get the Config Schema Vec object
filter->getConfigSchemaVec()
- Enable the filter
filter->enable(tokens[1] == "on");
- Get the Config Value object by name.
filter->getConfigValue(configSchema.name)
- Get the Enable State of the filter.
filter->isEnabled()
- Set the filter config value by name.
filter->setConfigValue(tokens[1], value);
-
Apply the recommended filters to the depth frame
auto processedFrame = depthFrame; // Apply the recommended filters to the depth frame for(auto &filter: filterList) { if(filter->isEnabled()) { // Only apply enabled filters processedFrame = filter->process(processedFrame); } }
Press the button according to the interface prompts