error: (-215:Assertion failed) npoints >= 0 && (depth == 5 || depth == 6) in function ‘projectPoints

报错:在使用cv2.projectPoints函数时出现error: (-215:Assertion failed) npoints >= 0 && (depth == 5 || depth == 6) in function ‘projectPoints’
解决方法:
imgpts, jac = cv2.projectPoints(objpts, rvec, tvec, mtx, dist)
其中objpts是一个二维的np.array,如果输入是一维会出现该错误

你可能感兴趣的:(三维重建,python,opencv)