halcon:3D相机手眼标定(一)

“9点标定法”

基于2D图像的像素坐标与机器人坐标(XY值),使用vector_to_hom_mat2d直接求解。

针对3D相机而言,vector_to_hom_mat2d算子可以替换为vector_to_hom_mat3d,输入变为3D相机获取的XYZ值,以及机器人坐标的XYZ值

*相机坐标系与机器人坐标系下对应点坐标值
inputImageX:=[1,2,3]
inputImageY:=[1,2,3]
inputImageZ:=[1,1,1]
inputRobotX:=[3,4,5]
inputRobotY:=[3,4,5]
inputRobotZ:=[1,1,1]
vector_to_hom_mat3d ('rigid', inputImageX, inputImageY, inputImageZ, inputRobotX, inputRobotY, inputRobotZ, outputHomMat3D)

*通过变换矩阵 准备计算重投影误差数据
affine_trans_point_3d (outputHomMat3D, inputImageX, inputImageY, inputImageZ, robotPointsX, robotPointsY,robotPointsZ)

*计算重投影误差
err2 := []
for Index := 0 to |robotPointsX|-1 by 1
*空间中点欧氏距离
    err2 := [err2, sqrt(pow(robotPointsX[Index]-inputRobotX[Index], 2) + pow(robotPointsY[Index]-robotPointsY[Index],2)) +pow(robotPointsZ[Index]-robotPointsZ[Index],2)]
endfor
outputErrMean := mean(err2)
outputErrMax  := max(err2)
  • 4
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值