实现了“RAPID——一种视频速率物体跟踪器” [115],并结合了 [73] 的动态控制点提取方法。
|
| 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>
基于对应关系和掩码收集对应的二维和三维点
- 参数
-
| cols | 每行在行束空间中的对应位置 |
| srcLocations | 源图像位置 |
| pts2d | 二维点 |
| pts3d | 三维点 |
| 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>
从网格投影轮廓中提取控制点
参见 [73] 第2.1节,步骤b
- 参数
-
| num | 控制点数 |
| len | 搜索半径(用于限制感兴趣区域) |
| pts3d | 网格的3D点 |
| rvec | 网格和摄像机之间的旋转 |
| tvec | 网格和摄像机之间的平移 |
| K | 摄像机内参 |
| 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 | 每行在行束空间中的对应位置 |
| 响应 | 所选点的Sobel响应 |
◆ rapid()
| Python |
|---|
| cv.rapid.rapid( | img, num, len, pts3d, tris, K, rvec, tvec | ) -> | retval, rvec, tvec, rmsd |