def view_flow_one(self, flow, fn, step, a_str=''): if cfgs.test_view: filename = fn else: filename = str(step) + '_' + fn path_ = os.path.join(cfgs.view_path, 'train') color_flow = flowToColor(flow) #color_flow = med_flow_color(flow) cv2.imwrite( os.path.join(path_, filename + '_flow_color%s.bmp' % a_str), color_flow)
def view_flow_patch_one(self, flow, fn, step, a_str='', f_path='train'): if cfgs.test_view: filename = fn else: filename = str(step) + '_' + fn path_ = os.path.join(cfgs.view_path, f_path) color_flow = flowToColor(flow) h, w = cfgs.IMAGE_SIZE #color_flow = cv2.resize(color_flow, (w, h), interpolation=cv2.INTER_CUBIC) #color_flow = med_flow_color(flow) cv2.imwrite(os.path.join(path_, filename + '_flow_%s.bmp' % a_str), color_flow)