<?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 ResizeSqrPixel, linear interpolation in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/ResizeSqrPixel-linear-interpolation/m-p/950145#M18548</link>
    <description>&lt;P&gt;&amp;lt;p&amp;gt;Hello, I'm trying to magnify image with linear interpolation and I get strange results with ResizeSqrPixel.&lt;/P&gt;
&lt;P&gt;Eg., transformation of 2x2 to 3x3 (just inset one column and one row) works as expected:&lt;/P&gt;
&lt;P&gt;source:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;0.0 10.0&lt;/P&gt;
&lt;P&gt;10.0 0.0&lt;/P&gt;
&lt;P&gt;destination:&lt;/P&gt;
&lt;P&gt;0.0 5.0 10.0&lt;/P&gt;
&lt;P&gt;5.0 5.0 5.0&lt;/P&gt;
&lt;P&gt;10.0 5.0 0.0&lt;/P&gt;
&lt;P&gt;But I get unexpected result with&lt;/P&gt;
&lt;P&gt;Source w=3 h= 3&lt;/P&gt;
&lt;P&gt;0: 0.0 10.0 0.0&lt;/P&gt;
&lt;P&gt;1: 10.0 0.0 10.0&lt;/P&gt;
&lt;P&gt;2: 0.0 10.0 0.0&lt;/P&gt;
&lt;P&gt;Destinationw=5 h= 5&lt;/P&gt;
&lt;P&gt;0: 0.0 4.0 10.0 4.0 0.0&lt;/P&gt;
&lt;P&gt;1: 4.0 4.8 6.0 4.8 4.0&lt;/P&gt;
&lt;P&gt;2: 10.0 6.0 0.0 6.0 10.0&lt;/P&gt;
&lt;P&gt;3: 4.0 4.8 6.0 4.8 4.0&lt;/P&gt;
&lt;P&gt;4: 0.0 4.0 10.0 4.0 0.0&lt;/P&gt;
&lt;P&gt;IPP version 6.1, code:&lt;/P&gt;
&lt;P&gt;int w1, w2, h1, h2;&lt;/P&gt;
&lt;P&gt;w1=3; h1=3;&lt;/P&gt;
&lt;P&gt;Ipp32f src[3*3] = {0, 10, 0, 10, 0, 10, 0, 10, 0};&lt;/P&gt;
&lt;P&gt;// w1=2; h1=2; // Ipp32f src[2*2] = {0, 10, 10, 0};&lt;/P&gt;
&lt;P&gt;w2 = 2*w1-1;&lt;/P&gt;
&lt;P&gt;h2 = 2*h1-1;&lt;/P&gt;
&lt;P&gt;Ipp32f dst[w2*h2];&lt;/P&gt;
&lt;P&gt;double dx=double(w2)/double(w1);&lt;/P&gt;
&lt;P&gt;double dy=double(h2)/double(h1);&lt;/P&gt;
&lt;P&gt;IppiRect srcRect={0,0,w1,h1};&lt;/P&gt;
&lt;P&gt;IppiRect dstRect={0,0,w2,h2};&lt;/P&gt;
&lt;P&gt;Ipp8u *buf = NULL;&lt;/P&gt;
&lt;P&gt;int bufsize; ippiResizeGetBufSize( srcRect, dstRect, 1, IPPI_INTER_LINEAR, &amp;amp;bufsize );&lt;/P&gt;
&lt;P&gt;IppiSize srcSize = {w1,h1};&lt;/P&gt;
&lt;P&gt;IppiSize dstSize = {w2,h2};&lt;/P&gt;
&lt;P&gt;int srcStep = srcSize.width*sizeof(Ipp32f);&lt;/P&gt;
&lt;P&gt;int dstStep = dstSize.width*sizeof(Ipp32f);&lt;/P&gt;
&lt;P&gt;buf = ippsMalloc_8u( bufsize );&lt;/P&gt;
&lt;P&gt;if(buf != NULL) ippiResizeSqrPixel_32f_C1R(src, srcSize, srcStep, srcRect, dst, dstStep, dstRect,dx,dy, 0, 0, IPPI_INTER_LINEAR, buf);&lt;/P&gt;
&lt;P&gt;if(buf != NULL) ippsFree( buf );&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
    <pubDate>Thu, 15 Nov 2012 12:42:55 GMT</pubDate>
    <dc:creator>Alexey_K_1</dc:creator>
    <dc:date>2012-11-15T12:42:55Z</dc:date>
    <item>
      <title>ResizeSqrPixel, linear interpolation</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ResizeSqrPixel-linear-interpolation/m-p/950145#M18548</link>
      <description>&lt;P&gt;&amp;lt;p&amp;gt;Hello, I'm trying to magnify image with linear interpolation and I get strange results with ResizeSqrPixel.&lt;/P&gt;
&lt;P&gt;Eg., transformation of 2x2 to 3x3 (just inset one column and one row) works as expected:&lt;/P&gt;
&lt;P&gt;source:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;0.0 10.0&lt;/P&gt;
&lt;P&gt;10.0 0.0&lt;/P&gt;
&lt;P&gt;destination:&lt;/P&gt;
&lt;P&gt;0.0 5.0 10.0&lt;/P&gt;
&lt;P&gt;5.0 5.0 5.0&lt;/P&gt;
&lt;P&gt;10.0 5.0 0.0&lt;/P&gt;
&lt;P&gt;But I get unexpected result with&lt;/P&gt;
&lt;P&gt;Source w=3 h= 3&lt;/P&gt;
&lt;P&gt;0: 0.0 10.0 0.0&lt;/P&gt;
&lt;P&gt;1: 10.0 0.0 10.0&lt;/P&gt;
&lt;P&gt;2: 0.0 10.0 0.0&lt;/P&gt;
&lt;P&gt;Destinationw=5 h= 5&lt;/P&gt;
&lt;P&gt;0: 0.0 4.0 10.0 4.0 0.0&lt;/P&gt;
&lt;P&gt;1: 4.0 4.8 6.0 4.8 4.0&lt;/P&gt;
&lt;P&gt;2: 10.0 6.0 0.0 6.0 10.0&lt;/P&gt;
&lt;P&gt;3: 4.0 4.8 6.0 4.8 4.0&lt;/P&gt;
&lt;P&gt;4: 0.0 4.0 10.0 4.0 0.0&lt;/P&gt;
&lt;P&gt;IPP version 6.1, code:&lt;/P&gt;
&lt;P&gt;int w1, w2, h1, h2;&lt;/P&gt;
&lt;P&gt;w1=3; h1=3;&lt;/P&gt;
&lt;P&gt;Ipp32f src[3*3] = {0, 10, 0, 10, 0, 10, 0, 10, 0};&lt;/P&gt;
&lt;P&gt;// w1=2; h1=2; // Ipp32f src[2*2] = {0, 10, 10, 0};&lt;/P&gt;
&lt;P&gt;w2 = 2*w1-1;&lt;/P&gt;
&lt;P&gt;h2 = 2*h1-1;&lt;/P&gt;
&lt;P&gt;Ipp32f dst[w2*h2];&lt;/P&gt;
&lt;P&gt;double dx=double(w2)/double(w1);&lt;/P&gt;
&lt;P&gt;double dy=double(h2)/double(h1);&lt;/P&gt;
&lt;P&gt;IppiRect srcRect={0,0,w1,h1};&lt;/P&gt;
&lt;P&gt;IppiRect dstRect={0,0,w2,h2};&lt;/P&gt;
&lt;P&gt;Ipp8u *buf = NULL;&lt;/P&gt;
&lt;P&gt;int bufsize; ippiResizeGetBufSize( srcRect, dstRect, 1, IPPI_INTER_LINEAR, &amp;amp;bufsize );&lt;/P&gt;
&lt;P&gt;IppiSize srcSize = {w1,h1};&lt;/P&gt;
&lt;P&gt;IppiSize dstSize = {w2,h2};&lt;/P&gt;
&lt;P&gt;int srcStep = srcSize.width*sizeof(Ipp32f);&lt;/P&gt;
&lt;P&gt;int dstStep = dstSize.width*sizeof(Ipp32f);&lt;/P&gt;
&lt;P&gt;buf = ippsMalloc_8u( bufsize );&lt;/P&gt;
&lt;P&gt;if(buf != NULL) ippiResizeSqrPixel_32f_C1R(src, srcSize, srcStep, srcRect, dst, dstStep, dstRect,dx,dy, 0, 0, IPPI_INTER_LINEAR, buf);&lt;/P&gt;
&lt;P&gt;if(buf != NULL) ippsFree( buf );&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 15 Nov 2012 12:42:55 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ResizeSqrPixel-linear-interpolation/m-p/950145#M18548</guid>
      <dc:creator>Alexey_K_1</dc:creator>
      <dc:date>2012-11-15T12:42:55Z</dc:date>
    </item>
    <item>
      <title>Sorry, I saw a nicely</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ResizeSqrPixel-linear-interpolation/m-p/950146#M18549</link>
      <description>deleted</description>
      <pubDate>Thu, 15 Nov 2012 12:46:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ResizeSqrPixel-linear-interpolation/m-p/950146#M18549</guid>
      <dc:creator>Alexey_K_1</dc:creator>
      <dc:date>2012-11-15T12:46:00Z</dc:date>
    </item>
  </channel>
</rss>

