单应性变换的目标是从给定的几个点(通常为4点)得到单应性矩阵。 https://推导download.csdn.net/download/QQ _ 27481087/20065885
importnumpyasnpfp=NP.array ([ 188,261,587,542 ],[ 124,308,266,65 ] ) TP=NP.array ) [ 0,0,640, 640] 0) ) NBR _ corresponden ces=FP.shape [1] print (NBR _ corresponden ces ) a=NP.zeros ()2* NBR _ coresponden I )=[-FP[0][I],-fp[1][i],- 1,0,TP [0] [ I ] a [ 2* i1 ]=[ 0,0,0,-fp[0][i],-FP[1]