estimate()==>从一组对应的点估算变换是否成功
发布日期:2021-07-01 02:26:44 浏览次数:2 分类:技术文章

本文共 929 字,大约阅读时间需要 3 分钟。

def estimate(self, src, dst):作用:Estimate the transformation from a set of corresponding points.    You can determine the over-, well- and under-determined parameters with the total least-squares method.    Number of source and destination coordinates must match.    Parameters    ----------    src : (N, 2) array        Source coordinates.    dst : (N, 2) array        Destination coordinates.    Returns    -------    success : bool    True, if model estimation succeeds.
from skimage import transform as transimport numpy as npsrc = np.array([    [38.2946, 51.6963],    [73.5318, 51.5014],    [56.0252, 71.7366],    [41.5493, 92.3655],    [70.7299, 92.2041] ], dtype=np.float32)dst = np.array([    [38.2946, 51.6963],    [73.5318, 51.5014],    [56.0252, 71.7366],    [41.5493, 92.3655],    [70.7299, 92.2041] ], dtype=np.float32)tform = trans.SimilarityTransform()res =tform.estimate(dst, src)M = tform.paramsprint(res)print(M)

转载地址:https://mapengsen.blog.csdn.net/article/details/117918820 如侵犯您的版权,请留言回复原文章的地址,我们会给您删除此文章,给您带来不便请您谅解!

上一篇:transform.SimilarityTransform()==>图像的相似变换=等距变换(平移+旋转变换)+均匀尺度缩放
下一篇:python实现读取并显示图片的方法(PIL)

发表评论

最新留言

不错!
[***.144.177.141]2024年04月23日 23时44分23秒