DESY ACOP Beans Home

de.desy.acop.video.analysis
Class LuminosityColorDecoder

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

public class LuminosityColorDecoder
extends java.lang.Object
implements ColorDecoder

LuminosityColorDecoder transforms theTYPE_INT_ARGB integer color code into a normalized sum of red, green and blue components by calculating luminosity as Y = 0.299*R + 0.587*G + 0.114*B.

Author:
Tilen Kusterle, Cosylab

Constructor Summary
LuminosityColorDecoder()
           
 
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

LuminosityColorDecoder

public LuminosityColorDecoder()
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.