-/* this uses a cutoff point so that it can abort early when it gets to
- * a point that can simply no longer make the cut-off point.
- */
-gdouble image_sim_compare_fast(ImageSimilarityData *a, ImageSimilarityData *b, gdouble min)
+gdouble image_sim_compare(ImageSimilarityData *a, ImageSimilarityData *b)
+{
+ gboolean test_transformations = TRUE; /* could be a function parameter */
+ gint max_t = (test_transformations ? 8 : 1);
+
+ gint t;
+ gdouble score, max_score = 0;
+
+ for(t = 0; t < max_t; t++)
+ {
+ score = image_sim_compare_transfo(a, b, t);
+ if (score > max_score) max_score = score;
+ }
+ return max_score;
+}
+
+
+/*
+4 rotations (0, 90, 180, 270) combined with two mirrors (0, H)
+generate all possible isometric transformations
+= 8 tests
+= change dir of x, change dir of y, exchange x and y = 2^3 = 8
+*/
+gdouble image_sim_compare_fast_transfo(ImageSimilarityData *a, ImageSimilarityData *b, gdouble min, gchar transfo)