DESY ACOP Beans Home

de.desy.acop.video.analysis
Class AverageColorDecoder

java.lang.Object
  extended by de.desy.acop.video.analysis.AverageColorDecoder
All Implemented Interfaces:
ColorDecoder

public class AverageColorDecoder
extends java.lang.Object
implements ColorDecoder

AvrerageColorDecoder transforms theTYPE_INT_ARGB integer color code into a normalized sum of red, green and blue components.

Author:
Tilen Kusterle, Cosylab

Constructor Summary
AverageColorDecoder()
           
 
Method Summary
 double transform(int code)
          Deprecated. 
 double[] transform(int[] data)
          Transforms the complete array of TYPE_INT_ARGB integer colors codes into meaningful double value array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AverageColorDecoder

public AverageColorDecoder()
Method Detail

transform

@Deprecated
public double transform(int code)
Deprecated. 

Description copied from interface: ColorDecoder
Transforms the TYPE_INT_ARGB integer color code into a meaningful double value.

Specified by:
transform in interface ColorDecoder
Parameters:
code - the TYPE_INT_ARGB integer color code
Returns:
a meaningful double value

transform

public double[] transform(int[] data)
Description copied from interface: ColorDecoder
Transforms the complete array of TYPE_INT_ARGB integer colors codes into meaningful double value array. Use this method with large arrays in order to avoid calling ColorDecoder.transform(int) many times, which might be costly.

Specified by:
transform in interface ColorDecoder
Parameters:
data - the data to transform
Returns:
the transformed values


Copyright © 2010. All Rights Reserved.