# chamfer_match **Repository Path**: lllstandout/chamfer_match ## Basic Information - **Project Name**: chamfer_match - **Description**: No description available - **Primary Language**: Unknown - **License**: GPL-3.0 - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-27 - **Last Updated**: 2021-07-27 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # Chamfer-Matching (~~work in progress~~ abandoned) ### Warning: If you are looking for an efficent and working C++ implementation of the Chamfer matching method, you can directly look at the [Fast Directional Chamfer Matching] library. This repository is only intended for versioning purpose and internal developments. ### Goals: - Detect a template image in a query image using only edge information: - [x] detection at single scale. - [ ] detection at multiple scales. - [ ] detection at multiple scales and with rotation. - [ ] multiple detections at multiple scales and with rotation, highly cluttered background. - Detect in a query image the most probable template image and retrieve the corresponding pose (from the same object, multiple template images at different orientations are saved with the corresponding object pose) - [ ] detection at single scale. - [ ] detection at multiple scales. - [ ] detection at multiple scales and with rotation. - [ ] multiple detections at multiple scales and with rotation, highly cluttered background. ## First result: * Template edges image: ![Template edges image](/results/Edge_template.png "Template edges image") * Query edges image: ![Query edges image](/results/Edge_query.png "Query edges image") * Detection at single scale: ![Detection at single scale](/results/Simple_test_result_single_scale.png "Detection at single scale") ## References (non exhaustive): * [Chamfer Matching (contour based shape matching)] - Course from University of Pennsylvania by Nicu Știurcă. * [Fast Directional Chamfer Matching (paper)] - CVPR2010 * [Fast Detection of Multiple Textureless 3-D Objects (paper)] - ICVS2013 * [Fast Detection of Multiple Textureless 3-D Objects (poster)] - ICVS2013 * [Contour Based Learning for Object Detection] - ICCV2005 * [CS664 Computer Vision - 7. Distance Transforms] - Course from Cornell University * [CS664 Computer Vision - 8. Matching Binary Images] - Course from Cornell University * [Comparing Images Using the Hausdorff Distance] - TPAMI1993 * [Hand Pose Estimation Using Hierarchical Detection] - HCI2004 * [Estimating 3D Hand Pose Using Hierarchical Multi-Label Classification] - IVC2007 * [Pedestrian Detection from a Moving Vehicle] - ECCV2000 * [The Chamfer System] ## Some available implementations in C++: * [chamfer_matching.cpp] - Implementation by Marius Muja, use the old C OpenCV API. * [chamfer_matching.cpp (2)] - From the Implementation by Marius Muja, some modifications added. * [chamfer_matching.cpp (3)] - The original code was written by Marius Muja and later modified and prepared for integration into OpenCV by Antonella Cascitelli, Marco Di Stefano and Stefano Fabri from Univ. of Rome + fixes from Varun Agrawal. * [chamfer.cpp] - From the code of Antonella Cascitelli, Marco Di Stefano and Stefano Fabri ; Rotation transform added by Aaron Damashek, John Doherty ; for the project: [Detecting Guns Using Parametric Edge Matching]. * [Fast Directional Chamfer Matching] - Used in [Edge Based Tracking library] for the paper: [Robust 3D visual tracking using particle filtering on the special Euclidean group: A combined approach of keypoint and edge features]. ## TODO: * [ ] Allow to detect a template image with a different orientation in the query image. * [ ] Speed-up the computation ! (Need to implement a different approach.) * [ ] Test the robustness of the detection. * [ ] Test the detection from multiple template images. ## Ideas: * Add a pyramidal detection (coarse-to-fine approach). * Try to implement and use an integral distance transform image. [Chamfer Matching (contour based shape matching)]: [Fast Directional Chamfer Matching (paper)]: [Fast Detection of Multiple Textureless 3-D Objects (paper)]: [Fast Detection of Multiple Textureless 3-D Objects (poster)]: [Contour Based Learning for Object Detection]: [chamfer_matching.cpp]: [chamfer_matching.cpp (2)]: [chamfer_matching.cpp (3)]: [chamfer.cpp]: [Detecting Guns Using Parametric Edge Matching]: [Fast Directional Chamfer Matching]: [Edge Based Tracking library]: [Robust 3D visual tracking using particle filtering on the special Euclidean group: A combined approach of keypoint and edge features]: [CS664 Computer Vision - 7. Distance Transforms]: [CS664 Computer Vision - 8. Matching Binary Images]: [Comparing Images Using the Hausdorff Distance]: [Hand Pose Estimation Using Hierarchical Detection]: [Estimating 3D Hand Pose Using Hierarchical Multi-Label Classification]: [Pedestrian Detection from a Moving Vehicle]: [The Chamfer System]: