This program removes correspondences (matches) that are not consistent with the rest of the match set. It uses the disparity gradient as the measure of compatibility between two matches; the lower this number the more consistent the two matches. The disparity gradient is based on the simple observation that two correspondences which begin from two corners in the left image that are close to each other should end in two corners in the right image that are also close to each other.
The sum of all disparity gradients of each match relative to all other matches is computed. Then the match with the median of this sum of disparity gradients is found, and those matches that have a disparity gradient sum greater than some factor times this median sum are removed. This process is iterated till all matches pass this test; that is for each match the sum of the disparity gradients is within a given factor of the median element.
dispgradfilter -f file [-m medianScale] [-z]
-f: the input file (a matches file, with the x and y coordinates of the two matching corner points on each line). This is a mandatory input.
-m: the median factor
-z: specifies to output match data in separate files ala Zhang
Median factor defaults to 3.5
A file of correspondences that has been filtered, this file has the name of the input file with ".filtered" added as an extension to it. e.g. a.matches --> a.matches.filtered