切分raw为depth和ir
split_raw.py
#!pythonimport argparsefrom photos import *from data_common import * parser = argparse.ArgumentParser() parser.add_argument('directory', action="store", help=u'文件名') parser.add_argument('--version', action='version', version='%(prog)s 1.1 Rongzhong xu 2018 04 11') options = parser.parse_args() files = find_files_by_type(options.directory,filetype="raw")for filename in files: split_raw(filename)
转换ir为depth
#!pythonimport argparsefrom photos import *from data_common import * parser = argparse.ArgumentParser() parser.add_argument('filename', action="store", help=u'文件名') parser.add_argument('-b', action="store_true", default=False, help=u'是否批量') parser.add_argument('-t', action="store", dest="type", default="ir", help=u'文件类型') parser.add_argument('--version', action='version', version='%(prog)s 1.1 Rongzhong xu 2018 04 11') options = parser.parse_args()if options.b: for name in find_files_by_type(options.filename,filetype=options.type): raw2jpg(name) else: raw2jpg(options.filename)
用ImageJ打开:
python_opencv_examples0_image.PNG
转换后的图:
python_opencv_examples0_image.PNG
作者:python作业AI毕业设计
链接:https://www.jianshu.com/p/246308adb0a0