Open wty2333 opened 1 year ago
运行代码时 In[29] 中
tps_img = tps_trans(original_position, new_position, img1, tps_lambda = 0.2)
函数tps_trans
中tps.estimateTransformation(p2, p1, matches)
报错error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv_contrib\modules\shape\src\tps_trans.cpp:203: error: (-215:Assertion failed) _matches.size()>1 in function 'cv::ThinPlateSplineShapeTransformerImpl::estimateTransformation'
是的,抱歉,没有输出的位置应该是程序存在bug的。
运行代码时 In[29] 中
tps_img = tps_trans(original_position, new_position, img1, tps_lambda = 0.2)
函数tps_trans
中tps.estimateTransformation(p2, p1, matches)
报错error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv_contrib\modules\shape\src\tps_trans.cpp:203: error: (-215:Assertion failed) _matches.size()>1 in function 'cv::ThinPlateSplineShapeTransformerImpl::estimateTransformation'
是的,抱歉,没有输出的位置应该是程序存在bug的。
好像找到了 here
最佳答案:
我也有同样的问题简单的重塑解决了这个问题已经很晚了,但也许有人会觉得有用以下是重塑sourceshape和targetshape的线条:
sourceshape=sourceshape.reshape(1,-1,2) targetshape=targetshape.reshape(1,-1,2)
运行代码时 In[29] 中
tps_img = tps_trans(original_position, new_position, img1, tps_lambda = 0.2)
函数tps_trans
中tps.estimateTransformation(p2, p1, matches)
报错error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv_contrib\modules\shape\src\tps_trans.cpp:203: error: (-215:Assertion failed) _matches.size()>1 in function 'cv::ThinPlateSplineShapeTransformerImpl::estimateTransformation'
是的,抱歉,没有输出的位置应该是程序存在bug的。
好像找到了 here
最佳答案:
我也有同样的问题简单的重塑解决了这个问题已经很晚了,但也许有人会觉得有用以下是重塑sourceshape和targetshape的线条:
sourceshape=sourceshape.reshape(1,-1,2) targetshape=targetshape.reshape(1,-1,2)
好的,非常感谢,我在后面的仿射变换等功能没有来得及完善,只做完了图形上下文和匈牙利匹配。
运行代码时 In[29] 中
tps_img = tps_trans(original_position, new_position, img1, tps_lambda = 0.2)
函数tps_trans
中tps.estimateTransformation(p2, p1, matches)
报错error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv_contrib\modules\shape\src\tps_trans.cpp:203: error: (-215:Assertion failed) _matches.size()>1 in function 'cv::ThinPlateSplineShapeTransformerImpl::estimateTransformation'
是的,抱歉,没有输出的位置应该是程序存在bug的。
好像找到了 here
最佳答案:
我也有同样的问题简单的重塑解决了这个问题已经很晚了,但也许有人会觉得有用以下是重塑sourceshape和targetshape的线条:
sourceshape=sourceshape.reshape(1,-1,2) targetshape=targetshape.reshape(1,-1,2)
好的,非常感谢,我在后面的仿射变换等功能没有来得及完善,只做完了图形上下文和匈牙利匹配。
好罢,谢谢
运行代码时 In[29] 中
tps_img = tps_trans(original_position, new_position, img1, tps_lambda = 0.2)
函数tps_trans
中tps.estimateTransformation(p2, p1, matches)
报错error: OpenCV(4.5.5) D:\a\opencv-python\opencv-python\opencv_contrib\modules\shape\src\tps_trans.cpp:203: error: (-215:Assertion failed) _matches.size()>1 in function 'cv::ThinPlateSplineShapeTransformerImpl::estimateTransformation'