com.mebigfatguy.polycasso
Class Feedback

java.lang.Object
  extended by com.mebigfatguy.polycasso.Feedback

public class Feedback
extends java.lang.Object

an immutable class for processing a test image against target image for closeness.


Constructor Summary
Feedback(java.awt.image.BufferedImage targetImage)
          creates a feedback object with a given targetImage.
 
Method Summary
 long calculateDelta(java.awt.image.BufferedImage testImage)
          returns a score of how close the test image is to the target which is the square of the error to the target image
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Feedback

public Feedback(java.awt.image.BufferedImage targetImage)
creates a feedback object with a given targetImage. Caches the image bytes in member variables.

Parameters:
targetImage - the target image that will be the judge of test images
Method Detail

calculateDelta

public long calculateDelta(java.awt.image.BufferedImage testImage)
returns a score of how close the test image is to the target which is the square of the error to the target image

Parameters:
testImage - the image to score
Returns:
a value that represents its closeness to ideal


Copyright © 2009-2010 MeBigFatGuy.com. All Rights Reserved.