Skip to content

Feature Detection and Matching with SIFT, SURF, KAZE, BRIEF, ORB, BRISK, AKAZE and FREAK through the Brute Force and FLANN algorithms using Python and OpenCV

License

Notifications You must be signed in to change notification settings

daniel1896/Feature-Matching-and-Homography

 
 

Repository files navigation

Open In Colab

Feature Matching and Homography

Feature detection and mapping using classical algorithms to locate an image of an object in the target image.

From this application it is possible to solve several problems in the area of Computer Vision, such as: image recovery, motion tracking, motion structure detection, object detection, recognition and tracking, 3D object reconstruction, and others.

Overview

This project performs Feature Detection and Matching with SIFT, SURF, KAZE, BRIEF, ORB, BRISK, AKAZE and FREAK through the Brute Force and FLANN algorithms. It is possible to compute every combination of feature detector, descriptor and matcher to be able to easily compare and determine the best for the given input images. Finally the image of the object is located in the target image using homography, which is visualized by framing it in the target image. This is done mainly using OpenCV (3.4.2). Different can be used, however it cannot be guaranteed that all feature matching approaches will work. SURF for example is not available for OpenCV versions higher than 3.4.2.

Feature Detection and Matching with KAZE through the Brute Force algorithm

Dependencies

  • Python 2.7 or Python 3.4-3.7

To install the dependencies run:

pip install -r requirements.txt

Usage

python main.py --detector <detector> --descriptor <descriptor> --matcher <matcher>

Arguments Info
-h, --help Show help message and exit
--detector Specify SIFT or SURF or KAZE or ORB or BRISK or AKAZE
--descriptor Specify SIFT or SURF or KAZE or BRIEF or ORB or BRISK or AKAZE or FREAK
--matcher Specify BF or FLANN
--all Run all combinations of detector, descriptor and matcher

If no arguments are given or one of the arguments (detector, descriptor or matcher) is missing, it defaults to run all combinations.

Examples

Help

python main.py --help

Brute Force with ORB

python main.py --detector ORB --descriptor ORB --matcher BF

Run all combinations

python main.py
python main.py --all

Recommended Readings

License

Code released under the MIT license.

About

Feature Detection and Matching with SIFT, SURF, KAZE, BRIEF, ORB, BRISK, AKAZE and FREAK through the Brute Force and FLANN algorithms using Python and OpenCV

Topics

Resources

License

Stars

Watchers

Forks

Languages

  • Jupyter Notebook 91.4%
  • Python 8.6%