Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/linux/26.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
cv.CalibleCamera2(python)“;两个矩阵的点数必须相同;_Python_Linux_Opencv - Fatal编程技术网

cv.CalibleCamera2(python)“;两个矩阵的点数必须相同;

cv.CalibleCamera2(python)“;两个矩阵的点数必须相同;,python,linux,opencv,Python,Linux,Opencv,我希望这是一个相当简单的问题;我正在尝试使用以下openCV命令 cv.CalibrateCamera2(object_points2, image_points2, point_counts2, cv.GetSize(image), intrinsic_matrix, distortion_coeffs, rvecs, tvecs, 0) 但我收到以下错误 cv.error: Both matrices must have the same number of points 使用numpy

我希望这是一个相当简单的问题;我正在尝试使用以下openCV命令

cv.CalibrateCamera2(object_points2, image_points2, point_counts2, cv.GetSize(image), intrinsic_matrix, distortion_coeffs, rvecs, tvecs, 0)
但我收到以下错误

cv.error: Both matrices must have the same number of points
使用numpy.shape和numpy.array,数组的形状为:

print shape(array(object_points2)) --> (980, 3)
print shape(array(image_points2)) --> (980, 2)
print shape(array(point_counts2)) --> (20, 1)
print shape(array(intrinsic_matrix)) --> (3, 3)
print shape(array(distortion_coeffs)) --> (5, 1)
print shape(array(rvecs)) --> (20, 3)
print shape(array(tvecs)) --> (20, 3)
很明显,我遗漏了一些东西,但我一整天都在努力想办法解决这个问题! 我是不是很愚蠢

非常感谢!:)
Josh

您可能已经解决了它,但供将来参考:
当点计数2中的数据没有面对对象点2的长度时,我出现了这样的错误。

您是否使用CvMat作为矩阵?