<?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 Precision of linear interpolation in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Precision-of-linear-interpolation/m-p/894982#M11951</link>
    <description>&lt;P&gt;&lt;FONT face="Arial"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;I am using the function&lt;FONT size="2"&gt;&lt;FONT size="3"&gt;ippiResize to increase the image size in each direction by a factor two. The interpolation method is linear interpolation.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="3"&gt;&lt;FONT face="Arial" size="3"&gt;Because the resizing factor is "2", I would expect that the pixel value f_in( x_in , y_in ) in the input image is equal tothe pixelvaluef_out ( 2*x_in , 2* y_in ) in the output image. E.g. something like that:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Input846&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Output86456&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Unfortunately it is not exactly the same.&lt;/FONT&gt;&lt;FONT face="Arial"&gt; Because the error is getting worse at the end of the image, Isuspect that the sampling rate is not exactly "2". I &lt;/FONT&gt;&lt;FONT face="Arial"&gt;attached an example (raw image, 16bit signed).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Here is my code. MaybeI am doing somthing wrong&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;&lt;EM&gt;// resize factors&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;&lt;EM&gt;int InWidth=500;&lt;BR /&gt;int InHeight=500;&lt;BR /&gt;int OutWidth=1000;&lt;BR /&gt;int OutHeight=1000;&lt;/EM&gt;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;&lt;EM&gt;&lt;BR /&gt;double fx = 2.0f; &lt;BR /&gt;double fy = 2.0f; &lt;BR /&gt; &lt;BR /&gt;IppiSize s = {InWidth, InHeight};&lt;BR /&gt; IppiRect sr = {0,0, InWidth, InHeight};&lt;BR /&gt; IppiSize d = {OutWidth, OutHeight};&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;&lt;EM&gt;// resize&lt;BR /&gt;IppStatus res= &lt;BR /&gt;ippiResize_16u_C1R( pInput,&lt;BR /&gt;s,&lt;BR /&gt;InWidth*sizeof( short ),&lt;BR /&gt;sr,&lt;BR /&gt;pOutput,&lt;BR /&gt;OutWidth*sizeof( short ),&lt;BR /&gt;d,&lt;BR /&gt;fx,&lt;BR /&gt;fy, &lt;BR /&gt;IPPI_INTER_LINEAR);&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT face="Arial" size="3"&gt;Thanks&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT face="Arial" size="3"&gt;Daniel&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 05 Dec 2006 00:18:45 GMT</pubDate>
    <dc:creator>dan_fischer</dc:creator>
    <dc:date>2006-12-05T00:18:45Z</dc:date>
    <item>
      <title>Precision of linear interpolation</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Precision-of-linear-interpolation/m-p/894982#M11951</link>
      <description>&lt;P&gt;&lt;FONT face="Arial"&gt;Hi,&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;I am using the function&lt;FONT size="2"&gt;&lt;FONT size="3"&gt;ippiResize to increase the image size in each direction by a factor two. The interpolation method is linear interpolation.&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT size="3"&gt;&lt;FONT face="Arial" size="3"&gt;Because the resizing factor is "2", I would expect that the pixel value f_in( x_in , y_in ) in the input image is equal tothe pixelvaluef_out ( 2*x_in , 2* y_in ) in the output image. E.g. something like that:&lt;/FONT&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Input846&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Output86456&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Unfortunately it is not exactly the same.&lt;/FONT&gt;&lt;FONT face="Arial"&gt; Because the error is getting worse at the end of the image, Isuspect that the sampling rate is not exactly "2". I &lt;/FONT&gt;&lt;FONT face="Arial"&gt;attached an example (raw image, 16bit signed).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial"&gt;Here is my code. MaybeI am doing somthing wrong&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;&lt;EM&gt;// resize factors&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;&lt;EM&gt;int InWidth=500;&lt;BR /&gt;int InHeight=500;&lt;BR /&gt;int OutWidth=1000;&lt;BR /&gt;int OutHeight=1000;&lt;/EM&gt;&lt;/FONT&gt;&lt;FONT face="Arial" size="2"&gt;&lt;EM&gt;&lt;BR /&gt;double fx = 2.0f; &lt;BR /&gt;double fy = 2.0f; &lt;BR /&gt; &lt;BR /&gt;IppiSize s = {InWidth, InHeight};&lt;BR /&gt; IppiRect sr = {0,0, InWidth, InHeight};&lt;BR /&gt; IppiSize d = {OutWidth, OutHeight};&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face="Arial" size="2"&gt;&lt;EM&gt;// resize&lt;BR /&gt;IppStatus res= &lt;BR /&gt;ippiResize_16u_C1R( pInput,&lt;BR /&gt;s,&lt;BR /&gt;InWidth*sizeof( short ),&lt;BR /&gt;sr,&lt;BR /&gt;pOutput,&lt;BR /&gt;OutWidth*sizeof( short ),&lt;BR /&gt;d,&lt;BR /&gt;fx,&lt;BR /&gt;fy, &lt;BR /&gt;IPPI_INTER_LINEAR);&lt;/EM&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT face="Arial" size="3"&gt;Thanks&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size="2"&gt;&lt;FONT face="Arial" size="3"&gt;Daniel&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 05 Dec 2006 00:18:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Precision-of-linear-interpolation/m-p/894982#M11951</guid>
      <dc:creator>dan_fischer</dc:creator>
      <dc:date>2006-12-05T00:18:45Z</dc:date>
    </item>
    <item>
      <title>Re: Precision of linear interpolation</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Precision-of-linear-interpolation/m-p/894983#M11952</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;
&lt;P&gt;you need to replace call of ippiResize with call of new function, ippiResizeSqrPixel&lt;/P&gt;
&lt;P&gt;Regards,&lt;BR /&gt; Vladimir&lt;/P&gt;</description>
      <pubDate>Fri, 08 Dec 2006 23:35:38 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Precision-of-linear-interpolation/m-p/894983#M11952</guid>
      <dc:creator>Vladimir_Dudnik</dc:creator>
      <dc:date>2006-12-08T23:35:38Z</dc:date>
    </item>
  </channel>
</rss>

