mirror of
https://github.com/orbbec/OrbbecSDK_ROS2.git
synced 2026-10-04 03:57:46 +08:00
Update SDK to g2r temp version
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
#include "Types.hpp"
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
#include <map>
|
||||
|
||||
namespace ob {
|
||||
class Frame;
|
||||
@@ -150,4 +151,172 @@ public:
|
||||
DecompressionFilter();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Hole filling filter
|
||||
*/
|
||||
class OB_EXTENSION_API HoleFillingFilter : public Filter {
|
||||
public:
|
||||
HoleFillingFilter();
|
||||
|
||||
void enable(bool enable);
|
||||
|
||||
bool isEnabled();
|
||||
|
||||
void setFilterMode(OBHoleFillingMode mode);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Temporal filter
|
||||
*/
|
||||
class OB_EXTENSION_API TemporalFilter : public Filter {
|
||||
public:
|
||||
TemporalFilter();
|
||||
|
||||
void enable(bool enable);
|
||||
|
||||
bool isEnabled();
|
||||
|
||||
OBFloatPropertyRange getDiffScaleRange();
|
||||
|
||||
void setDiffScale(float value);
|
||||
|
||||
OBFloatPropertyRange getWeightRange();
|
||||
|
||||
void setWeight(float value);
|
||||
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Spatial advanced filter
|
||||
*/
|
||||
class OB_EXTENSION_API SpatialAdvancedFilter : public Filter {
|
||||
public:
|
||||
SpatialAdvancedFilter();
|
||||
|
||||
void enable(bool enable);
|
||||
|
||||
bool isEnabled();
|
||||
|
||||
OBFloatPropertyRange getAlphaRange();
|
||||
|
||||
OBUint16PropertyRange getDispDiffRange();
|
||||
|
||||
OBUint16PropertyRange getRadiusRange();
|
||||
|
||||
OBIntPropertyRange getMagnitudeRange();
|
||||
|
||||
OBSpatialAdvancedFilterParams getFilterParams();
|
||||
|
||||
void setFilterParams(OBSpatialAdvancedFilterParams params);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Depth to disparity or disparity to depth
|
||||
*/
|
||||
class OB_EXTENSION_API DisparityTransform : public Filter {
|
||||
public:
|
||||
DisparityTransform();
|
||||
|
||||
DisparityTransform(bool depth_to_disparity);
|
||||
|
||||
void enable(bool enable);
|
||||
|
||||
bool isEnabled();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Depth HDR merge
|
||||
*/
|
||||
class OB_EXTENSION_API HdrMerge : public Filter {
|
||||
public:
|
||||
HdrMerge();
|
||||
|
||||
void enable(bool enable);
|
||||
|
||||
bool isEnabled();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Align for depth to other or other to depth.
|
||||
*/
|
||||
class OB_EXTENSION_API Align : public Filter {
|
||||
public:
|
||||
Align(OBStreamType align_to_stream, OBFrameType align_to_frame);
|
||||
|
||||
void enable(bool enable);
|
||||
|
||||
bool isEnabled();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief Creates depth Thresholding filter
|
||||
* By controlling min and max options on the block
|
||||
*/
|
||||
class OB_EXTENSION_API ThresholdFilter : public Filter {
|
||||
public:
|
||||
ThresholdFilter();
|
||||
|
||||
void enable(bool enable);
|
||||
|
||||
bool isEnabled();
|
||||
|
||||
OBIntPropertyRange getMinRange();
|
||||
|
||||
OBIntPropertyRange getMaxRange();
|
||||
|
||||
void setValueRange(uint16_t min, uint16_t max);
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
class OB_EXTENSION_API SequenceIdFilter : public Filter {
|
||||
public:
|
||||
SequenceIdFilter();
|
||||
|
||||
void enable(bool enable);
|
||||
|
||||
bool isEnabled();
|
||||
|
||||
void selectSequenceId(float sequence_id);
|
||||
|
||||
float getSelectSequenceId();
|
||||
|
||||
std::map<float, std::string> getSequenceIdList();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
class OB_EXTENSION_API NoiseRemovalFilter : public Filter {
|
||||
public:
|
||||
NoiseRemovalFilter();
|
||||
|
||||
void enable(bool enable);
|
||||
|
||||
bool isEnabled();
|
||||
|
||||
void setNoiseRemovalFilterParams(OBNoiseRemovalFilterParams *filterParams);
|
||||
|
||||
OBUint16PropertyRange getDispDiffRange();
|
||||
|
||||
OBUint16PropertyRange getSizeRange();
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief
|
||||
*/
|
||||
class OB_EXTENSION_API DecimationFilter : public Filter {
|
||||
public:
|
||||
DecimationFilter();
|
||||
|
||||
void enable(bool enable);
|
||||
|
||||
bool isEnabled();
|
||||
|
||||
void setScaleValue(uint8_t value);
|
||||
|
||||
OBUint8PropertyRange getScaleRange();
|
||||
};
|
||||
|
||||
} // namespace ob
|
||||
|
||||
@@ -31,6 +31,8 @@
|
||||
struct FrameImpl;
|
||||
|
||||
namespace ob {
|
||||
class Device;
|
||||
class Sensor;
|
||||
class StreamProfile;
|
||||
class Filter;
|
||||
class FrameHelper;
|
||||
@@ -120,6 +122,57 @@ public:
|
||||
*/
|
||||
uint64_t globalTimeStampUs();
|
||||
|
||||
/**
|
||||
* @brief Get the metadata of the frame.
|
||||
*
|
||||
* @return void* The metadata of the frame.
|
||||
*/
|
||||
void *metadata();
|
||||
|
||||
/**
|
||||
* @brief Get the size of the metadata of the frame.
|
||||
*
|
||||
* @return uint32_t The size of the metadata of the frame.
|
||||
*/
|
||||
uint32_t metadataSize();
|
||||
|
||||
/**
|
||||
* @brief Check if the frame object has metadata of a given type.
|
||||
*
|
||||
* @param type The metadata type. refer to @ref OBFrameMetadataType
|
||||
* @return bool The result.
|
||||
*/
|
||||
bool hasMetadata(OBFrameMetadataType type);
|
||||
|
||||
/**
|
||||
* @brief Get the metadata value
|
||||
*
|
||||
* @param type The metadata type. refer to @ref OBFrameMetadataType
|
||||
* @return int64_t The metadata value.
|
||||
*/
|
||||
int64_t getMetadataValue(OBFrameMetadataType type);
|
||||
|
||||
/**
|
||||
* @brief get StreamProfile of the frame
|
||||
*
|
||||
* @return std::shared_ptr<StreamProfile> The StreamProfile of the frame, may return nullptr if the frame is not captured from a stream.
|
||||
*/
|
||||
std::shared_ptr<StreamProfile> getStreamProfile();
|
||||
|
||||
/**
|
||||
* @brief get owner sensor of the frame
|
||||
*
|
||||
* @return std::shared_ptr<Sensor> The owner sensor of the frame, return nullptr if the frame is not owned by any sensor or the sensor is destroyed
|
||||
*/
|
||||
std::shared_ptr<Sensor> getSensor();
|
||||
|
||||
/**
|
||||
* @brief get owner device of the frame
|
||||
*
|
||||
* @return std::shared_ptr<Device> The owner device of the frame, return nullptr if the frame is not owned by any device or the device is destroyed
|
||||
*/
|
||||
std::shared_ptr<Device> getDevice();
|
||||
|
||||
/**
|
||||
* @brief Check if the runtime type of the frame object is compatible with a given type.
|
||||
*
|
||||
@@ -171,20 +224,6 @@ public:
|
||||
*/
|
||||
uint32_t height();
|
||||
|
||||
/**
|
||||
* @brief Get the metadata of the frame.
|
||||
*
|
||||
* @return void* The metadata of the frame.
|
||||
*/
|
||||
void *metadata();
|
||||
|
||||
/**
|
||||
* @brief Get the size of the metadata of the frame.
|
||||
*
|
||||
* @return uint32_t The size of the metadata of the frame.
|
||||
*/
|
||||
uint32_t metadataSize();
|
||||
|
||||
/**
|
||||
* @brief Get the effective number of pixels in the frame.
|
||||
* @attention Only valid for Y8/Y10/Y11/Y12/Y14/Y16 format.
|
||||
|
||||
@@ -66,7 +66,7 @@ public:
|
||||
/**
|
||||
* @brief Start the pipeline and set the frameset data callback
|
||||
*
|
||||
* @param config The parameter configuration of the pipeline
|
||||
* @param config The configuration of the pipeline
|
||||
* @param callback The callback to be triggered when all frame data in the frameset arrives
|
||||
*/
|
||||
void start(std::shared_ptr<Config> config, FrameSetCallback callback);
|
||||
@@ -78,6 +78,7 @@ public:
|
||||
|
||||
/**
|
||||
* @brief Get the pipeline configuration parameters
|
||||
* @brief Returns the default configuration if the user has not configured it
|
||||
*
|
||||
* @return std::shared_ptr<Config> The configured parameters
|
||||
*/
|
||||
@@ -220,6 +221,7 @@ public:
|
||||
void enableStream(std::shared_ptr<StreamProfile> streamProfile);
|
||||
|
||||
/**
|
||||
* @deprecated Use enableStream(std::shared_ptr<StreamProfile> streamProfile) instead
|
||||
* @brief Enable all streams to be used in the pipeline
|
||||
*/
|
||||
void enableAllStream();
|
||||
@@ -236,6 +238,13 @@ public:
|
||||
*/
|
||||
void disableAllStream();
|
||||
|
||||
/**
|
||||
* @brief Get the Enabled Stream Profile List
|
||||
*
|
||||
* @return std::shared_ptr<StreamProfileList>
|
||||
*/
|
||||
std::shared_ptr<StreamProfileList> getEnabledStreamProfileList() const;
|
||||
|
||||
/**
|
||||
* @brief Set the alignment mode
|
||||
*
|
||||
@@ -267,7 +276,7 @@ public:
|
||||
* @brief The processing strategy when the FrameSet generated by the frame aggregation function does not contain the frames of all opened streams (which
|
||||
* can be caused by different frame rates of each stream, or by the loss of frames of one stream): drop directly or output to the user.
|
||||
*
|
||||
* @param mode The frame aggregation output mode to be set (default mode is @ref OB_FRAME_AGGREGATE_OUTPUT_ANY_SITUATION)
|
||||
* @param mode The frame aggregation output mode to be set (default mode is @ref OB_FRAME_AGGREGATE_OUTPUT_FULL_FRAME_REQUIRE)
|
||||
*/
|
||||
void setFrameAggregateOutputMode(OBFrameAggregateOutputMode mode);
|
||||
|
||||
|
||||
@@ -42,6 +42,13 @@ public:
|
||||
*/
|
||||
OBStreamType type() const;
|
||||
|
||||
/**
|
||||
* @brief Get the extrinsic parameters from current stream profile to the given target stream profile
|
||||
*
|
||||
* @return OBExtrinsic Return the extrinsic parameters.
|
||||
*/
|
||||
OBExtrinsic getExtrinsicTo(std::shared_ptr<StreamProfile> target);
|
||||
|
||||
/**
|
||||
* @brief Check if frame object is compatible with the given type
|
||||
*
|
||||
@@ -100,6 +107,21 @@ public:
|
||||
* @return uint32_t Return the height of the stream.
|
||||
*/
|
||||
uint32_t height() const;
|
||||
|
||||
/**
|
||||
* @brief Get the intrinsic parameters of the stream.
|
||||
*
|
||||
* @return OBCameraIntrinsic Return the intrinsic parameters.
|
||||
*/
|
||||
OBCameraIntrinsic getIntrinsic();
|
||||
|
||||
/**
|
||||
* @brief Get the distortion parameters of the stream.
|
||||
* @brief Brown distortion model
|
||||
*
|
||||
* @return OBCameraDistortion Return the distortion parameters.
|
||||
*/
|
||||
OBCameraDistortion getDistortion();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -126,6 +148,13 @@ public:
|
||||
* @return OBAccelFullScaleRange Return the sampling frequency.
|
||||
*/
|
||||
OBAccelSampleRate sampleRate() const;
|
||||
|
||||
/**
|
||||
* @brief get the intrinsic parameters of the stream.
|
||||
*
|
||||
* @return OBAccelIntrinsic Return the intrinsic parameters.
|
||||
*/
|
||||
OBAccelIntrinsic getIntrinsic();
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -151,6 +180,13 @@ public:
|
||||
* @return OBAccelFullScaleRange Return the sampling frequency.
|
||||
*/
|
||||
OBGyroSampleRate sampleRate() const;
|
||||
|
||||
/**
|
||||
* @brief get the intrinsic parameters of the stream.
|
||||
*
|
||||
* @return OBGyroIntrinsic Return the intrinsic parameters.
|
||||
*/
|
||||
OBGyroIntrinsic getIntrinsic();
|
||||
};
|
||||
|
||||
template <typename T> bool StreamProfile::is() {
|
||||
|
||||
@@ -105,7 +105,7 @@ public:
|
||||
* @param calibrationParam Device calibration param,see pipeline::getCalibrationParam
|
||||
* @param sensorType sensor type
|
||||
* @param data input data,needs to be allocated externally.During initialization, the external allocation size is 'dataSize', for example, dataSize = 1920 *
|
||||
* 1080 * 2*sizeof(float) (1920 * 1080 represents the image resolution, and 2 represents two LUTs, one for x-coordinate and one for y-coordinate).
|
||||
* 1080 * 2 (1920 * 1080 represents the image resolution, and 2 represents two LUTs, one for x-coordinate and one for y-coordinate).
|
||||
* @param dataSize input data size
|
||||
* @param xyTables output xy tables
|
||||
*
|
||||
@@ -123,16 +123,5 @@ public:
|
||||
*
|
||||
*/
|
||||
static void transformationDepthToPointCloud(OBXYTables *xyTables, const void *depthImageData, void *pointCloudData);
|
||||
|
||||
/**
|
||||
* @brief Transform depth image to RGBD point cloud data
|
||||
*
|
||||
* @param xyTables input xy tables,see CoordinateTransformHelper::transformationInitXYTables
|
||||
* @param depthImageData input depth image data
|
||||
* @param colorImageData input color image data (only RGB888 support)
|
||||
* @param pointCloudData output RGBD point cloud data
|
||||
*
|
||||
*/
|
||||
static void transformationDepthToRGBDPointCloud(OBXYTables *xyTables, const void *depthImageData, const void *colorImageData, void *pointCloudData);
|
||||
};
|
||||
} // namespace ob
|
||||
|
||||
Reference in New Issue
Block a user