Modified:
trunk/src/wosaic/utilities/Mosaic.java
Log:
Use an RMS distance to calculate the score.
Modified: trunk/src/wosaic/utilities/Mosaic.java
==============================================================================
--- trunk/src/wosaic/utilities/Mosaic.java (original)
+++ trunk/src/wosaic/utilities/Mosaic.java Wed Sep 17 12:17:14 2008
@@ -255,7 +255,8 @@
// Like in golf, a lower score is better. This is simply
// made up of the total difference in each channel, added
// together. Other weights can be added in the future.
- final int matchScore = rmDiff + gmDiff + bmDiff;
+ // Try RMS difference
+ final int matchScore = (int) Math.sqrt((Math.pow(rmDiff, 2.0) +
Math.pow(gmDiff, 2.0) + Math.pow(bmDiff, 2.0)));
if (imageGrid[r][c] != null) {