[wosaic commit] r337 - trunk/src/wosaic/utilities

1 view
Skip to first unread message

codesite...@google.com

unread,
Sep 17, 2008, 3:17:35 PM9/17/08
to wosaic...@googlegroups.com
Author: csvenss2
Date: Wed Sep 17 12:17:14 2008
New Revision: 337

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) {

Reply all
Reply to author
Forward
0 new messages