input_sixteen.py 文件源码

python
阅读 21 收藏 0 点赞 0 评论 0

项目:kaggle-satellite-imagery-feature-detection 作者: toshi-k 项目源码 文件源码
def _align_two_rasters(img1, img2):

    p1 = normalize(img1[10:-10, 10:-10, 0].astype(np.float32))
    p2 = normalize(img2[10:-10, 10:-10, 7].astype(np.float32))

    x, y = poc(p2, p1)
    print('x: {0:.5f} y: {1:.5f}'.format(x, y))

    t_form = tf.SimilarityTransform(translation=(x, y))
    img3 = tf.warp(img2, t_form)

    return img3
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号