org.deegree.commons.utils
Class PixelCounter
java.lang.Object
org.deegree.commons.utils.PixelCounter
public class PixelCounter
- extends Object
PixelCounter
- Version:
- $Revision: 24629 $, $Date: 2010-05-27 18:05:25 +0200 (Thu, 27 May 2010) $
- Author:
- Andreas Schmitz, last edited by: $Author: rbezema $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
PixelCounter
public PixelCounter()
similarityLevel
public static double similarityLevel(BufferedImage img,
BigInteger[] vals)
- Parameters:
img
- vals
-
- Returns:
- a value between 0 and 1: for each color (ARGB) add (1 - (abs(origVal - newVal)) / (origVal + newVal)) /
4, values are determined by summing x * y * valueAtXY(x, y)
countPixels
public static BigInteger[] countPixels(BufferedImage img)
- Parameters:
img
-
- Returns:
- the ARGB pixel values: sum over x * y * valueAtXY(x, y)
Copyright © 2011. All Rights Reserved.