<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Problem with Saturation Using ippiColorTwist in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-Saturation-Using-ippiColorTwist/m-p/915552#M15069</link>
    <description>&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;Hi,&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;I am trying get image saturation effect using Color Twist. As Image is ARGB32 and has integer pixel values I am using ippiColorTwist32f_8u_AC4IR function.&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;The problem:&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;I am using following color matrix function...&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;//IPP 5.0 &lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;//fSaturation varies from 0.0f to 2.0f&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;//Ipp32f m[4][4]&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;//Red &lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[2][0] = (1.0f - fSaturation) * 0.3086f ;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[2][1] = (1.0f - fSaturation) * 0.3086f;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[2][2] = (1.0f - fSaturation) * 0.3086f + fSaturation;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[2][3] = 0.0f;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;// Green&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[1][0] = (1.0f - fSaturation) * 0.6094f;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[1][1] = (1.0f - fSaturation) * 0.6094f + fSaturation;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[1][2] = (1.0f - fSaturation) * 0.6094f;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[1][3] = 0.0f;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;// Blue&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[0][0] = (1.0f - fSaturation) * 0.082f + fSaturation;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[0][1] = (1.0f - fSaturation) * 0.082f;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[0][2] = (1.0f - fSaturation) * 0.082f ;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[0][3] = 0.0f;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;Above color matrix function gives perfect results in C# GDI+ operations but with ippiColorTwist32f it is giving completely incorrect results. &lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;For example when fSaturation = 0.0f instead of a grayscale image I am getting a green color saturated image.&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 20 Jul 2006 13:44:51 GMT</pubDate>
    <dc:creator>cippher</dc:creator>
    <dc:date>2006-07-20T13:44:51Z</dc:date>
    <item>
      <title>Problem with Saturation Using ippiColorTwist</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-Saturation-Using-ippiColorTwist/m-p/915552#M15069</link>
      <description>&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;Hi,&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;I am trying get image saturation effect using Color Twist. As Image is ARGB32 and has integer pixel values I am using ippiColorTwist32f_8u_AC4IR function.&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;The problem:&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;I am using following color matrix function...&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;//IPP 5.0 &lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;//fSaturation varies from 0.0f to 2.0f&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;//Ipp32f m[4][4]&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;//Red &lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[2][0] = (1.0f - fSaturation) * 0.3086f ;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[2][1] = (1.0f - fSaturation) * 0.3086f;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[2][2] = (1.0f - fSaturation) * 0.3086f + fSaturation;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[2][3] = 0.0f;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;// Green&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[1][0] = (1.0f - fSaturation) * 0.6094f;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[1][1] = (1.0f - fSaturation) * 0.6094f + fSaturation;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[1][2] = (1.0f - fSaturation) * 0.6094f;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[1][3] = 0.0f;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;// Blue&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[0][0] = (1.0f - fSaturation) * 0.082f + fSaturation;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[0][1] = (1.0f - fSaturation) * 0.082f;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[0][2] = (1.0f - fSaturation) * 0.082f ;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;m[0][3] = 0.0f;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;Above color matrix function gives perfect results in C# GDI+ operations but with ippiColorTwist32f it is giving completely incorrect results. &lt;SPAN style="mso-spacerun: yes"&gt;&lt;/SPAN&gt;For example when fSaturation = 0.0f instead of a grayscale image I am getting a green color saturated image.&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;
&lt;P class="MsoNormal" style="MARGIN: 0in 0in 0pt"&gt;&lt;P&gt;&lt;/P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jul 2006 13:44:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-Saturation-Using-ippiColorTwist/m-p/915552#M15069</guid>
      <dc:creator>cippher</dc:creator>
      <dc:date>2006-07-20T13:44:51Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with Saturation Using ippiColorTwist</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-Saturation-Using-ippiColorTwist/m-p/915553#M15070</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;What I see, if you use ARGB image and saturate 3-th component (which is exactly green channel) you should get green-saturated image, isn't it? &lt;/P&gt;
&lt;P&gt;Note, all IPP functions use saturation to map internal result to output, might it be a reason?&lt;/P&gt;
&lt;P&gt;could you please provide simple test case to demostrate what is the wrong with function?&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Wed, 02 Aug 2006 17:34:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Problem-with-Saturation-Using-ippiColorTwist/m-p/915553#M15070</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2006-08-02T17:34:59Z</dc:date>
    </item>
  </channel>
</rss>

