EvisionLight 双目视觉系统(轻量版)
如果您觉得有帮助,请为该项目点star.以便于及时收到最新更新.

本项目致力于构建一个轻量化,图形化,高效率的机器视觉Demo,目的是为机器视觉初学者提供一份良好的入门参考代码.

About

  1. ui采用PySide2-Widget模式编写,界面定义使用ui文件.
  2. 界面逻辑使用python编写.
  3. 有性能要求的算法使用C++实现,输出动态链接库.

Requirements

  1. Clion as IDE recommended, this project use both python and c++.
  2. python3, We strongly recommend using Anaconda3 as your python env.
  3. pyside2, you can install it by pip install pyside2
  4. opencv-python, you can install it by pip install opencv-python
  5. If you choose to build this repo on windows, we strongly recommend using msvc rather than MinGW as compiler.

Build

  1. cmake and make the CMake Project to generate all dynamic link libraries code with c++. top cmake is the CMakeLists.txt in the root path of this repo.
  2. python3 init.py to generate *_ui.py and *_rc.py from *.ui and *.qrc.
  3. python3 main.py to start sandbox.
  4. if you use Clion, just use "before launch" option in configuration of main.py, add an event "Run Another configuration" and choose init.py, ensures that init.py is automatically executed first each time when main.py is executed

Bugs

  1. 在windows平台上加载dll可能会遇到一些问题,注意dll必须是amd64架构的,使用功能clion的开发者在配置工具链时要注意.
  2. 目前windows平台上的log会使用gbk编码.可能在某些情况下你会看到log文件中的内容是乱码,只需要按照gbk编码打开即可.
  3. open camera by id-> "No such file or directory: 'v4l2-ctl'", sudo apt install v4l-utils -> 'EvisionCamera' object has no attribute 'get_screensize'

References

  1. gitignore模板.
  2. 清华大学开源镜像站: pypi源
  3. 清华大学开源镜像站: Anaconda源
  4. bug fix: This application failed to start because no Qt platform plugin could be initialized
  5. doskey不是内部或外部命令
  6. CLion输出自动换行的禁用

how to setup pyside2 external tools inside pycharm or clion IDE.

  1. pip show pyside2, 找到pyside2的安装位置,假设是${PySide2_root}.
  2. ide, File -> settings -> Tools -> External Tools.
  3. add:(如果在linux系统上,Program的名字不带exe后缀).
Name Group Program Arguments Working directory Usage
designer new PySide2 ${PySide2_root}/designer.exe $FileDir$ 创建ui文件
designer create PySide2 ${PySide2_root}/designer.exe $FilePath$ $FileDir$ 打开ui文件
uic PySide2 ${PySide2_root}/uic.exe $FilePath$ -o $FileDir$/$FileNameWithoutAllExtensions$_ui.py -g python $FileDir$ 把ui文件转换为python源码文件
rcc PySide2 ${PySide2_root}/rcc.exe $FilePath$ -o $FileDir$/$FileNameWithoutAllExtensions$_rc.py -g python $FileDir$ 把资源文件转换为python源码文件