1. Download Release for MinGW-w64
Click here to download the release of MinGW-W64 v13.
Unzip it and place it on any place of your hard drive. Like
Configure the environment variables to include the MinGW-w64 path mingw64\bin. Like
In CMD, enter gcc -v and g++ -v.
If you get and
, then the installation is finished.
2. Install CMake for Windows
Get the CMake installer for Windows here and install it under its guidance.
You also need to make sure its path Cmake\bin is a member of the environment variables. Like
In CMD, enter cmake --version, if you get the version of CMake, the installation is finished.
3. Build for the Code
In the project directory, run the following commands:
mkdir build
cd build
cmake .. -G "MinGW Makefiles"
mingw32-make -j8
.\leastsquares_matching.exe
The output is from the main function in core\src\test.cpp
You also need MinGW-w64 and CMake. Install them as mentioned above!
1. Install the Requirement Packages for Python
In the project directory, run
conda create -n matching python=3.11
conda activate matching
pip install -r requirements.txt
2. Build the C++ Source for Application
cd python
python setup.py bdist_wheel
pip install dist\lsmatching-0.0.1-cp311-cp311-win_amd64.whl --force-reinstall
cd ..
Then the install of C++ Source of Least-Square Matching is done.
3. Use the Application in Python
run
python main.py
If you use this project in your research, please cite:
@misc{LSMTang2025,
title = {Least-Square Matching for Image Pairs},
author = {Haojun Tang and Jiahao Zhou},
year = {2025},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/DonaldTrump-coder/LeastSquares_Matching}},
note = {Apache License 2.0}
}