RGB 深度处理


class cv::linemod::ColorGradient
Modality that computes quantized gradient orientations from a color image. 更多...
class cv::rgbd::DepthCleaner
class cv::linemod::DepthNormal
Modality that computes quantized surface normals from a dense depth map. 更多...
class cv::linemod::Detector
Object detector using the LINE template matching algorithm with any set of modalities. 更多...
class cv::rgbd::FastICPOdometry
struct cv::linemod::Feature
Discriminant feature described by its location and label. 更多...
class cv::rgbd::ICPOdometry
struct cv::linemod::Match
Represents a successful template match. 更多...
class cv::linemod::Modality
Interface for modalities that plug into the LINE template matching representation. 更多...
class cv::rgbd::Odometry
struct cv::rgbd::OdometryFrame
class cv::linemod::QuantizedPyramid
Represents a modality operating over an image pyramid. 更多...
struct cv::rgbd::RgbdFrame
class cv::rgbd::RgbdICPOdometry
class cv::rgbd::RgbdNormals
class cv::rgbd::RgbdOdometry
class cv::rgbd::RgbdPlane
struct cv::linemod::Template

函数

cv::linemod::QuantizedPyramid::Candidate::Candidate (int x, int y, int label, float score )
cv::linemod::Feature::Feature (int x , int y , int label )
cv::linemod::Match::Match (int x , int y , float similarity , const String & class_id , int template_id )
void cv::linemod::colormap (const Mat &quantized, Mat &dst)
Debug function to colormap a quantized image for viewing. 更多...
void cv::rgbd::depthTo3d ( InputArray depth, InputArray K, OutputArray points3d, InputArray mask= noArray ())
void cv::rgbd::depthTo3dSparse ( InputArray depth, InputArray in_K, InputArray in_points, OutputArray points3d)
void cv::linemod::drawFeatures ( InputOutputArray img, const std::vector< Template > &templates, const Point2i &tl, int size=10)
Debug function to draw linemod features. 更多...
Ptr < linemod::Detector > cv::linemod::getDefaultLINE ()
Factory function for detector using LINE algorithm with color gradients. 更多...
Ptr < linemod::Detector > cv::linemod::getDefaultLINEMOD ()
Factory function for detector using LINE-MOD algorithm with color gradients and depth normals. 更多...
bool cv::rgbd::isValidDepth (const float &depth)
bool cv::rgbd::isValidDepth (const double &depth)
bool cv::rgbd::isValidDepth (const short int &depth)
bool cv::rgbd::isValidDepth (const unsigned short int &depth)
bool cv::rgbd::isValidDepth (const int &depth)
bool cv::rgbd::isValidDepth (const unsigned int &depth)
void cv::rgbd::registerDepth ( InputArray unregisteredCameraMatrix, InputArray registeredCameraMatrix, InputArray registeredDistCoeffs, InputArray Rt, InputArray unregisteredDepth, const Size &outputImagePlaneSize, OutputArray registeredDepth, bool depthDilation=false)
void cv::rgbd::rescaleDepth ( InputArray in, int depth, OutputArray out)
void cv::rgbd::warpFrame (const Mat &image, const Mat &depth, const Mat &mask, const Mat &Rt, const Mat &cameraMatrix, const Mat &distCoeff, OutputArray warpedImage, OutputArray warpedDepth= noArray (), OutputArray warpedMask= noArray ())

详细描述

函数文档编制

Candidate()

cv::linemod::QuantizedPyramid::Candidate::Candidate ( int x ,
int y ,
int label ,
float score
)
inline

Feature()

cv::linemod::Feature::Feature ( int x ,
int y ,
int label
)
inline

Match()

cv::linemod::Match::Match ( int x ,
int y ,
float similarity ,
const String & class_id ,
int template_id
)
inline

colormap()

void cv::linemod::colormap ( const Mat & quantized ,
Mat & dst
)
Python:
dst = cv.linemod.colormap( quantized[, dst] )

#include < opencv2/rgbd/linemod.hpp >

Debug function to colormap a quantized image for viewing.

depthTo3d()

void cv::rgbd::depthTo3d ( InputArray depth ,
InputArray K ,
OutputArray points3d ,
InputArray mask = noArray ()
)
Python:
points3d = cv.rgbd.depthTo3d( depth, K[, points3d[, mask]] )

#include < opencv2/rgbd/depth.hpp >

Converts a depth image to an organized set of 3d points. The coordinate system is x pointing left, y down and z away from the camera

Parameters
depth the depth image (if given as short int CV_U, it is assumed to be the depth in millimeters (as done with the Microsoft Kinect), otherwise, if given as CV_32F or CV_64F, it is assumed in meters)
K The calibration matrix
points3d the resulting 3d points. They are of depth the same as depth if it is CV_32F or CV_64F, and the depth of K if depth is of depth CV_U
mask the mask of the points to consider (can be empty)

depthTo3dSparse()

void cv::rgbd::depthTo3dSparse ( InputArray depth ,
InputArray in_K ,
InputArray in_points ,
OutputArray points3d
)
Python:
points3d = cv.rgbd.depthTo3dSparse( depth, in_K, in_points[, points3d] )

#include < opencv2/rgbd/depth.hpp >

Parameters
depth the depth image
in_K
in_points the list of xy coordinates
points3d the resulting 3d points

drawFeatures()

void cv::linemod::drawFeatures ( InputOutputArray img ,
const std::vector< Template > & templates ,
const Point2i & tl ,
int size = 10
)
Python:
img = cv.linemod.drawFeatures( img, templates, tl[, size] )

#include < opencv2/rgbd/linemod.hpp >

Debug function to draw linemod features.

Parameters
img
templates see Detector::addTemplate
tl template bbox top-left offset see Detector::addTemplate
size marker size see cv::drawMarker

getDefaultLINE()

Ptr < linemod::Detector > cv::linemod::getDefaultLINE ( )
Python:
retval = cv.linemod.getDefaultLINE( )

#include < opencv2/rgbd/linemod.hpp >

Factory function for detector using LINE algorithm with color gradients.

Default parameter settings suitable for VGA images.

getDefaultLINEMOD()

Ptr < linemod::Detector > cv::linemod::getDefaultLINEMOD ( )
Python:
retval = cv.linemod.getDefaultLINEMOD( )

#include < opencv2/rgbd/linemod.hpp >

Factory function for detector using LINE-MOD algorithm with color gradients and depth normals.

Default parameter settings suitable for VGA images.

isValidDepth() [1/6]

bool cv::rgbd::isValidDepth ( const float & depth )
inline

#include < opencv2/rgbd/depth.hpp >

Checks if the value is a valid depth. For CV_16U or CV_16S, the convention is to be invalid if it is a limit. For a float/double, we just check if it is a NaN

Parameters
depth the depth to check for validity

isValidDepth() [2/6]

bool cv::rgbd::isValidDepth ( const double & depth )
inline

isValidDepth() [3/6]

bool cv::rgbd::isValidDepth ( const short int & depth )
inline

isValidDepth() [4/6]

bool cv::rgbd::isValidDepth ( const unsigned short int & depth )
inline

isValidDepth() [5/6]

bool cv::rgbd::isValidDepth ( const int & depth )
inline

isValidDepth() [6/6]

bool cv::rgbd::isValidDepth ( const unsigned int & depth )
inline

registerDepth()

void cv::rgbd::registerDepth ( InputArray unregisteredCameraMatrix ,
InputArray registeredCameraMatrix ,
InputArray registeredDistCoeffs ,
InputArray Rt ,
InputArray unregisteredDepth ,
const Size & outputImagePlaneSize ,
OutputArray registeredDepth ,
bool depthDilation = false
)
Python:
registeredDepth = cv.rgbd.registerDepth( unregisteredCameraMatrix, registeredCameraMatrix, registeredDistCoeffs, Rt, unregisteredDepth, outputImagePlaneSize[, registeredDepth[, depthDilation]] )

#include < opencv2/rgbd/depth.hpp >

Registers depth data to an external camera Registration is performed by creating a depth cloud, transforming the cloud by the rigid body transformation between the cameras, and then projecting the transformed points into the RGB camera.

uv_rgb = K_rgb * [R | t] * z * inv(K_ir) * uv_ir

Currently does not check for negative depth values.

Parameters
unregisteredCameraMatrix the camera matrix of the depth camera
registeredCameraMatrix the camera matrix of the external camera
registeredDistCoeffs the distortion coefficients of the external camera
Rt the rigid body transform between the cameras. Transforms points from depth camera frame to external camera frame.
unregisteredDepth the input depth data
outputImagePlaneSize the image plane dimensions of the external camera (width, height)
registeredDepth the result of transforming the depth into the external camera
depthDilation whether or not the depth is dilated to avoid holes and occlusion errors (optional)

rescaleDepth()

void cv::rgbd::rescaleDepth ( InputArray in ,
int depth ,
OutputArray out
)
Python:
out = cv.rgbd.rescaleDepth( in, depth[, out] )

#include < opencv2/rgbd/depth.hpp >

If the input image is of type CV_16UC1 (like the Kinect one), the image is converted to floats, divided by 1000 to get a depth in meters, and the values 0 are converted to std::numeric_limits<float>::quiet_NaN() Otherwise, the image is simply converted to floats

Parameters
in the depth image (if given as short int CV_U, it is assumed to be the depth in millimeters (as done with the Microsoft Kinect), it is assumed in meters)
depth the desired output depth (floats or double)
out The rescaled float depth image

warpFrame()

void cv::rgbd::warpFrame ( const Mat & image ,
const Mat & depth ,
const Mat & mask ,
const Mat & Rt ,
const Mat & cameraMatrix ,
const Mat & distCoeff ,
OutputArray warpedImage ,
OutputArray warpedDepth = noArray () ,
OutputArray warpedMask = noArray ()
)
Python:
warpedImage, warpedDepth, warpedMask = cv.rgbd.warpFrame( image, depth, mask, Rt, cameraMatrix, distCoeff[, warpedImage[, warpedDepth[, warpedMask]]] )

#include < opencv2/rgbd/depth.hpp >

Warp the image: compute 3d points from the depth, transform them using given transformation, then project color point cloud to an image plane. This function can be used to visualize results of the Odometry algorithm.

Parameters
image The image (of CV_8UC1 or CV_8UC3 type)
depth The depth (of type used in depthTo3d fuction)
mask The mask of used pixels (of CV_8UC1), it can be empty
Rt The transformation that will be applied to the 3d points computed from the depth
cameraMatrix Camera matrix
distCoeff Distortion coefficients
warpedImage The warped image.
warpedDepth The warped depth.
warpedMask The warped mask.