Using C++/MFC/OpenCV to build a NCC-Based Image Matching algorithm
The Pattern Matching algorithm is based on Normalized Cross Correlation, and the formular is as followed:
- Download Visual Studio 2017 or newer versions
- Check on the option of "x86 and x64 version of C++ MFC"
- Install
- Open ELCVMatchTool.sln
- Upgrade if it is required
- Open this project's property page
- Modified "General-Output Directory" to the .exe directory you want
- Choose the SDK version you have in "General-Windows SDK Version"
- Choose the right toolset you have in "General-Platform Toolset" (for me, it is Visual Studio 2017 (v141))
- Go to "VC++ Directories", and type in "Include Directories" for your own OpenCV
- Type in "Library Directories" for your own OpenCV's library path
- Go to "Linker-Input", and type in library name (for me, it is opencv_world310d_vs2017.lib)
- Make sure that your opencv.dll is in the same directory as .exe of this project
- Drag Source Image to the Left Area
- Drag Pattern Image (Golden Sample) to the Right Top Area
- Push "Match" Button
Test 1
Test 2
Test 3
Test 4
Test 6
https://www.youtube.com/watch?v=2h_lN79SpMM&ab_channel=%E5%8A%89%E6%9F%8F%E5%AF%AC
https://www.youtube.com/watch?v=lM0NK6xVNfg&ab_channel=%E5%8A%89%E6%9F%8F%E5%AF%AC