├── .gitignore ├── share ├── robot.jpg ├── robot.png └── robot-mid.jpg ├── doc └── screenshot.jpg ├── chilitrack.pc.in ├── src ├── CMakeLists.txt ├── template.cpp ├── utils.h └── tracker.cpp ├── include ├── stats.h └── chilitrack.h ├── README.md ├── samples ├── minimal.cpp └── tracker.cpp └── CMakeLists.txt /.gitignore: -------------------------------------------------------------------------------- 1 | build/ 2 | -------------------------------------------------------------------------------- /share/robot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/chilitrack/HEAD/share/robot.jpg -------------------------------------------------------------------------------- /share/robot.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/chilitrack/HEAD/share/robot.png -------------------------------------------------------------------------------- /doc/screenshot.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/chilitrack/HEAD/doc/screenshot.jpg -------------------------------------------------------------------------------- /share/robot-mid.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/chili-epfl/chilitrack/HEAD/share/robot-mid.jpg -------------------------------------------------------------------------------- /chilitrack.pc.in: -------------------------------------------------------------------------------- 1 | prefix=@CMAKE_INSTALL_PREFIX@ 2 | exec_prefix=${prefix} 3 | libdir=${exec_prefix}/lib 4 | includedir=${prefix}/include 5 | 6 | Name: chilitrack 7 | Description: Marker-less Tracking for Augmented Reality 8 | Version: @CPACK_PACKAGE_VERSION_MAJOR@.@CPACK_PACKAGE_VERSION_MINOR@.@CPACK_PACKAGE_VERSION_PATCH@ 9 | Libs: -L${libdir} -lchilitrack 10 | Cflags: @COMPILE_FLAGS@ -I${includedir}/chilitrack 11 | -------------------------------------------------------------------------------- /src/CMakeLists.txt: -------------------------------------------------------------------------------- 1 | 2 | file(GLOB_RECURSE sources *.cpp) 3 | 4 | add_library( 5 | chilitrack 6 | SHARED 7 | ${sources} 8 | ) 9 | 10 | target_link_libraries(chilitrack ${OpenCV_LIBS}) 11 | 12 | install (TARGETS chilitrack LIBRARY DESTINATION lib) 13 | 14 | file(GLOB_RECURSE chilitrack_headers ../include/*) 15 | 16 | install(FILES 17 | ${chilitrack_headers} 18 | DESTINATION include/chilitrack 19 | ) 20 | 21 | -------------------------------------------------------------------------------- /include/stats.h: -------------------------------------------------------------------------------- 1 | #ifndef STATS_H 2 | #define STATS_H 3 | 4 | struct Stats 5 | { 6 | int matches; 7 | int inliers; 8 | double ratio; 9 | int keypoints; 10 | int duration; //ms 11 | 12 | Stats() : matches(0), 13 | inliers(0), 14 | ratio(0), 15 | keypoints(0), 16 | duration(0) 17 | {} 18 | 19 | Stats& operator+=(const Stats& op) { 20 | matches += op.matches; 21 | inliers += op.inliers; 22 | ratio += op.ratio; 23 | keypoints += op.keypoints; 24 | duration += op.duration; 25 | return *this; 26 | } 27 | Stats& operator/=(int num) 28 | { 29 | matches /= num; 30 | inliers /= num; 31 | ratio /= num; 32 | keypoints /= num; 33 | duration /= num; 34 | return *this; 35 | } 36 | }; 37 | 38 | #endif // STATS_H 39 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | chilitrack 2 | ========== 3 | 4 | A marker-less tracking solution for augmented reality. 5 | 6 | ![chilitrack screenshot](doc/screenshot.jpg) 7 | 8 | Currently, a demo app that tracks a given template in the camera 9 | feed, and show the corresponding 3D transformation. 10 | 11 | It relies on ORB (or AKAZE) features to find the template in the target image (closely following 12 | [this 13 | approach](http://docs.opencv.org/trunk/doc/tutorials/features2d/akaze_tracking/akaze_tracking.html)), then track the object using the [video optical flow](http://docs.opencv.org/trunk/modules/video/doc/motion_analysis_and_object_tracking.html#calcopticalflowpyrlk) and finally estimate a [3D transformation](http://docs.opencv.org/trunk/modules/calib3d/doc/camera_calibration_and_3d_reconstruction.html#solvepnp). 14 | 15 | Prerequisites 16 | ------------- 17 | 18 | `chilitrack` depends on `OpenCV 3`. You likely need to install `OpenCV 3` by 19 | hand since it is not yet packaged. 20 | 21 | 22 | Installation 23 | ------------ 24 | 25 | ``` 26 | > mkdir build 27 | > cmake .. 28 | > make 29 | ``` 30 | 31 | Usage 32 | ----- 33 | 34 | ``` 35 | > tracker