SMOD is an open source shape based 2D object detector that enables users to search an image for a pre-registered template, and obtain information on position, orientation and scaling of the objects found.
The source code is licensed under BSD 2-Clause License.
Line2Dup and ICP (renamed from CUDA-ICP after CUDA related stuffs being removed) were modified from sim3 branch of shape_based_matching project hosted by meiqua.
- Intel / AMD CPU that supports SSE4.2 instruction set.
- C++ 14 compatible compilers with OpenMP support.
- OpenCV 3 or above.
- CMake 3.1 or above.
- MIPP (supplied in /sup directory).
- Eigen (supplied in /sup directory).
- Create a directory named
build
inside the directory that contains this ReadMe file. - Open a terminal window,
cd
tobuild
directory created just before and type incmake ..
then pressENTER
key. - Wait until CMake completed its job, deal with errors when needed.
- Modify
CMakeCache.txt
if needed. You may want to change the value ofCMAKE_BUILD_TYPE
toRelease
orRelWithDebInfo
since defaultDebug
build is extremely slow due to various C/C++ assertion calls. - Type in
cmake --build . --target install
then pressENTER
key and wait. - If Doxygen was installed on you computer, run
doxygen
indoc
directory to generate HTML documentation. - Done.
Add the following lines in CMakeLists.txt
.
find_package(libsmod REQUIRED)
target_include_directories(your_project_name PRIVATE ${libsmod_INCLUDE_DIRS})
target_link_libraries(your_project_name PRIVATE ${libsmod_LIBS})
For details on data structures and functions, refer to generated HTML documentation.
See the sample code in /src/test/test.cpp
.
Using blades_and_gaskets
and poker_cards
testing sets supplied in /test
directory, it takes about 0.1s on my laptop computer to find at most 5 objects for each source image being examined without refinement.
OS Name: Microsoft Windows 10 Enterprise LTSC
OS Version: 10.0.17763 N/A Build 17763
OS Manufacturer: Microsoft Corporation
OS Configuration: Standalone Workstation
OS Build Type: Multiprocessor Free
System Manufacturer: Dell Inc.
System Model: Latitude 7280
System Type: x64-based PC
Processor(s): 1 Processor(s) Installed.
[01]: Intel64 Family 6 Model 78 Stepping 3 GenuineIntel ~2607 Mhz
Total Physical Memory: 8,070 MB