资源简介

经典手眼标定算法C++代码,程序是基于OpenCV 2.0以上版本,下载程序后需要配置OpenCV。工程主要包括三个文件,handeye.h为各种手眼标定的实现,quaternion.h为四元数运算文件,handeye_test.cpp为主程序,测试各手眼标定算法的可行性。

资源截图

代码片段和文件信息

// handeye_test.cpp : 定义控制台应用程序的入口点。
//

#include “stdafx.h“
#include “handeye.h“


using namespace std;


int _tmain(int argc _TCHAR* argv[])
{
// 测试程序测试数据为Park文中例子 Robot Sensor Calibration: Solving AX = XB on the Euclidean Group
double a1[4][4] = { -0.989992 -0.141120 0.000000 0
0.141120 -0.989992 0.000000 0
0.000000 0.000000 1.000000 0
0 0 0 1 };
double a2[4][4] = { 0.070737 0.000000 0.997495 -400.000
0.000000 1.000000 0.000000 0
-0.997495 0.000000 0.070737 400.000
0 0 0 1 };

double b1[4][4] = { -0.989992 -0.138307 0.028036 -26.9559
0.138307 -0.911449 0.387470 -96.1332
-0.028036 0.387470 0.921456 19.4872
0 0 0 1 };
double b2[4][4] = { 0.070737 0.198172 0.977612 -309.543
-0.198172 0.963323 -0.180936 59.0244
-0.977612 -0.180936 0.107415 291.177
0 0 0 1 };

Mat A1(4 4 CV_64FC1 a1);
Mat A2(4 4 CV_64FC1 a2);
Mat B1(4 4 CV_64FC1 b1);
Mat B2(4 4 CV_64FC1 b2);

vector Hgij;
vector Hcij;

Hgij.push_back(A1);
Hgij.push_back(A2);
Hcij.push_back(B1);
Hcij.push_back(B2);

Mat Hcg1(4 4 CV_64FC1);
Tsai_HandEye(Hcg1 Hgij Hcij);

Mat Hcg2(4 4 CV_64FC1);
DualQ_HandEye(Hcg2 Hgij Hcij);

Mat Hcg3(4 4 CV_64FC1);
Inria_HandEye(Hcg3 Hgij Hcij);

Mat Hcg4(4 4 CV_64FC1);
Navy_HandEye(Hcg4 Hgij Hcij);

Mat Hcg5(4 4 CV_64FC1);
Kron_HandEye(Hcg5 Hgij Hcij);

cout << Hcg1 << endl << endl;
cout << Hcg2 << endl << endl;
cout << Hcg3 << endl << endl;
cout << Hcg4 << endl << endl;
cout << Hcg5 << endl << endl;





return 0;
}


 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----

     文件     166912  2016-06-08 09:47  handeye_test\Debug\handeye_test.exe

     文件     603924  2016-06-08 09:47  handeye_test\Debug\handeye_test.ilk

     文件    3174400  2016-06-08 09:47  handeye_test\Debug\handeye_test.pdb

     文件       1033  2016-04-02 16:02  handeye_test\handeye_test\Debug\handeye_test.Build.CppClean.log

     文件       1928  2016-06-08 09:47  handeye_test\handeye_test\Debug\handeye_test.log

     文件     625082  2016-06-08 09:47  handeye_test\handeye_test\Debug\handeye_test.obj

     文件    1638400  2016-04-02 16:10  handeye_test\handeye_test\Debug\handeye_test.pch

     文件       2112  2016-06-08 09:47  handeye_test\handeye_test\Debug\handeye_test.tlog\cl.command.1.tlog

     文件      37188  2016-06-08 09:47  handeye_test\handeye_test\Debug\handeye_test.tlog\CL.read.1.tlog

     文件       1952  2016-06-08 09:47  handeye_test\handeye_test\Debug\handeye_test.tlog\CL.write.1.tlog

     文件        162  2016-06-08 09:47  handeye_test\handeye_test\Debug\handeye_test.tlog\handeye_test.lastbuildstate

     文件       2108  2016-06-08 09:47  handeye_test\handeye_test\Debug\handeye_test.tlog\link.command.1.tlog

     文件       5538  2016-06-08 09:47  handeye_test\handeye_test\Debug\handeye_test.tlog\link.read.1.tlog

     文件        492  2016-06-08 09:47  handeye_test\handeye_test\Debug\handeye_test.tlog\link.write.1.tlog

     文件      11708  2016-04-02 16:10  handeye_test\handeye_test\Debug\stdafx.obj

     文件     448179  2016-04-03 21:25  handeye_test\handeye_test\Debug\test.obj

     文件     764928  2016-06-08 09:47  handeye_test\handeye_test\Debug\vc120.idb

     文件    1478656  2016-06-08 09:47  handeye_test\handeye_test\Debug\vc120.pdb

     文件      16220  2016-06-07 21:36  handeye_test\handeye_test\handeye.h

     文件       1684  2016-06-08 09:52  handeye_test\handeye_test\handeye_test.cpp

     文件       5450  2016-04-03 21:28  handeye_test\handeye_test\handeye_test.vcxproj

     文件       1500  2016-04-03 21:28  handeye_test\handeye_test\handeye_test.vcxproj.filters

     文件       5327  2016-04-22 19:12  handeye_test\handeye_test\quaternion.h

     文件       1545  2016-03-22 15:27  handeye_test\handeye_test\ReadMe.txt

     文件        218  2016-03-22 15:27  handeye_test\handeye_test\stdafx.cpp

     文件        234  2016-03-22 15:27  handeye_test\handeye_test\stdafx.h

     文件        236  2016-03-22 15:27  handeye_test\handeye_test\targetver.h

     文件   15073280  2016-06-09 14:49  handeye_test\handeye_test.sdf

     文件        982  2016-03-22 15:27  handeye_test\handeye_test.sln

    ..A..H.     37888  2016-06-09 14:49  handeye_test\handeye_test.v12.suo

............此处省略11个文件信息

评论

共有 条评论