ChArUco 棋盘是一个平面棋盘,其中标记放置在棋盘的白色方格内。 更多...
#include <opencv2/objdetect/aruco_board.hpp>
|
| | CharucoBoard () |
| |
| | CharucoBoard (const Size &size, float squareLength, float markerLength, const Dictionary &dictionary, InputArray ids=noArray()) |
| | CharucoBoard 构造函数。
|
| |
| bool | checkCharucoCornersCollinear (InputArray charucoIds) const |
| | 检查 ChArUco 标记是否共线
|
| |
| std::vector< Point3f > | getChessboardCorners () const |
| | 获取 CharucoBoard::chessboardCorners
|
| |
| Size | getChessboardSize () const |
| |
| bool | getLegacyPattern () const |
| |
| float | getMarkerLength () const |
| |
| std::vector< std::vector< int > > | getNearestMarkerCorners () const |
| | 获取 CharucoBoard::nearestMarkerCorners,对于每个 charuco 角点,获取每个标记的最近标记角点 ID
|
| |
| std::vector< std::vector< int > > | getNearestMarkerIdx () const |
| | 获取 CharucoBoard::nearestMarkerIdx,对于每个 charuco 角点,获取 ids 数组中的最近标记索引
|
| |
| float | getSquareLength () const |
| |
| void | setLegacyPattern (bool legacyPattern) |
| | 设置传统的棋盘模式。
|
| |
| | Board () |
| |
| | Board (InputArrayOfArrays objPoints, const Dictionary &dictionary, InputArray ids) |
| | 通用 Board 构造函数。
|
| |
| void | generateImage (Size outSize, OutputArray img, int marginSize=0, int borderBits=1) const |
| | 绘制平面棋盘。
|
| |
| const Dictionary & | getDictionary () const |
| | 返回此棋盘使用的 Dictionary。
|
| |
| const std::vector< int > & | getIds () const |
| | 棋盘中标记的标识符向量(应与 objPoints 大小相同)。
|
| |
| const std::vector< std::vector< Point3f > > & | getObjPoints () const |
| | 返回棋盘中所有标记角点的目标点数组。
|
| |
| const Point3f & | getRightBottomCorner () const |
| | 获取棋盘右下角的坐标,在调用创建函数时设置。
|
| |
| void | matchImagePoints (InputArrayOfArrays detectedCorners, InputArray detectedIds, OutputArray objPoints, OutputArray imgPoints) const |
| | 给定一个棋盘配置和一组检测到的标记,返回相应的图像点和目标点,可以在 solvePnP() 中使用。
|
| |
ChArUco 棋盘是一个平面棋盘,其中标记放置在棋盘的白色方格内。
ChArUco 棋盘的优点是它们同时提供了 ArUco 标记的多功能性和棋盘角点的精度,这对于校准和姿态估计非常重要。棋盘图像可以使用 generateImage() 方法绘制。
◆ CharucoBoard() [1/2]
| cv::aruco::CharucoBoard::CharucoBoard |
( |
const Size & |
size, |
|
|
float |
squareLength, |
|
|
float |
markerLength, |
|
|
const Dictionary & |
dictionary, |
|
|
InputArray |
ids = noArray() |
|
) |
| |
| Python |
|---|
| cv.aruco.CharucoBoard( | size, squareLength, markerLength, dictionary[, ids] | ) -> | <aruco_CharucoBoard 对象> |
CharucoBoard 构造函数。
- 参数
-
| size | x 和 y 方向上的棋盘方格数量 |
| squareLength | squareLength 棋盘方格边长(通常以米为单位) |
| markerLength | 标记边长(与 squareLength 使用相同的单位) |
| dictionary | 标记字典,指示标记类型 |
| ids | 已使用 ID 数组,字典中的第一个标记用于填充白色棋盘方格。 |
◆ CharucoBoard() [2/2]
| cv::aruco::CharucoBoard::CharucoBoard |
( |
| ) |
|
| Python |
|---|
| cv.aruco.CharucoBoard( | size, squareLength, markerLength, dictionary[, ids] | ) -> | <aruco_CharucoBoard 对象> |
◆ checkCharucoCornersCollinear()
| bool cv::aruco::CharucoBoard::checkCharucoCornersCollinear |
( |
InputArray |
charucoIds | ) |
const |
| Python |
|---|
| cv.aruco.CharucoBoard.checkCharucoCornersCollinear( | charucoIds | ) -> | retval |
检查 ChArUco 标记是否共线
- 参数
-
| charucoIds | 每帧 charucoCorners 中每个角点的标识符列表。 |
- 返回值
- 布尔值,1(true)表示检测到的角点形成一条线,0(false)表示它们没有形成一条线。如果角点共线(true),solvePnP 和校准函数将失败。
charucoIDs 中的 ID 数量应该小于或等于棋盘中棋盘角点的数量。此函数检查 charuco 角点是否在一条直线上(如果是,则返回 true),否则返回 false。轴平行,以及对角线和其他直线被检测到。简并情况:对于 charucoIDs 数量小于或等于 2,函数返回 true。
◆ getChessboardCorners()
| std::vector< Point3f > cv::aruco::CharucoBoard::getChessboardCorners |
( |
| ) |
const |
| Python |
|---|
| cv.aruco.CharucoBoard.getChessboardCorners( | | ) -> | retval |
获取 CharucoBoard::chessboardCorners
◆ getChessboardSize()
| Size cv::aruco::CharucoBoard::getChessboardSize |
( |
| ) |
const |
| Python |
|---|
| cv.aruco.CharucoBoard.getChessboardSize( | | ) -> | retval |
◆ getLegacyPattern()
| bool cv::aruco::CharucoBoard::getLegacyPattern |
( |
| ) |
const |
| Python |
|---|
| cv.aruco.CharucoBoard.getLegacyPattern( | | ) -> | retval |
◆ getMarkerLength()
| float cv::aruco::CharucoBoard::getMarkerLength |
( |
| ) |
const |
| Python |
|---|
| cv.aruco.CharucoBoard.getMarkerLength( | | ) -> | retval |
◆ getNearestMarkerCorners()
| std::vector< std::vector< int > > cv::aruco::CharucoBoard::getNearestMarkerCorners |
( |
| ) |
const |
获取 CharucoBoard::nearestMarkerCorners,对于每个 charuco 角点,获取每个标记的最近标记角点 ID
◆ getNearestMarkerIdx()
| std::vector< std::vector< int > > cv::aruco::CharucoBoard::getNearestMarkerIdx |
( |
| ) |
const |
获取 CharucoBoard::nearestMarkerIdx,对于每个 charuco 角点,获取 ids 数组中的最近标记索引
◆ getSquareLength()
| float cv::aruco::CharucoBoard::getSquareLength |
( |
| ) |
const |
| Python |
|---|
| cv.aruco.CharucoBoard.getSquareLength( | | ) -> | retval |
◆ setLegacyPattern()
| void cv::aruco::CharucoBoard::setLegacyPattern |
( |
bool |
legacyPattern | ) |
|
| Python |
|---|
| cv.aruco.CharucoBoard.setLegacyPattern( | legacyPattern | ) -> | None |
此类的文档从以下文件生成