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

推荐订阅源

I
Intezer
V
Vulnerabilities – Threatpost
Google Online Security Blog
Google Online Security Blog
T
The Exploit Database - CXSecurity.com
C
CXSECURITY Database RSS Feed - CXSecurity.com
AWS News Blog
AWS News Blog
G
GRAHAM CLULEY
P
Privacy & Cybersecurity Law Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
C
Cybersecurity and Infrastructure Security Agency CISA
N
News | PayPal Newsroom
T
Tenable Blog
Spread Privacy
Spread Privacy
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
Secure Thoughts
P
Privacy International News Feed
IT之家
IT之家
Project Zero
Project Zero
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
大猫的无限游戏
大猫的无限游戏
博客园_首页
GbyAI
GbyAI
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
量子位
雷峰网
雷峰网
Apple Machine Learning Research
Apple Machine Learning Research
Hacker News: Ask HN
Hacker News: Ask HN
Google DeepMind News
Google DeepMind News
MongoDB | Blog
MongoDB | Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
NISL@THU
NISL@THU
I
InfoQ
D
DataBreaches.Net
有赞技术团队
有赞技术团队
K
Kaspersky official blog
Security Latest
Security Latest
The Register - Security
The Register - Security
Hugging Face - Blog
Hugging Face - Blog
S
Security @ Cisco Blogs
P
Proofpoint News Feed
M
MIT News - Artificial intelligence
H
Hackread – Cybersecurity News, Data Breaches, AI and More
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
AI
AI
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
P
Proofpoint News Feed
Security Archives - TechRepublic
Security Archives - TechRepublic
N
News and Events Feed by Topic

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 自带的方法)。