Belajar OpenCV on Rust (Face Detection)
Steps to reproduce on Linux - OpenCV: Installation in Linux with some adjustment:
- Install dependencies (cmake, g++/gcc, wget, unzip)
- Install OpenCV (3.2, 3.4, 4.x)
- Manual
- Download from OpenCV Repo - Latest 4.5.3 (
wget -O opencv.zip https://github.com/opencv/opencv/archive/master.zip
) - Unpack downloaded OpenCV (
unzip opencv.zip
) - Create build directory (
mv opencv-master opencv && mkdir -p build && cd build
) - Pre-Configure (
rm ../opencv/CMakeCache.txt
) - Configure with libgtk2.0 disable qt (
cmake -D WITH_QT=OFF ../opencv
) - Build (
make
), you can run compilation processes in parallel by using (make -j4
) - Run installation, you need elevated privileges (
sudo make install
) - Post-Configure (
export OpenCV_DIR=<*.cmake location> && export LD_LIBRARY_PATH=<*.so location>
)
- Download from OpenCV Repo - Latest 4.5.3 (
- Prebuilt version
- Run Apps (
cargo run
)