|
| CV_EXPORTS_W void | cv::rapid::drawCorrespondencies (InputOutputArray bundle, InputArray cols, InputArray colors=noArray()) |
| |
| CV_EXPORTS_W void | cv::rapid::drawSearchLines (InputOutputArray img, InputArray locations, const Scalar &color) |
| |
| CV_EXPORTS_W void | cv::rapid::drawWireframe (InputOutputArray img, InputArray pts2d, InputArray tris, const Scalar &color, int type=LINE_8, bool cullBackface=false) |
| |
| CV_EXPORTS_W 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) |
| |
| CV_EXPORTS_W void | cv::rapid::extractLineBundle (int len, InputArray ctl2d, InputArray img, OutputArray bundle, OutputArray srcLocations) |
| |
| CV_EXPORTS_W void | cv::rapid::findCorrespondencies (InputArray bundle, OutputArray cols, OutputArray response=noArray()) |
| |
| CV_EXPORTS_W void | cv::rapid::convertCorrespondencies (InputArray cols, InputArray srcLocations, OutputArray pts2d, InputOutputArray pts3d=noArray(), InputArray mask=noArray()) |
| |
| CV_EXPORTS_W float | cv::rapid::rapid (InputArray img, int num, int len, InputArray pts3d, InputArray tris, InputArray K, InputOutputArray rvec, InputOutputArray tvec, CV_OUT double *rmsd=0) |
| |
implements "RAPID-a video rate object tracker" [harris1990rapid] with the dynamic control point extraction of [drummond2002real]
◆ convertCorrespondencies()
| CV_EXPORTS_W void cv::rapid::convertCorrespondencies |
( |
InputArray |
cols, |
|
|
InputArray |
srcLocations, |
|
|
OutputArray |
pts2d, |
|
|
InputOutputArray |
pts3d = noArray(), |
|
|
InputArray |
mask = noArray() |
|
) |
| |
Collect corresponding 2d and 3d points based on correspondencies and mask
- 引数
-
| cols | correspondence-position per line in line-bundle-space |
| srcLocations | the source image location |
| pts2d | 2d points |
| pts3d | 3d points |
| mask | mask containing non-zero values for the elements to be retained |
◆ drawCorrespondencies()
| CV_EXPORTS_W void cv::rapid::drawCorrespondencies |
( |
InputOutputArray |
bundle, |
|
|
InputArray |
cols, |
|
|
InputArray |
colors = noArray() |
|
) |
| |
Debug draw markers of matched correspondences onto a lineBundle
- 引数
-
| bundle | the lineBundle |
| cols | column coordinates in the line bundle |
| colors | colors for the markers. Defaults to white. |
◆ drawSearchLines()
| CV_EXPORTS_W void cv::rapid::drawSearchLines |
( |
InputOutputArray |
img, |
|
|
InputArray |
locations, |
|
|
const Scalar & |
color |
|
) |
| |
Debug draw search lines onto an image
- 引数
-
| img | the output image |
| locations | the source locations of a line bundle |
| color | the line color |
◆ drawWireframe()
| CV_EXPORTS_W void cv::rapid::drawWireframe |
( |
InputOutputArray |
img, |
|
|
InputArray |
pts2d, |
|
|
InputArray |
tris, |
|
|
const Scalar & |
color, |
|
|
int |
type = LINE_8, |
|
|
bool |
cullBackface = false |
|
) |
| |
Draw a wireframe of a triangle mesh
- 引数
-
| img | the output image |
| pts2d | the 2d points obtained by projectPoints |
| tris | triangle face connectivity |
| color | line color |
| type | line type. See LineTypes. |
| cullBackface | enable back-face culling based on CCW order |
◆ extractControlPoints()
| CV_EXPORTS_W 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 |
|
) |
| |
Extract control points from the projected silhouette of a mesh
see [drummond2002real] Sec 2.1, Step b
- 引数
-
| num | number of control points |
| len | search radius (used to restrict the ROI) |
| pts3d | the 3D points of the mesh |
| rvec | rotation between mesh and camera |
| tvec | translation between mesh and camera |
| K | camera intrinsic |
| imsize | size of the video frame |
| tris | triangle face connectivity |
| ctl2d | the 2D locations of the control points |
| ctl3d | matching 3D points of the mesh |
◆ extractLineBundle()
| CV_EXPORTS_W void cv::rapid::extractLineBundle |
( |
int |
len, |
|
|
InputArray |
ctl2d, |
|
|
InputArray |
img, |
|
|
OutputArray |
bundle, |
|
|
OutputArray |
srcLocations |
|
) |
| |
Extract the line bundle from an image
- 引数
-
| len | the search radius. The bundle will have 2*len + 1 columns. |
| 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 from |
| bundle | line bundle image with size ctl2d.rows() x (2 * len + 1) and the same type as img |
| srcLocations | the source pixel locations of bundle in img as CV_16SC2 |
◆ findCorrespondencies()
| CV_EXPORTS_W void cv::rapid::findCorrespondencies |
( |
InputArray |
bundle, |
|
|
OutputArray |
cols, |
|
|
OutputArray |
response = noArray() |
|
) |
| |
Find corresponding image locations by searching for a maximal sobel edge along the search line (a single row in the bundle)
- 引数
-
| bundle | the line bundle |
| cols | correspondence-position per line in line-bundle-space |
| response | the sobel response for the selected point |
◆ rapid()
| CV_EXPORTS_W float cv::rapid::rapid |
( |
InputArray |
img, |
|
|
int |
num, |
|
|
int |
len, |
|
|
InputArray |
pts3d, |
|
|
InputArray |
tris, |
|
|
InputArray |
K, |
|
|
InputOutputArray |
rvec, |
|
|
InputOutputArray |
tvec, |
|
|
CV_OUT double * |
rmsd = 0 |
|
) |
| |
High level function to execute a single rapid [harris1990rapid] iteration
- extractControlPoints
- extractLineBundle
- findCorrespondencies
- convertCorrespondencies
- solvePnPRefineLM
- 引数
-
| img | the video frame |
| num | number of search lines |
| len | search line radius |
| pts3d | the 3D points of the mesh |
| tris | triangle face connectivity |
| K | camera matrix |
| rvec | 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 |
- 戻り値
- ratio of search lines that could be extracted and matched