中文版在这里
A tool that can detect body, face, QR Code and take photo. The stream or frame sources from video, camera or pictures.
If you meet any Error, please check Trouble Shooting first
TODO
:
- Body Detection
- Face Detection
- Moving Object Detection
- Support for single frame
- QR Code Detection and Decode
Macos:
brew install opencv
Linux:
- Download opencv-4.x.x source code in https://opencv.org/releases/
- unzip it to anywhere you want
cd opencv-4.x.x
mkdir build && cd build
cmake -D WITH_TBB=ON -D WITH_EIGEN=ON -D OPENCV_GENERATE_PKGCONFIG=ON -D BUILD_DOCS=ON -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF -D WITH_OPENCL=OFF -D WITH_CUDA=OFF -D BUILD_opencv_gpu=OFF -D BUILD_opencv_gpuarithm=OFF -D BUILD_opencv_gpubgsegm=O -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j8
make install
sudo -i vim /etc/ld.so.conf.d/opencv.conf
and then add/usr/local/lib
in itsudo echo 'PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig' >> /etc/bash.bashrc
sudo echo 'export PKG_CONFIG_PATH' >> /etc/bash.bashrc
- Clone this repository
git clone https://github.com/BinciLuo/Rust-opencv-Application.git
cd Rust-opencv-Application
- Build
cargo build
- Run
cargo run
It wiil create folderspics
,pics/Camera
,pic/Capture
if they don't exist.
Temporarily None
- Message:
failed to run custom build command for openssl-sys v0.9.60
- Solution:
sudo apt install libssl-dev
- Message:
Could not execute 'llvm-config' one or more times
- Solution:
sudo apt install llvm clang libclang-dev
- Message:
function or associated item not found in 'VideoCapture'
- Solution: OpenCV version too old. first exec
sudo apt-get purge *libopencv* && sudo apt-get autoremove && sudo apt-get autoclean
to uninstall old opencv and then install it again following tips in Requirements.
- Message:
Failed to load module acnberra-gtk-module
- Solution:
sudo apt install libcanberra-gtk-moudle
- Message:
'limits' file not found
- Soulution
sudo apt install libstdc++-12-dev
一个可以检测身体、面部、二维码并拍照的工具。流或帧可以来自视频、相机或图片。
如果遇到任何错误,请首先查看故障排除
TODO
:
- 身体检测
- 面部检测
- 运动物体检测
- 支持单帧
- 二维码检测和解码
MacOS:
brew install opencv
Linux:
- 在 https://opencv.org/releases/ 下载opencv-4.x.x源代码
- 解压缩到任意位置
cd opencv-4.x.x
mkdir build && cd build
cmake -D WITH_TBB=ON -D WITH_EIGEN=ON -D OPENCV_GENERATE_PKGCONFIG=ON -D BUILD_DOCS=ON -D BUILD_TESTS=OFF -D BUILD_PERF_TESTS=OFF -D BUILD_EXAMPLES=OFF -D WITH_OPENCL=OFF -D WITH_CUDA=OFF -D BUILD_opencv_gpu=OFF -D BUILD_opencv_gpuarithm=OFF -D BUILD_opencv_gpubgsegm=O -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local ..
make -j8
make install
sudo -i vim /etc/ld.so.conf.d/opencv.conf
,然后在其中添加/usr/local/lib
sudo echo 'PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig' >> /etc/bash.bashrc
sudo echo 'export PKG_CONFIG_PATH' >> /etc/bash.bashrc
- 克隆此存储库
git clone https://github.com/BinciLuo/Rust-opencv-Application.git
cd Rust-opencv-Application
- 构建
cargo build
- 运行
cargo run
如果不存在,将创建文件夹pics
,pics/Camera
和pic/Capture
。
暂无
- 错误信息:
failed to run custom build command for openssl-sys v0.9.60
- 解决方法:
sudo apt install libssl-dev
- 错误信息:
Could not execute 'llvm-config' one or more times
- 解决方法:
sudo apt install llvm clang libclang-dev
- 错误信息:
function or associated item not found in 'VideoCapture'
- 解决方法:OpenCV版本太旧。首先执行
sudo apt-get purge *libopencv* && sudo apt-get autoremove && sudo apt-get autoclean
来卸载旧的OpenCV,然后根据系统要求中的提示重新安装。
- 错误信息:
Failed to load module acnberra-gtk-module
- 解决方法:
sudo apt install libcanberra-gtk-moudle
- 错误信息:
'limits' file not found
- 解决方法:
sudo apt install libstdc++-12-dev