實現"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 |
#include <opencv2/rapid.hpp>
在影像上除錯繪製搜尋線
- 引數
-
| img | 輸出影像 |
| locations | line bundle的源位置 |
| color | 線條顏色 |
◆ 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] Sec 2.1, Step b
- 引數
-
| num | 控制點數量 |
| 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 |