侧边菜单与图像控制 ==================== 侧边菜单如下所示 .. image:: img/side_menu.png :alt: 程序侧边菜单 :width: 234px :align: center .. note:: 为了更好的视觉效果,按下的按钮会以绿色高亮 下面介绍其功能 保存与加载设置 -------------- .. |save_icon| image:: img/save.png :alt: 保存设置 :width: 32px .. |open_icon| image:: img/open.png :alt: 加载设置 :width: 32px |save_icon| — 保存区域设置 |open_icon| — 加载已保存的区域设置 同样也可以在主菜单的 :ref:`file` 部分使用相同命令完成上述操作。 .. _screen: 截图 ---- .. |screen_icon| image:: img/screen.png :alt: 截图 :width: 32px |screen_icon| 按钮用于截取叠加了识别结果的图像。 生成的图像保存到 :ref:`catalog` 下的 output/screenshots 文件夹。 示例: .. image:: img/screenshot.png :alt: 截图示例 :width: 600px :align: center .. _size: 位置与尺寸控制 -------------- 其余按钮用于控制图像的位置和尺寸: |arrow_icon| — 平移(左、右、上、下) |zoom_in_icon| — 放大 |zoom_out_icon| — 缩小 |reset_icon| — 恢复默认 |rotate_cw_icon| — 顺时针旋转 |rotate_ccw_icon| — 逆时针旋转 |flip_h_icon| — 水平翻转 |flip_v_icon| — 垂直翻转 “设置步骤”滑块用于调节位置和尺寸变化的平滑程度。 .. |arrow_icon| image:: img/arrow.png :alt: 平移 :width: 32px .. |zoom_in_icon| image:: img/plus.png :alt: 放大 :width: 32px .. |zoom_out_icon| image:: img/minus.png :alt: 缩小 :width: 32px .. |reset_icon| image:: img/default.png :alt: 重置 :width: 32px .. |rotate_cw_icon| image:: img/rotate_1.png :alt: 顺时针旋转 :width: 32px .. |rotate_ccw_icon| image:: img/rotate_2.png :alt: 逆时针旋转 :width: 32px .. |flip_h_icon| image:: img/h_flip.png :alt: 水平翻转 :width: 32px .. |flip_v_icon| image:: img/v_flip.png :alt: 垂直翻转 :width: 32px 上述命令也可以通过键盘(方向键与“+”“-”)或鼠标执行(按住左键拖动改变位置,滚轮改变大小)。 还可以使用 **w, s, a, d** 键按 **设置步骤**(像素)移动相对于图像的区域。 **w, s, a, d** 键分别将区域列表中选中的区域 **上、下、左、右** 移动;区域不会越过图像边界。 .. note:: 注意!如果区域列表中至少选中一个区域,鼠标点击将会重新选择该区域的边界,而不是移动图像。若需用鼠标移动图像,请确保列表中未选中任何区域。 图像区域 -------- 图像区域中还有一些附加按钮。 当来源为摄像头或视频时,左下角的 |play_icon| 与 |stop_icon| 按钮可启动/停止视频流。 当来源为视频时,底部会出现一个滑块用于控制当前帧。 右上角的“重复”按钮 |duplicate_icon| 会打开附加窗口,在其中显示当前图像的副本。 .. |play_icon| image:: img/play.png :alt: 开始播放 :width: 16px .. |stop_icon| image:: img/pause.png :alt: 停止播放 :width: 16px .. |duplicate_icon| image:: img/duplicate.png :alt: 复制窗口 :width: 16px .. note:: 过多的附加窗口会降低程序运行速度。 |rocket_icon| 与 |snail_icon| (火箭与蜗牛)用于加速程序或切换回普通模式。 点击火箭 |rocket_icon| 会暂停主窗口的帧更新,但附加窗口仍会更新。点击蜗牛 |snail_icon| 可恢复普通模式。 .. |rocket_icon| image:: img/rocket.png :alt: 加速模式(火箭) :width: 16px .. |snail_icon| image:: img/snail.png :alt: 普通模式(蜗牛) :width: 16px .. note:: 若处理的 视频流 分辨率较高而计算资源不足,加速模式可显著提升处理速度。主窗口帧更新需要更多计算量,因为需要进行图像类型转换,而附加窗口无需此操作。