Code from G. Tolias and Y. Avrithis, "Speeded-up, Relaxed Spatial Matching", ICCV 2011.