Class ColorModels

java.lang.Object
org.monte.media.color.ColorModels

public class ColorModels extends Object
Utility methods for ColorModels.
Author:
Werner Randelshofer
  • Method Summary

    Modifier and Type
    Method
    Description
    static void
    RGBtoYCC(float[] rgb, float[] ycc)
    RGB in the range [0,1] to YCC in the range Y=[0,1], Cb=[-0.5,0.5], Cr=[-0.5,0.5]
    static void
    RGBtoYCC(int[] rgb, int[] ycc)
    RGB 8-bit per channel to YCC 16-bit per channel.
    static void
    RGBtoYCC(int rgb, int[] ycc)
    RGB 8-bit per channel to YCC 16-bit per channel.
    static void
    RGBtoYIQ(float[] rgb, float[] yiq)
    RGB in the range [0,1] to YIQ in the range Y in [0,1], I in [-0.5957,0.5957], Q in [-0.5226,0.5226].
    static void
    RGBtoYUV(float[] rgb, float[] yuv)
    RGB in the range [0,1] to YUV in the range Y=[0,1], U=[-0.5,0.5], V=[-0.5,0.5]
    static String
    Returns a descriptive string for the provided color model.
    static void
    YCCtoRGB(float[] ycc, float[] rgb)
    YCC in the range Y=[0,1], Cb=[-0.5,0.5], Cr=[-0.5,0.5] to RGB in the range [0,1]
    static int
    YCCtoRGB(int[] ycc)
    YCC 16-bit per channel to RGB 8-bit per channel.
    static void
    YCCtoRGB(int[] ycc, int[] rgb)
    YCC 16-bit per channel to RGB 8-bit per channel.
    static void
    YIQtoRGB(float[] yiq, float[] rgb)
    YIQ in the range Y in [0,1], I in [-0.5957,0.5957], Q in [-0.5226,0.5226] to RGB in the range [0,1]
    static void
    YUVtoRGB(float[] yuv, float[] rgb)
    YUV in the range Y=[0,1], U=[-0.5,0.5], V=[-0.5,0.5] to RGB in the range [0,1]

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • toString

      public static String toString(ColorModel cm)
      Returns a descriptive string for the provided color model.
    • RGBtoYCC

      public static void RGBtoYCC(float[] rgb, float[] ycc)
      RGB in the range [0,1] to YCC in the range Y=[0,1], Cb=[-0.5,0.5], Cr=[-0.5,0.5]
    • YCCtoRGB

      public static void YCCtoRGB(float[] ycc, float[] rgb)
      YCC in the range Y=[0,1], Cb=[-0.5,0.5], Cr=[-0.5,0.5] to RGB in the range [0,1]
    • RGBtoYCC

      public static void RGBtoYCC(int[] rgb, int[] ycc)
      RGB 8-bit per channel to YCC 16-bit per channel.
    • RGBtoYCC

      public static void RGBtoYCC(int rgb, int[] ycc)
      RGB 8-bit per channel to YCC 16-bit per channel.
    • RGBtoYUV

      public static void RGBtoYUV(float[] rgb, float[] yuv)
      RGB in the range [0,1] to YUV in the range Y=[0,1], U=[-0.5,0.5], V=[-0.5,0.5]
    • YUVtoRGB

      public static void YUVtoRGB(float[] yuv, float[] rgb)
      YUV in the range Y=[0,1], U=[-0.5,0.5], V=[-0.5,0.5] to RGB in the range [0,1]
    • YCCtoRGB

      public static void YCCtoRGB(int[] ycc, int[] rgb)
      YCC 16-bit per channel to RGB 8-bit per channel.
    • YCCtoRGB

      public static int YCCtoRGB(int[] ycc)
      YCC 16-bit per channel to RGB 8-bit per channel.
    • RGBtoYIQ

      public static void RGBtoYIQ(float[] rgb, float[] yiq)
      RGB in the range [0,1] to YIQ in the range Y in [0,1], I in [-0.5957,0.5957], Q in [-0.5226,0.5226].

      http://en.wikipedia.org/wiki/YIQ

    • YIQtoRGB

      public static void YIQtoRGB(float[] yiq, float[] rgb)
      YIQ in the range Y in [0,1], I in [-0.5957,0.5957], Q in [-0.5226,0.5226] to RGB in the range [0,1]

      http://en.wikipedia.org/wiki/YIQ