python读取红外图

青春壹個敷衍的年華 提交于 2020-10-14 00:36:34

 

1.opencv读的话,读取方式 unchanged,值为-1,

img=(img/4).astype(np.uint8)

2.换用np.fromfile接口,有时读的图不对,还没找到原因

def bin2numpy_ex(file_path, shape):
    rawImg = np.fromfile(file_path, dtype=np.uint16)
    rawImg = rawImg[: shape[0]*shape[1]]
    pic_gray = rawImg.reshape(shape)

    return pic_gray

 

KinectV2+opencv获取红外图

 

https://download.csdn.net/download/cs2539263027/9882136?utm_medium=distribute.pc_aggpage_search_result.none-task-download-2~download~first_rank_v2~rank_v25-1-9882136.nonecase&utm_term=opencv%E6%98%BE%E7%A4%BA%E7%BA%A2%E5%A4%96%E5%9B%BE&spm=1000.2123.3001.4430

 

https://blog.csdn.net/pancast/article/details/78443789?utm_medium=distribute.pc_relevant_download.none-task-blog-baidujs-3.nonecase&depth_1-utm_source=distribute.pc_relevant_download.none-task-blog-baidujs-3.nonecase

 

参考这个:

https://blog.csdn.net/tengfei461807914/article/details/80615721?utm_medium=distribute.pc_relevant.none-task-blog-title-5&spm=1001.2101.3001.4242

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!