#### Windows
- Install OpenCV using vcpkg and configure CMake:
```bash
git clone
cd vcpkg
./bootstrap-vcpkg.bat
./vcpkg install opencv
Add during CMake configuration:
Compile the project
General steps
Clone the project
Create a build directory
Run CMake
If OpenCV is installed globally:
If you install OpenCV using vcpkg or other methods, specify the toolchain file:
Compile the project
On Windows, you can directly use Visual Studio to open the generated solution file and build it.
Run the project
Default run
After the compilation is complete, execute the generated executable file:
Data path
The data read by the project is placed in the data/left and data/right folders by default, and the image file name format is 0000000000.png. Make sure the data directory structure is correct, otherwise the program may have a path error.
Common problems and solutions
1. OpenCV library cannot be found
Make sure OpenCV is correctly installed and found by CMake.
If the OpenCV installation path is not the default path, you can manually specify it through CMAKE_PREFIX_PATH:
2. Dataset path error
Check the image path logic in main.cpp to ensure that it matches the local data structure.
Example:
3. Image display abnormality
Make sure the image data format is correct (such as PNG format).
In the server environment, check whether the graphical interface support (such as X11) is enabled.
4. Error during compilation
Error example: fatal error: opencv2/opencv.hpp: No such file or directory
Reason: OpenCV header file not found.
Solution: Check the installation path of OpenCV and reconfigure CMake.
Error example: undefined reference to cv::xxx
Reason: OpenCV library is not linked correctly.
Solution: Make sure the library path of OpenCV is added to the linker.
Running results
After successful running, the program will output the current frame number and open the following window:
vec: Display the direction vector of the columnar pixel.
disp8: 8-bit disparity map.
result: Display the superposition of the original image and the result.
stixel: Display the columnar pixel segmentation result.