我可以在哪个 c++ 类中找到 cv::findChessboardCorners()
in which c++ Class can I find cv::findChessboardCorners()
>有谁知道函数是否 OpenCV 中的cv::findChessboardCorners()
是在 c++ 类中实现的,如果是,请问哪一个
谢谢
#include <opencv2/calib3d/calib3d.hpp> ( L170 )
我从信号处理堆栈交换中的此链接中找到了脚本的位置,该位置存在于文件calib3d/src/calibinit.cpp第424行。
CV_IMPL
int cvFindChessboardCorners( const void* arr, CvSize pattern_size,
CvPoint2D32f* out_corners, int* out_corner_count,
int flags )
答案包括对函数中涉及的过程的描述:
- 使用 cvCheckChessboard 确定图像中是否有棋盘
- 转换为二进制 (B&W) 并扩张以将角分开
- 使用 icvGenerateQuads 查找正方形。
然后,代码似乎要经过一组检查来压缩这些 四边形到棋盘角,包括icvFindConnectedQuads, icvCleanFoundConnectedQuads去除多余的角落, icvCheckQuadGroup 和 icvCheckBoardMonotony。
所有这些函数都在同一个文件中实现,除了 cvCheckChessboard,位于calib3d/src/checkchessboard.cpp中。 根据您希望理解代码的程度,似乎有 许多调试行,如果 #define,则可以包含这些行 DEBUG_CHESSBOARD,这可能有助于您了解正在发生的事情。
源代码
可以在opencv存档中找到opencv/modules/calib3d/src/calibinit.cpp
行219。快速浏览一下这里。
int cvFindChessboardCorners( const void* arr, CvSize pattern_size,
CvPoint2D32f* out_corners, int* out_corner_count,
int flags )
{
....
}
相关文章:
- 将"打开的CV图像"中的"颜色"转换为整数格式
- 概念中的cv限定符需要表达式参数列表
- 将CHW格式的浮点向量转换为cv::Mat
- 错误的cv::face FacemarkLBF实例化
- 如何检查给定的参数是否为 cv::noArray()?
- 开放 CV 中的动态内存分配,用于视频处理
- 如何在 opencv 中使用 cv::VideoCapture::waitAny()
- 错误:未定义对cv::cudacodec::createVideoReader的引用
- OpenCV 3.4.1 error readNetFromTensorflow 无法在 cv::d nn::ReadProtoFromBinaryFile 中打开 .pb
- C++:从GPU内存(cudaMemcpy2D)获取BGR图像(cv::Mat)
- 选择基于另一个垫子的非零像素的cv::Mat的一部分?
- 将 cv::mat 转换为 QImage
- Inference pytorch C++ with alexnet and cv::imread image
- OpenCV 3.4.3 中对 'cv::String::d eallocate()' 错误的未定义引用
- cv::Normalise() 中的 L2_NORM 和 NORM_MINMAX 实现有什么区别?
- 将 cv::Mat 转换为 std::vector 的通用函数
- OpenCV undefined reference to 'cv::imread(cv::String const&, int)'
- 在 QML VideoOutput 中将 cv::mat 显示为 QVideoFrame
- 如何应用带有cv::cuda和C++的Canny Edge检测器?
- cv::connectedComponents vs cv::findContours 的实现和速度差异