實現了 "RAPID-a video rate object tracker" [119] 以及 [77] 的動態控制點提取
|
| 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>
在 lineBundle 上繪製匹配對應點的除錯標記
- 參數
-
| bundle | lineBundle |
| 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>
從網格的投影輪廓中提取控制點
參見 [77] 第 2.1 節,步驟 b
- 參數
-
| 數字 | 控制點數量 |
| len | 搜尋半徑(用於限制 ROI) |
| 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 | 線束空間中每條線的對應位置 |
| response | 所選點的 Sobel 回應 |
◆ rapid()
| Python |
|---|
| cv.rapid.rapid( | img, num, len, pts3d, tris, K, rvec, tvec | ) -> | retval, rvec, tvec, rmsd |