JohnChiu commited on
Commit
2abf7dc
·
1 Parent(s): 82e6cc4

Add application file

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -99,6 +99,9 @@ def plot_depth(nor_hist):
99
  ref = np.max(arr, axis=2)
100
  ref_filter = np.max(arr_expandfilter, axis=2)
101
 
 
 
 
102
  mask = ref>3
103
  # 转uint8图像方便展示
104
  img_tof = to_uint8_image(tof)
@@ -107,7 +110,8 @@ def plot_depth(nor_hist):
107
  colored_tof = cv2.applyColorMap(img_tof, cv2.COLORMAP_VIRIDIS)[:, :, ::-1]
108
  colored_tof_filter = cv2.applyColorMap(img_filter, cv2.COLORMAP_VIRIDIS)[:, :, ::-1]
109
 
110
- return [colored_tof, colored_tof_filter]
 
111
 
112
 
113
  with gr.Blocks() as demo:
 
99
  ref = np.max(arr, axis=2)
100
  ref_filter = np.max(arr_expandfilter, axis=2)
101
 
102
+ img_ref = to_uint8_image(ref)
103
+ img_ref_filter = to_uint8_image(ref_filter)
104
+
105
  mask = ref>3
106
  # 转uint8图像方便展示
107
  img_tof = to_uint8_image(tof)
 
110
  colored_tof = cv2.applyColorMap(img_tof, cv2.COLORMAP_VIRIDIS)[:, :, ::-1]
111
  colored_tof_filter = cv2.applyColorMap(img_filter, cv2.COLORMAP_VIRIDIS)[:, :, ::-1]
112
 
113
+ # return [colored_tof, colored_tof_filter]
114
+ return [img_ref, img_ref_filter]
115
 
116
 
117
  with gr.Blocks() as demo: