OrbbecSDK 2.10.6
OrbbecSDK: Software-Development-Kit for Orbbec 3D Cameras
Loading...
Searching...
No Matches
ob::UnDistortionFilter Class Reference

UnDistortionFilter removes lens distortion from a chosen stream (Color, IR, or Depth). More...

#include <Filter.hpp>

Inheritance diagram for ob::UnDistortionFilter:

Public Member Functions

 UnDistortionFilter (OBStreamType streamType=OB_STREAM_COLOR)
virtual ~UnDistortionFilter () noexcept override=default
void setStreamType (OBStreamType streamType)
 Set which stream to undistort (default: OB_STREAM_COLOR).
OBStreamType getStreamType () const
void setNewCameraMatrix (OBCameraIntrinsic depthIntrinsic)
 Set the new camera matrix used to project the undistorted image (equivalent to OpenCV's newCameraMatrix argument in cv::undistort(src, dst, cameraMatrix, distCoeffs, newCameraMatrix)).
void clearNewCameraMatrix ()
 Clear the new camera matrix and return to pure undistortion.
Public Member Functions inherited from ob::Filter
 Filter (ob_filter *impl)
virtual ~Filter () noexcept
ob_filter * getImpl () const
 Get the Impl object of the filter.
virtual const std::string & getName () const
 Get the type of filter.
virtual void reset () const
 Reset the filter, freeing the internal cache, stopping the processing thread, and clearing the pending buffer frame when asynchronous processing is used.
virtual void enable (bool enable) const
 enable the filter
virtual bool isEnabled () const
 Return Enable State.
virtual std::shared_ptr< Frame > process (std::shared_ptr< const Frame > frame) const
 Processes a frame synchronously.
virtual void pushFrame (std::shared_ptr< Frame > frame) const
 Pushes the pending frame into the cache for asynchronous processing.
virtual void setCallBack (FilterCallback callback)
 Set the callback function for asynchronous processing.
virtual std::string getConfigSchema () const
 Get config schema of the filter.
virtual std::vector< OBFilterConfigSchemaItem > getConfigSchemaVec () const
 Get the Config Schema Vec object.
virtual void setConfigValue (const std::string &configName, double value) const
 Set the filter config value by name.
virtual double getConfigValue (const std::string &configName) const
 Get the Config Value object by name.
virtual const char * type ()
template<typename T>
bool is ()
 Check if the runtime type of the filter object is compatible with a given type.
template<typename T>
std::shared_ptr< T > as ()

Additional Inherited Members

Protected Member Functions inherited from ob::Filter
 Filter ()=default
 Default constructor with nullptr impl, used for derived classes only.
virtual void init (ob_filter *impl)
Protected Attributes inherited from ob::Filter
ob_filter * impl_ = nullptr
std::string name_
FilterCallback callback_
std::vector< OBFilterConfigSchemaItem > configSchemaVec_

Detailed Description

UnDistortionFilter removes lens distortion from a chosen stream (Color, IR, or Depth).

Definition at line 497 of file Filter.hpp.

Constructor & Destructor Documentation

◆ UnDistortionFilter()

ob::UnDistortionFilter::UnDistortionFilter ( OBStreamType streamType = OB_STREAM_COLOR)
inlineexplicit

Definition at line 499 of file Filter.hpp.

◆ ~UnDistortionFilter()

virtual ob::UnDistortionFilter::~UnDistortionFilter ( )
overridevirtualdefaultnoexcept

Member Function Documentation

◆ setStreamType()

void ob::UnDistortionFilter::setStreamType ( OBStreamType streamType)
inline

Set which stream to undistort (default: OB_STREAM_COLOR).

Definition at line 512 of file Filter.hpp.

Referenced by setStreamType().

◆ getStreamType()

OBStreamType ob::UnDistortionFilter::getStreamType ( ) const
inline

Definition at line 516 of file Filter.hpp.

◆ setNewCameraMatrix()

void ob::UnDistortionFilter::setNewCameraMatrix ( OBCameraIntrinsic depthIntrinsic)
inline

Set the new camera matrix used to project the undistorted image (equivalent to OpenCV's newCameraMatrix argument in cv::undistort(src, dst, cameraMatrix, distCoeffs, newCameraMatrix)).

Pass the raw depth camera intrinsic. The filter scales fx/fy/cx/cy from the depth resolution to the actual color frame resolution at process time, so the caller does NOT need to compute the scale factor.

The new-camera-matrix mode is enabled as long as depthIntrinsic.width > 0. Call clearNewCameraMatrix() to return to pure undistortion.

Parameters
depthIntrinsicThe depth camera intrinsic at its native resolution.

Definition at line 534 of file Filter.hpp.

◆ clearNewCameraMatrix()

void ob::UnDistortionFilter::clearNewCameraMatrix ( )
inline

Clear the new camera matrix and return to pure undistortion.

Definition at line 546 of file Filter.hpp.


The documentation for this class was generated from the following file: