silhouette based 3D object tracking#
Detailed Description#
implements “RAPID-a video rate object tracker” [131] with the dynamic control point extraction of [84]
Classes#
Name |
Description |
|---|---|
|
|
|
|
|
wrapper around silhouette based 3D object tracking function for uniform access View details |
|
Abstract base class for stateful silhouette trackers. View details |
Function Documentation#
convertCorrespondencies()#
void cv::rapid::convertCorrespondencies(
InputArray cols,
InputArray srcLocations,
OutputArray pts2d,
InputOutputArray pts3d = noArray(),
InputArray mask = noArray() )
#include <opencv2/rapid.hpp>
Collect corresponding 2d and 3d points based on correspondencies and mask
Parameters
cols— correspondence-position per line in line-bundle-spacesrcLocations— the source image locationpts2d— 2d pointspts3d— 3d pointsmask— mask containing non-zero values for the elements to be retained
drawCorrespondencies()#
void cv::rapid::drawCorrespondencies(
InputOutputArray bundle,
InputArray cols,
InputArray colors = noArray() )
#include <opencv2/rapid.hpp>
Debug draw markers of matched correspondences onto a lineBundle
Parameters
bundle— the lineBundlecols— column coordinates in the line bundlecolors— colors for the markers. Defaults to white.
drawSearchLines()#
void cv::rapid::drawSearchLines(
InputOutputArray img,
InputArray locations,
const Scalar & color )
#include <opencv2/rapid.hpp>
Debug draw search lines onto an image
Parameters
img— the output imagelocations— the source locations of a line bundlecolor— the line color
drawWireframe()#
void cv::rapid::drawWireframe(
InputOutputArray img,
InputArray pts2d,
InputArray tris,
const Scalar & color,
int type = LINE_8,
bool cullBackface = false )
#include <opencv2/rapid.hpp>
Draw a wireframe of a triangle mesh
Parameters
img— the output imagepts2d— the 2d points obtained by projectPointstris— triangle face connectivitycolor— line colortype— line type. See LineTypes.cullBackface— enable back-face culling based on CCW order
extractControlPoints()#
void cv::rapid::extractControlPoints(
int num,
int len,
InputArray pts3d,
InputArray rvec,
InputArray tvec,
InputArray K,
const Size & imsize,
InputArray tris,
OutputArray ctl2d,
OutputArray ctl3d )
#include <opencv2/rapid.hpp>
Extract control points from the projected silhouette of a mesh
see [84] Sec 2.1, Step b
Parameters
num— number of control pointslen— search radius (used to restrict the ROI)pts3d— the 3D points of the meshrvec— rotation between mesh and cameratvec— translation between mesh and cameraK— camera intrinsicimsize— size of the video frametris— triangle face connectivityctl2d— the 2D locations of the control pointsctl3d— matching 3D points of the mesh
extractLineBundle()#
void cv::rapid::extractLineBundle(
int len,
InputArray ctl2d,
InputArray img,
OutputArray bundle,
OutputArray srcLocations )
#include <opencv2/rapid.hpp>
Extract the line bundle from an image
Parameters
len— the search radius. The bundle will have2*len + 1columns.ctl2d— the search lines will be centered at this points and orthogonal to the contour defined by them. The bundle will have as many rows.img— the image to read the pixel intensities values frombundle— line bundle image with sizectl2d.rows() x (2 * len + 1)and the same type asimgsrcLocations— the source pixel locations ofbundleinimgas CV_16SC2
findCorrespondencies()#
void cv::rapid::findCorrespondencies(
InputArray bundle,
OutputArray cols,
OutputArray response = noArray() )
#include <opencv2/rapid.hpp>
Find corresponding image locations by searching for a maximal sobel edge along the search line (a single row in the bundle)
Parameters
bundle— the line bundlecols— correspondence-position per line in line-bundle-spaceresponse— the sobel response for the selected point
rapid()#
float cv::rapid::rapid(
InputArray img,
int num,
int len,
InputArray pts3d,
InputArray tris,
InputArray K,
InputOutputArray rvec,
InputOutputArray tvec,
double * rmsd = 0 )
#include <opencv2/rapid.hpp>
High level function to execute a single rapid [131] iteration
Parameters
img— the video framenum— number of search lineslen— search line radiuspts3d— the 3D points of the meshtris— triangle face connectivityK— camera matrixrvec— rotation between mesh and camera. Input values are used as an initial solution.tvec— translation between mesh and camera. Input values are used as an initial solution.rmsd— the 2d reprojection difference
Returns
ratio of search lines that could be extracted and matched
Here is the call graph for this function: