Run cmake-build-debug/opencv
(MacOS) or cmake-build-debug/opencv.exe
(Windows) in the project directory.
Make sure that you have downloaded and installed g++
、gcc
、opencv
、cmake
, and configure the environment variables accordingly. If run directly in Visual Studio, it may cause errors.
- First cd to the project directory, for example:
cd /Users/Bureaux/Documents/workspace/CLionProjects/opencv
- Compile with Cmake, which is already configured for environment variables, such as:
cmake --build cmake-build-debug --target opencv -- -j 6
- The step 2 will generate the executable file in
cmake-build-debug
, which can be directly run.
Enter 1
to use the sample image with target sign in this report. Enter 2
is to use the sample image that comes with the project without the target sign. Enter 3
to enter the absolute path of the third-party image.