开启左侧

Emgu验证手眼标定,CvInvoke.EstimateRigidTransform报异常

[复制链接]
shq618966 发表于 2021-5-31 13:17:59 | 显示全部楼层 |阅读模式
源码:
  1. PointF[] points_camera = new PointF[9];
  2. PointF[] points_robot = new PointF[9];
  3. points_camera[0] = new PointF(1372.36f, 869f);
  4. points_camera[1] = new PointF(1758.86f, 979.07f);
  5. points_camera[2] = new PointF(2145.75f, 1090.03f);
  6. points_camera[3] = new PointF(2040.02f, 1461.64f);
  7. points_camera[4] = new PointF(1935.01f, 1833.96f);
  8. points_camera[5] = new PointF(1546.79f, 1724.21f);
  9. points_camera[6] = new PointF(1158.53f, 1613.17f);
  10. points_camera[7] = new PointF(1265.07f, 1240.49f);
  11. points_camera[8] = new PointF(1652.6f, 1351.27f);

  12. points_robot[0] = new PointF(98.884f, 320.881f);
  13. points_robot[1] = new PointF(109.81f, 322.27f);
  14. points_robot[2] = new PointF(120.62f, 323.695f);
  15. points_robot[3] = new PointF(121.88f, 313.154f);
  16. points_robot[4] = new PointF(123.111f, 302.671f);
  17. points_robot[5] = new PointF(112.23f, 301.107f);
  18. points_robot[6] = new PointF(101.626f, 299.816f);
  19. points_robot[7] = new PointF(100.343f, 310.447f);
  20. points_robot[8] = new PointF(111.083f, 311.665f);

  21. Mat warpMat;
  22. warpMat = CvInvoke.EstimateRigidTransform(points_camera, points_robot, true);
  23. Image<Gray, float> img = warpMat.ToImage<Gray, float>();
  24. float A = img.Data[0, 0, 0];
  25. float B = img.Data[0, 1, 0];
  26. float C = img.Data[0, 2, 0];
  27. float D = img.Data[1, 0, 0];
  28. float E = img.Data[1, 1, 0];
  29. float F = img.Data[1, 2, 0];
复制代码

报错位置:warpMat = CvInvoke.EstimateRigidTransform(points_camera, points_robot, true);
异常提示:引发的异常:“System.TypeInitializationException"
已尝试解决方法:
1.修改86/64平台
2.添加环境变量 D:\Program Files\Emgu\emgucv-windesktop 3.4.3.3016\bin

以上均无效

请大神提供解决思路
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表