实现了 "RAPID-a video rate object tracker" [118],并结合了 [75] 的动态控制点提取
|
| void | cv::rapid::convertCorrespondencies (InputArray cols, InputArray srcLocations, OutputArray pts2d, InputOutputArray pts3d=noArray(), InputArray mask=noArray()) |
| |
| void | cv::rapid::drawCorrespondencies (InputOutputArray bundle, InputArray cols, InputArray colors=noArray()) |
| |
| void | cv::rapid::drawSearchLines (InputOutputArray img, InputArray locations, const Scalar &color) |
| |
| void | cv::rapid::drawWireframe (InputOutputArray img, InputArray pts2d, InputArray tris, const Scalar &color, int type=LINE_8, bool cullBackface=false) |
| |
| 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) |
| |
| void | cv::rapid::extractLineBundle (int len, InputArray ctl2d, InputArray img, OutputArray bundle, OutputArray srcLocations) |
| |
| void | cv::rapid::findCorrespondencies (InputArray bundle, OutputArray cols, OutputArray response=noArray()) |
| |
| float | cv::rapid::rapid (InputArray img, int num, int len, InputArray pts3d, InputArray tris, InputArray K, InputOutputArray rvec, InputOutputArray tvec, double *rmsd=0) |
| |
◆ convertCorrespondencies()
| Python |
|---|
| cv.rapid.convertCorrespondencies( | cols, srcLocations[, pts2d[, pts3d[, mask]]] | ) -> | pts2d, pts3d |
#include <opencv2/rapid.hpp>
根据对应关系和掩膜收集对应的 2D 和 3D 点
- 参数
-
| cols | 在直线束空间中每条线的对应位置 |
| srcLocations | 源图像位置 |
| pts2d | 2D 点 |
| pts3d | 3D 点 |
| mask | 包含非零值以保留元素的掩膜 |
◆ drawCorrespondencies()
| Python |
|---|
| cv.rapid.drawCorrespondencies( | bundle, cols[, colors] | ) -> | bundle |
#include <opencv2/rapid.hpp>
在直线束上调试绘制匹配对应关系的标记
- 参数
-
| bundle | 直线束 |
| cols | 直线束中的列坐标 |
| colors | 标记的颜色。默认为白色。 |
◆ drawSearchLines()
| Python |
|---|
| cv.rapid.drawSearchLines( | img, locations, color | ) -> | img |
◆ drawWireframe()
| Python |
|---|
| cv.rapid.drawWireframe( | img, pts2d, tris, color[, type[, cullBackface]] | ) -> | img |
◆ extractControlPoints()
| Python |
|---|
| cv.rapid.extractControlPoints( | num, len, pts3d, rvec, tvec, K, imsize, tris[, ctl2d[, ctl3d]] | ) -> | ctl2d, ctl3d |
#include <opencv2/rapid.hpp>
从网格投影轮廓中提取控制点
参见 [75] 第 2.1 节,步骤 b
- 参数
-
| num | 控制点数量 |
| len | 搜索半径(用于限制 ROI) |
| pts3d | 网格的 3D 点 |
| rvec | 网格和相机之间的旋转 |
| tvec | 网格和相机之间的平移 |
| 输入的相机内参矩阵。 | 相机内参 |
| imsize | 视频帧的大小 |
| tris | 三角形面连接性 |
| ctl2d | 控制点的 2D 位置 |
| ctl3d | 网格的匹配 3D 点 |
◆ extractLineBundle()
| Python |
|---|
| cv.rapid.extractLineBundle( | len, ctl2d, img[, bundle[, srcLocations]] | ) -> | bundle, srcLocations |
#include <opencv2/rapid.hpp>
从图像中提取直线束
- 参数
-
| len | 搜索半径。束将有 2*len + 1 列。 |
| ctl2d | 搜索线将以这些点为中心,并垂直于它们定义的轮廓。束将有相同数量的行。 |
| img | 从中读取像素强度值的图像 |
| bundle | 大小为 ctl2d.rows() x (2 * len + 1) 且与 img 类型相同的直线束图像 |
| srcLocations | bundle 在 img 中的源像素位置,格式为 CV_16SC2 |
◆ findCorrespondencies()
| Python |
|---|
| cv.rapid.findCorrespondencies( | bundle[, cols[, response]] | ) -> | cols, response |
#include <opencv2/rapid.hpp>
通过沿着搜索线(束中的单行)搜索最大 Sobel 边缘来查找对应的图像位置
- 参数
-
| bundle | 直线束 |
| cols | 在直线束空间中每条线的对应位置 |
| response | 所选点的 Sobel 响应 |
◆ rapid()
| Python |
|---|
| cv.rapid.rapid( | img, num, len, pts3d, tris, K, rvec, tvec | ) -> | retval, rvec, tvec, rmsd |