colorsys: RGB to YIQ transform matrix

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Edward C. Jones

    #1

    colorsys: RGB to YIQ transform matrix

    In colorsys.rgb_to _yiq, the matrix of the linear transformation used is

    .30 .59 .11
    .60 -.28 -.32
    .21 -.52 .31

    The places I checked on the Internet use

    .299 .587 .114
    .596 -.275 -.321
    .2.1 -.523 .311

    Why does colorsys use a 2 decimal place wersion of the array? What is
    the actual definition of the RGB to YIQ transform?

  • David Berry

    #2
    Re: colorsys: RGB to YIQ transform matrix

    Edward C. Jones wrote:[color=blue]
    > In colorsys.rgb_to _yiq, the matrix of the linear transformation used is
    >
    > .30 .59 .11
    > .60 -.28 -.32
    > .21 -.52 .31
    >
    > The places I checked on the Internet use
    >
    > .299 .587 .114
    > .596 -.275 -.321
    > .2.1 -.523 .311
    >
    > Why does colorsys use a 2 decimal place wersion of the array?[/color]

    Pass
    [color=blue]
    > What is
    > the actual definition of the RGB to YIQ transform?[/color]

    A good place to start is here,



    which used to contains details of RGB->YIQ and much much more on color
    space transforms.

    Dave


    Comment

    • A.M. Kuchling

      #3
      Re: colorsys: RGB to YIQ transform matrix

      On Mon, 10 Nov 2003 22:53:58 -0500,
      Edward C. Jones <edcjones@erols .com> wrote:[color=blue]
      > Why does colorsys use a 2 decimal place wersion of the array? What is
      > the actual definition of the RGB to YIQ transform?[/color]

      I'll wager there's no technical reason. Maybe whoever wrote the module
      used a reference that only quoted the matrix to two places. You could submit
      a patch on SourceForge to correct this.

      (Hm, looks like there's no test suite for the module. That would be worth
      fixing.)

      --amk

      Comment

      Working...