OpenCV 4.12.0
开源计算机视觉
加载中...
搜索中...
无匹配项
基于轮廓的 3D 对象跟踪

详细描述

实现了 "RAPID-a video rate object tracker" [118],并结合了 [75] 的动态控制点提取

类  cv::rapid::GOSTracker
 
类  cv::rapid::OLSTracker
 
类  cv::rapid::Rapid
 基于轮廓的 3D 对象跟踪函数的包装器,用于统一访问 更多...
 
类  cv::rapid::Tracker
 有状态轮廓跟踪器的抽象基类。 更多...
 

函数

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()

void cv::rapid::convertCorrespondencies ( InputArray cols,
InputArray srcLocations,
OutputArray pts2d,
InputOutputArray pts3d = noArray(),
InputArray mask = noArray() )
Python
cv.rapid.convertCorrespondencies(cols, srcLocations[, pts2d[, pts3d[, mask]]]) -> pts2d, pts3d

#include <opencv2/rapid.hpp>

根据对应关系和掩膜收集对应的 2D 和 3D 点

参数
cols在直线束空间中每条线的对应位置
srcLocations源图像位置
pts2d2D 点
pts3d3D 点
mask包含非零值以保留元素的掩膜

◆ drawCorrespondencies()

void cv::rapid::drawCorrespondencies ( InputOutputArray bundle,
InputArray cols,
InputArray colors = noArray() )
Python
cv.rapid.drawCorrespondencies(bundle, cols[, colors]) -> bundle

#include <opencv2/rapid.hpp>

在直线束上调试绘制匹配对应关系的标记

参数
bundle直线束
cols直线束中的列坐标
colors标记的颜色。默认为白色。

◆ drawSearchLines()

void cv::rapid::drawSearchLines ( InputOutputArray img,
InputArray locations,
const Scalar & color )
Python
cv.rapid.drawSearchLines(img, locations, color) -> img

#include <opencv2/rapid.hpp>

在图像上调试绘制搜索线

参数
img输出图像
locations直线束的源位置
color线的颜色

◆ drawWireframe()

void cv::rapid::drawWireframe ( InputOutputArray img,
InputArray pts2d,
InputArray tris,
const Scalar & color,
int type = LINE_8,
bool cullBackface = false )
Python
cv.rapid.drawWireframe(img, pts2d, tris, color[, type[, cullBackface]]) -> img

#include <opencv2/rapid.hpp>

绘制三角形网格的线框

参数
img输出图像
pts2d通过 projectPoints 获得的 2D 点
tris三角形面连接性
color线条颜色
type线条类型。参见 LineTypes
cullBackface基于 CCW 顺序启用背面剔除

◆ extractControlPoints()

void cv::rapid::extractControlPoints ( int num,
int len,
InputArray pts3d,
InputArray rvec,
InputArray tvec,
InputArray 输入的相机内参矩阵。,
const Size & imsize,
InputArray tris,
OutputArray ctl2d,
OutputArray ctl3d )
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()

void cv::rapid::extractLineBundle ( int len,
InputArray ctl2d,
InputArray img,
OutputArray bundle,
OutputArray srcLocations )
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 类型相同的直线束图像
srcLocationsbundleimg 中的源像素位置,格式为 CV_16SC2

◆ findCorrespondencies()

void cv::rapid::findCorrespondencies ( InputArray bundle,
OutputArray cols,
OutputArray response = noArray() )
Python
cv.rapid.findCorrespondencies(bundle[, cols[, response]]) -> cols, response

#include <opencv2/rapid.hpp>

通过沿着搜索线(束中的单行)搜索最大 Sobel 边缘来查找对应的图像位置

参数
bundle直线束
cols在直线束空间中每条线的对应位置
response所选点的 Sobel 响应

◆ rapid()

float cv::rapid::rapid ( InputArray img,
int num,
int len,
InputArray pts3d,
InputArray tris,
InputArray 输入的相机内参矩阵。,
InputOutputArray rvec,
InputOutputArray tvec,
如果传入NULL,则假定尺度参数c为1.0。否则,指向的变量将被设置为最优尺度。 rmsd = 0 )
Python
cv.rapid.rapid(img, num, len, pts3d, tris, K, rvec, tvec) -> retval, rvec, tvec, rmsd

#include <opencv2/rapid.hpp>

执行单个快速 [118] 迭代的高级函数

  1. extractControlPoints
  2. extractLineBundle
  3. findCorrespondencies
  4. convertCorrespondencies
  5. solvePnPRefineLM
参数
img视频帧
num搜索线数量
len搜索线半径
pts3d网格的 3D 点
tris三角形面连接性
输入的相机内参矩阵。相机矩阵
rvec网格和相机之间的旋转。输入值用作初始解。
tvec网格和相机之间的平移。输入值用作初始解。
rmsd2D 重投影差异
返回
可提取和匹配的搜索线比例
此函数的调用图如下