Routines.py 文件源码

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

项目:structured-output-ae 作者: sbelharbi 项目源码 文件源码
def reproject_one_shape( self, shape, bbox, window, nfids):
            '''Re-project a shape to the original plan.

            '''

            shape_re = shape
            std_w, std_h = window
            x = bbox[0]
            y = bbox[1]
            w = bbox[2]
            h = bbox[3]
            center_x = x + np.divide(w, 2)
            center_y = y + np.divide(h, 2)

            X = shape[0:nfids]
            Y = shape[nfids:]    
            # reprojecting ...
            X = X * (std_w / 2.) + center_x
            Y = Y * (std_h / 2.) + center_y
            shape_re = np.concatenate((X,Y))

            return shape_re
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号