def warpHomography(self,src_mat,H,dst_size): dst_mat = cv2.warpPerspective(src_mat, H, dst_size, flags=cv2.WARP_INVERSE_MAP|cv2.INTER_LINEAR) return dst_mat