Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright 2012-04-26 Werner Randelshofer
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.monte.media.image
Class ColorModels

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

    public class ColorModels

extends java.lang.Object

Utility methods for ColorModels.

Version:
  $Id: ColorModels.java 161 2012-01-31 12:51:31Z werner $
Author:
  Werner Randelshofer

Method Summary
`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 java.lang.String` | `toString(java.awt.image.ColorModel cm)` 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 Detail

### toString

    public static java.lang.String toString(java.awt.image.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

Overview | Package | Class | Tree | Deprecated | Index | Help
| Copyright 2012-04-26 Werner Randelshofer
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD