OpenCV 4.12.0
开源计算机视觉
加载中...
搜索中...
无匹配项

#include <opencv2/objdetect/charuco_detector.hpp>

cv::aruco::CharucoDetector 的协作图

公共成员函数

 CharucoDetector (const CharucoBoard &board, const CharucoParameters &charucoParams=CharucoParameters(), const DetectorParameters &detectorParams=DetectorParameters(), const RefineParameters &refineParams=RefineParameters())
 基本的 CharucoDetector 构造函数。
 
void detectBoard (InputArray image, OutputArray charucoCorners, OutputArray charucoIds, InputOutputArrayOfArrays markerCorners=noArray(), InputOutputArray markerIds=noArray()) const
 检测aruco标记并内插ChArUco板角点的位置
 
void detectDiamonds (InputArray image, OutputArrayOfArrays diamondCorners, OutputArray diamondIds, InputOutputArrayOfArrays markerCorners=noArray(), InputOutputArray markerIds=noArray()) const
 检测 ChArUco Diamond 标记。
 
const CharucoBoardgetBoard () const
 
const CharucoParametersgetCharucoParameters () const
 
const DetectorParametersgetDetectorParameters () const
 
const RefineParametersgetRefineParameters () const
 
void setBoard (const CharucoBoard &board)
 
void setCharucoParameters (CharucoParameters &charucoParameters)
 
void setDetectorParameters (const DetectorParameters &detectorParameters)
 
void setRefineParameters (const RefineParameters &refineParameters)
 
- 继承自 cv::Algorithm 的公共成员函数
 Algorithm ()
 
virtual ~Algorithm ()
 
virtual void clear ()
 清除算法状态。
 
virtual bool empty () const
 如果 Algorithm 为空(例如,在最开始或读取不成功后),则返回true。
 
virtual String getDefaultName () const
 
virtual void read (const FileNode &fn)
 从文件存储中读取算法参数。
 
virtual void save (const String &filename) const
 
void write (const Ptr< FileStorage > &fs, const String &name=String()) const
 
virtual void write (FileStorage &fs) const
 将算法参数存储到文件存储中。
 
void write (FileStorage &fs, const String &name) const
 

保护属性

Ptr< CharucoDetectorImpl > charucoDetectorImpl
 

其他继承成员

- 继承自 cv::Algorithm 的静态公共成员函数
template<typename _Tp >
static Ptr< _Tpload (const String &filename, const String &objname=String())
 从文件中加载算法。
 
template<typename _Tp >
static Ptr< _TploadFromString (const String &strModel, const String &objname=String())
 从字符串加载算法。
 
template<typename _Tp >
static Ptr< _Tpread (const FileNode &fn)
 从文件节点读取算法。
 
- 继承自 cv::Algorithm 的保护成员函数
void writeFormat (FileStorage &fs) const
 

构造函数 & 析构函数文档

◆ CharucoDetector()

cv::aruco::CharucoDetector::CharucoDetector ( const CharucoBoard & board,
const CharucoParameters & charucoParams = CharucoParameters(),
const DetectorParameters & detectorParams = DetectorParameters(),
const RefineParameters & refineParams = RefineParameters() )
Python
cv.aruco.CharucoDetector(board[, charucoParams[, detectorParams[, refineParams]]]) -> <aruco_CharucoDetector object>

基本的 CharucoDetector 构造函数。

参数
boardChAruco 板
charucoParamscharuco 检测参数
detectorParams标记检测参数
refineParams标记精炼检测参数

成员函数文档

◆ detectBoard()

void cv::aruco::CharucoDetector::detectBoard ( InputArray image,
OutputArray charucoCorners,
OutputArray charucoIds,
InputOutputArrayOfArrays markerCorners = noArray(),
InputOutputArray markerIds = noArray() ) const
Python
cv.aruco.CharucoDetector.detectBoard(image[, charucoCorners[, charucoIds[, markerCorners[, markerIds]]]]) -> charucoCorners, charucoIds, markerCorners, markerIds

检测aruco标记并内插ChArUco板角点的位置

参数
image用于角点细化的输入图像。请注意,标记未被检测到,应在 corners 和 ids 参数中发送。
charucoCorners插值的棋盘格角点。
charucoIds插值的棋盘格角点标识符。
markerCorners已检测到的标记角点的向量。对于每个标记,提供其四个角点(例如 std::vector<std::vector<cv::Point2f> >)。对于 N 个检测到的标记,此数组的维度应为 Nx4。角点的顺序应为顺时针。如果 markerCorners 和 markerIds 为空,则函数将检测 aruco 标记和 ID。
markerIdscorners 中每个标记的标识符列表。如果 markerCorners 和 markerIds 为空,则函数将检测 aruco 标记和 ID。

此函数接收检测到的标记,并使用检测到的 Aruco 标记返回 ChArUco 板的棋盘格角点的二维位置。

如果 markerCorners 和 markerIds 为空,则 detectMarkers() 将运行并检测 aruco 标记和 ID。

如果提供了相机参数,则该过程基于近似姿态估计,否则基于局部单应性。只返回可见角点。对于每个角点,其相应的标识符也将在 charucoIds 中返回。

另请参见
findChessboardCorners
注意
在 OpenCV 4.6.0 之后,ChArUco 图案生成算法对偶数行计数进行了不兼容的更改。使用 cv::aruco::CharucoBoard::setLegacyPattern() 以确保与使用早于 4.6.0 版本的 OpenCV 创建的图案兼容。更多信息,请参阅此问题:https://github.com/opencv/opencv/issues/23152
此函数的调用图如下

◆ detectDiamonds()

void cv::aruco::CharucoDetector::detectDiamonds ( InputArray image,
OutputArrayOfArrays diamondCorners,
OutputArray diamondIds,
InputOutputArrayOfArrays markerCorners = noArray(),
InputOutputArray markerIds = noArray() ) const
Python
cv.aruco.CharucoDetector.detectDiamonds(image[, diamondCorners[, diamondIds[, markerCorners[, markerIds]]]]) -> diamondCorners, diamondIds, markerCorners, markerIds

检测 ChArUco Diamond 标记。

参数
image用于角点亚像素处理的输入图像。
diamondCorners检测到的菱形角点(每个菱形4个角点)的输出列表。顺序与标记角点相同:左上、右上、右下、左下。格式类似于 detectMarkers 返回的角点(例如 std::vector<std::vector<cv::Point2f> >)。
diamondIdsdiamondCorners 中菱形的 ID。每个菱形的 ID 实际上是 Vec4i 类型,因此每个菱形有 4 个 ID,它们是构成菱形的 aruco 标记的 ID。
markerCorners来自 detectMarkers 函数的已检测标记角点列表。如果 markerCorners 和 markerIds 为空,则函数将检测 aruco 标记和 ID。
markerIdsmarkerCorners 中标记 ID 的列表。如果 markerCorners 和 markerIds 为空,则函数将检测 aruco 标记和 ID。

此函数从之前检测到的 ArUco 标记中检测菱形标记。菱形在 diamondCorners 和 diamondIds 参数中返回。如果提供了相机校准参数,则菱形搜索基于重投影。如果未提供,则菱形搜索基于单应性。单应性比重投影快,但精度较低。

此函数的调用图如下

◆ getBoard()

const CharucoBoard & cv::aruco::CharucoDetector::getBoard ( ) const
Python
cv.aruco.CharucoDetector.getBoard() -> retval

◆ getCharucoParameters()

const CharucoParameters & cv::aruco::CharucoDetector::getCharucoParameters ( ) const
Python
cv.aruco.CharucoDetector.getCharucoParameters() -> retval

◆ getDetectorParameters()

const DetectorParameters & cv::aruco::CharucoDetector::getDetectorParameters ( ) const
Python
cv.aruco.CharucoDetector.getDetectorParameters() -> retval

◆ getRefineParameters()

const RefineParameters & cv::aruco::CharucoDetector::getRefineParameters ( ) const
Python
cv.aruco.CharucoDetector.getRefineParameters() -> retval

◆ setBoard()

void cv::aruco::CharucoDetector::setBoard ( const CharucoBoard & board)
Python
cv.aruco.CharucoDetector.setBoard(board) ->

◆ setCharucoParameters()

void cv::aruco::CharucoDetector::setCharucoParameters ( CharucoParameters & charucoParameters)
Python
cv.aruco.CharucoDetector.setCharucoParameters(charucoParameters) ->

◆ setDetectorParameters()

void cv::aruco::CharucoDetector::setDetectorParameters ( const DetectorParameters & detectorParameters)
Python
cv.aruco.CharucoDetector.setDetectorParameters(detectorParameters) ->

◆ setRefineParameters()

void cv::aruco::CharucoDetector::setRefineParameters ( const RefineParameters & refineParameters)
Python
cv.aruco.CharucoDetector.setRefineParameters(refineParameters) ->

成员数据文档

◆ charucoDetectorImpl

Ptr<CharucoDetectorImpl> cv::aruco::CharucoDetector::charucoDetectorImpl
保护

此类的文档生成自以下文件