惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

N
Netflix TechBlog - Medium
V
Vulnerabilities – Threatpost
Google Online Security Blog
Google Online Security Blog
Hugging Face - Blog
Hugging Face - Blog
L
LINUX DO - 热门话题
云风的 BLOG
云风的 BLOG
P
Proofpoint News Feed
D
Docker
C
Cyber Attacks, Cyber Crime and Cyber Security
MyScale Blog
MyScale Blog
P
Palo Alto Networks Blog
T
Tenable Blog
P
Privacy International News Feed
Google DeepMind News
Google DeepMind News
小众软件
小众软件
Cisco Talos Blog
Cisco Talos Blog
aimingoo的专栏
aimingoo的专栏
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
A
Arctic Wolf
C
Cybersecurity and Infrastructure Security Agency CISA
C
Cisco Blogs
T
Threat Research - Cisco Blogs
NISL@THU
NISL@THU
The Hacker News
The Hacker News
Project Zero
Project Zero
AWS News Blog
AWS News Blog
Simon Willison's Weblog
Simon Willison's Weblog
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
T
Threatpost
V
Visual Studio Blog
The GitHub Blog
The GitHub Blog
The Cloudflare Blog
Last Week in AI
Last Week in AI
Jina AI
Jina AI
Cyberwarzone
Cyberwarzone
The Register - Security
The Register - Security
C
CXSECURITY Database RSS Feed - CXSecurity.com
Vercel News
Vercel News
D
Darknet – Hacking Tools, Hacker News & Cyber Security
MongoDB | Blog
MongoDB | Blog
U
Unit 42
Scott Helme
Scott Helme
A
About on SuperTechFans
WordPress大学
WordPress大学
F
Fortinet All Blogs
大猫的无限游戏
大猫的无限游戏
G
GRAHAM CLULEY
Latest news
Latest news
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
S
Schneier on Security

OpenCV

目标检测,计算出旋转速度和加速度,有人精通吗?急 - V2EX opencv 图像动态融合问题 - V2EX [求助]C++ 用到 OpenCV 库 怎么静态编译呢? - V2EX opencv 去除视频中移动的文字 - V2EX Opencv 遇到一个很奇怪的问题, mac 上获取摄像头图片,必须需要 sleep 一下, 0.1 都可以,但是不给就是黑图,代码如下,有没有大佬指点一下 - V2EX 请教一个 opencv 算法,图片中检测圆形对象 - V2EX 用 C++调用 OpenCV 的 matchTemplate 反而比 Python 更慢 - V2EX mov 视频的图片如何转换? - V2EX 大家有用过类似 PS Content-Aware Fill 抠图的库或源码吗(不限语言) - V2EX nii 文件用 opencv 转换为 mp4 视频画面失真,求教 - V2EX [求助] 如何确定点在曲线中的位置 - V2EX 哇 期待很久的 计算机视觉 - V2EX
请问一个关于 OpenCV 手眼标定(cv::calibrateHandEye)获取相机安装参数的问题 - V2EX
deemoe · 2024-07-25 · via OpenCV

我有一台固定在云台上的相机,我想要知道这个相机相对安装平台的旋转和平移量。其中云台是固定不动的,只有 pitch 、yaw 、和 roll 轴的运动。查了一下应该是用这个函数:

void calibrateHandEye(
    InputArrayOfArrays R_gripper2base,  // 云台 p y r 角度转换出来的旋转矩阵
    InputArrayOfArrays t_gripper2base,  // 输入的是 0 ,因为没有任何移动(并且想用云台平台当世界坐标中心点)
    InputArrayOfArrays R_target2cam,    // calibrateCamera 输出的 rvec
    InputArrayOfArrays t_target2cam,    // calibrateCamera 输出的 tvec
    OutputArray R_cam2gripper, 
    OutputArray t_cam2gripper, 
    HandEyeCalibrationMethod method = CALIB_HAND_EYE_TSAI)

我现在是这样做的:

  1. 将云台的 p y r 旋转到不同角度,拍摄棋盘格的照片,同时记录该时刻的 p y r 角旋转角度;
  2. 使用 calibrateCamera 得到每一张图片里棋盘格的 tvec 和 rvec ;
  3. 将记录的云台 p y r 角度转换为旋转矩阵;
  4. 调用 calibrateHandEye 。

但是结果和实际相差巨大。因此想来 V 站看看有没有人有过这方面经验,能看出我的步骤里可能有什么问题……先在这里谢过各位了!


我个人感觉比较容易出问题的地方是第三步的转换,我是这样写的:

    Eigen::Quaternionf euler2quaternionf(const float z, const float y, const float x)
    {
        const float cos_z = cos(z * 0.5f), sin_z = sin(z * 0.5f),
                    cos_y = cos(y * 0.5f), sin_y = sin(y * 0.5f),
                    cos_x = cos(x * 0.5f), sin_x = sin(x * 0.5f);

        Eigen::Quaternionf quaternion(
            cos_z * cos_y * cos_x + sin_z * sin_y * sin_x,
            cos_z * cos_y * sin_x - sin_z * sin_y * cos_x,
            sin_z * cos_y * sin_x + cos_z * sin_y * cos_x,
            sin_z * cos_y * cos_x - cos_z * sin_y * sin_x
        );

        return quaternion;
    }

先转换为四元数,再求旋转矩阵(用 Eigen 自带的方法)。