Official MATLAB implementation of the IJCV paper: Feature Matching via Graph Clustering with Local Affine Consensus
GCLAC is a novel framework for feature matching, treating each putative match as a node and encoding geometric relationships into edges. This allows us to leverage graph clustering to solve feature matching tasks. The implementation includes robust graph construction using local affine strategies and efficient and robust graph clustering algorithms.

The GCLAC function integrates key components of the framework:
- Graph Construction: Encodes putative matches as nodes and uses local affine consensus to construct geometrically meaningful edges.
- MCDG Solver: Extracts motion-coherent local geometric information to create sparse and transformation-agnostic graphs.
- Graph Clustering (D2SCAN): Applies replicator dynamics optimization to identify strongly connected subgraphs, enabling robust and efficient feature matching.
- X: Matrix of feature points from image 1.
- Y: Matrix of feature points from image 2.
- nc: Controls the size of grid division.
- sigma: Controls the sensitivity of the geometric consistency score on deformations.
- epsilon: Bandwidth of the Gaussian kernel for distance decay.
- inlier_threshold: Inlier-outlier threshold.
- inliers: Indices of inlier matches.
- clusters: Cluster assignments for matched features.
- W: Weighted adjacency matrix of the constructed graph.
-
Clone this repository and add the
srcdirectory to your MATLAB path:addpath(genpath('src')); -
Run the demonstration script:
run demo.m;
No external dependencies are required. Ensure that MATLAB is properly installed.
If you use GCLAC in your research, please cite the following paper:
@article{lu2024feature,
title = {Feature Matching via Graph Clustering with Local Affine Consensus},
author = {Lu, Yifan and Ma, Jiayi},
journal = {International Journal of Computer Vision},
pages = {1--28},
year = {2024},
publisher = {Springer}
}This project is licensed under the MIT License. See the LICENSE file for details.