<?xml version="1.0" encoding="ISO-8859-1"?>
<refentry version="5.0-subset Scilab" xml:id="ntsc2rgb" xml:lang="en"
          xmlns="http://docbook.org/ns/docbook"
          xmlns:xlink="http://www.w3.org/1999/xlink"
          xmlns:svg="http://www.w3.org/2000/svg"
          xmlns:ns5="http://www.w3.org/1999/xhtml"
          xmlns:mml="http://www.w3.org/1998/Math/MathML"
          xmlns:db="http://docbook.org/ns/docbook">
  <info>
    <pubdate>August, 2006</pubdate>
  </info>

  <refnamediv>
    <refname>ntsc2rgb</refname>

    <refpurpose>Convert a NTSC image to the equivalent RGB image.</refpurpose>
  </refnamediv>

  <refsynopsisdiv>
    <title>Calling Sequence</title>

    <synopsis>RGB = ntsc2rgb(YIQ)</synopsis>
  </refsynopsisdiv>

  <refsection>
    <title>Parameters</title>

    <variablelist>
      <varlistentry>
        <term>YIQ</term>

        <listitem>
           A NTSC image (hypermat). The dimension of 

          <literal>NTSC</literal>

           should be 

          <literal>M x N x 3</literal>

          , the type should be double and the element value range should be [0,1]. 
        </listitem>
      </varlistentry>

      <varlistentry>
        <term>RGB</term>

        <listitem>
           Output image, which has the same size as 

          <literal>NTSC</literal>

           and type of double. 
        </listitem>
      </varlistentry>
    </variablelist>
  </refsection>

  <refsection>
    <title>Description</title>

    <para><literal>ntsc2rgb</literal> convert a NTSC image to the equivalent
    RGB image using:</para>

    <itemizedlist>
      <listitem>
        <literal>R = Y + 0.956*I + 0.621*Q</literal>
      </listitem>

      <listitem>
        <literal>G = Y - 0.272*I - 0.647*Q</literal>
      </listitem>

      <listitem>
        <literal>B = Y - 1.105*I - 1.702*Q</literal>
      </listitem>
    </itemizedlist>

    <para>Supported classe: DOUBLE.</para>
  </refsection>

  <refsection>
    <title>Examples</title>

    <programlisting role="example">    RGB = imread(fullpath(getSIVPpath() + "/images/lena.png"));
    YIQ = rgb2ntsc(RGB);
    RGB = ntsc2rgb(YIQ);
    imshow(RGB);</programlisting>
  </refsection>

  <refsection>
    <title>Authors</title>

    <simplelist type="vert">
      <member>Shiqi Yu &lt;shiqi.yu[at]gmail.com&gt;</member>

      <member>Ricardo Fabbri &lt;ricardofabbri[at]users.sf.net&gt;</member>
    </simplelist>
  </refsection>

  <refsection>
    <title>Availability</title>

     The latest version of SIVP can be found at 

    <para>http://sivp.sf.net</para>

     
  </refsection>

  <refsection>
    <title>See Also</title>

    <simplelist type="inline">
      <member><link linkend="rgb2gray">rgb2gray</link></member>

      <member><link linkend="mat2gray">mat2gray</link></member>

      <member><link linkend="rgb2hsv">rgb2hsv</link></member>

      <member><link linkend="hsv2rgb">hsv2rgb</link></member>

      <member><link linkend="rgb2ycbcr">rgb2ycbcr</link></member>

      <member><link linkend="ycbcr2rgb">ycbcr2rgb</link></member>

      <member><link linkend="rgb2ntsc">rgb2ntsc</link></member>
    </simplelist>
  </refsection>
</refentry>
