diff --git a/config/prototype_raft.json b/config/prototype_raft.json index bbc0619..80883ee 100644 --- a/config/prototype_raft.json +++ b/config/prototype_raft.json @@ -31,8 +31,8 @@ }, "contact": { "min_contour_area": 3000, - "flow_threshold":1, - "div_threshold":0.02, + "flow_threshold":1.5, + "div_threshold":0.08, "expansion_threshold": 0.01, "kernel_size": [5,5], "denoise_sigma": 15 diff --git a/promote_video.py b/promote_video.py index d918246..5344d5a 100644 --- a/promote_video.py +++ b/promote_video.py @@ -55,17 +55,20 @@ def create_plot(): p1 = win.addPlot(title="N") # p1.titleLabel.item.setFont(title_font) p1.getAxis('left').setStyle(showValues=show_values) + p1.getAxis('bottom').setStyle(showValues=show_values) p1.showGrid(x=True, y=True, alpha=0.3) win.nextRow() p2 = win.addPlot(title="X") # p2.titleLabel.item.setFont(title_font) p2.getAxis('left').setStyle(showValues=show_values) + p2.getAxis('bottom').setStyle(showValues=show_values) p2.showGrid(x=True, y=True, alpha=0.3) win.nextRow() p3 = win.addPlot(title="Y") # p3.titleLabel.item.setFont(title_font) p3.getAxis('left').setStyle(showValues=show_values) - p3.setLabel('bottom', 'Time', units='s') + p3.getAxis('bottom').setStyle(showValues=show_values) + # p3.setLabel('bottom', 'Time', units='s') # p3.getAxis('bottom').label.setFont(axis_font) p3.showGrid(x=True, y=True, alpha=0.3) plot_af = p1.plot(pen=line_pen, fillLevel=0, fillBrush=grad_brush) @@ -133,7 +136,7 @@ def draw_magnitude_map(vfield, threshold=3.0, colormap=cv2.COLORMAP_JET) -> np.n -npoints = 400 # 图表数据长度 +npoints = 100 # 图表数据长度 plot_threshold = 0 # only plot force values above this (below → 0) pg.setConfigOption('background', bg_color_hex) pg.setConfigOption('foreground', bg_color_hex) @@ -167,7 +170,8 @@ def main(): frame_count = 0 writer = None while True: - img = sensor1.get_img() # 提取并拼接复眼图像 + sensor1.get_img() # 提取并拼接复眼图像 + img = sensor1.img if img is None: break; @@ -185,7 +189,7 @@ def main(): # 显示向量场 # Background color #24292E (BGR) black_img = np.full_like(sensor1.img, bg_color) - arrows = orisys.util.draw_arrows(black_img, flow, threshold=1, grid_spacing=20, arrow_scale=0.5, colormap=cv2.COLORMAP_PARULA, below_threshold_color=text_color) + arrows = orisys.util.draw_arrows(black_img, flow, threshold=2, grid_spacing=20, arrow_scale=0.5, colormap=cv2.COLORMAP_PARULA, below_threshold_color=text_color) cv2.imshow("Deformation", arrows) # 显示深度图