nn_calc.py 文件源码

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

项目:tf_ViZDoom 作者: bounty030 项目源码 文件源码
def image_postprocessing(img, t_size_y, t_size_x, feedback, t):

    # resize image
    img = cv2.resize(img, (t_size_y, t_size_x))

    # cut image
    img = img[t_size_y/2-1:-1,:]

    # filter image
    ret,img = cv2.threshold(img,160,255,cv2.THRESH_BINARY)

    #store if flag is set
    if feedback:
        cv2.imwrite('feedback/image_' + str(t) + '_filter.png', img)

    return img

# add image and depth image
# will store all stage of processing if flag for feedback is set
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号