<?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 Help: Pixel Shift Problem when Resize an image with ippiResizeS in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Pixel-Shift-Problem-when-Resize-an-image-with/m-p/875100#M9399</link>
    <description>To answer Carlo's question,&lt;A hoverintent_s="0" jquery1286846555853="62" hoverintent_t="undefined" rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=450605" href="http://software.intel.com/en-us/profile/450605/" class="basic"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt; i believed the shift problem as above image should be resolved via set &lt;STRONG&gt;right stepBytes&lt;/STRONG&gt; as we discussed in other threads, eg&lt;BR /&gt;&lt;A href="http://software.intel.com/en-us/forums/showthread.php?t=66171"&gt;http://software.intel.com/en-us/forums/showthread.php?t=66171&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The stepBytesmay not always equal tochannel*Width. &lt;BR /&gt;It may be ((nChannel*srcWidth+3)&amp;gt;&amp;gt;2)&amp;lt;&amp;lt;2 if a bmp image with4 bytes-aligned ora multiple of 32 when use ippiMalloc.&lt;BR /&gt;&lt;BR /&gt;As it is unavoidable to involve the floatingoperation in Resize operation. if considering the cost of convertion of float 32f to 16u, theippiResizeSqrPixel_16u_C1R is not supposed to be faster thanippiResizeSqrPixel_32f_C1R ona general CPU.&lt;BR /&gt;&lt;BR /&gt;To &lt;A jquery1286847053195="89" hoverintent_s="1" hoverintent_t="undefined" rel="/en-us/services/profile/quick_profile.php?is_paid=NO&amp;amp;user_id=468434" href="http://software.intel.com/en-us/profile/468434/" class="basic"&gt;kangscut&lt;/A&gt;, aboutabout 0.5 pixel shift,&lt;BR /&gt;&lt;BR /&gt;I guess, thereisrounding issue in some steps indata type conversion or inippiResizeSqrPixel internally.&lt;BR /&gt;Forexample,&lt;A href="http://software.intel.com/en-us/articles/intel-ipp-library-61-fixes-list/"&gt;Intel IPP Library 6.1 Fixes List &lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;H4&gt;IPP v6.1 update 3 (26 Nov 2009)&lt;/H4&gt;&lt;TABLE width="700" cellpadding="0" cellspacing="0" border="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DPD200141560&lt;/TD&gt;&lt;TD&gt;BZIP2 with ipp_ prefixes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;DPD200140668&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;ippiResizeSqrPixel_8u_C1R has differing results depending on CPU (rounding error problem)&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;Besideofupgrade tothe latest IPP version, we may say moreifyou have the exact information abouthowthe image wasstored/loaded/converted. &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ying&lt;BR /&gt;</description>
    <pubDate>Tue, 12 Oct 2010 02:01:20 GMT</pubDate>
    <dc:creator>Ying_H_Intel</dc:creator>
    <dc:date>2010-10-12T02:01:20Z</dc:date>
    <item>
      <title>Help: Pixel Shift Problem when Resize an image with ippiResizeSqrPixel_32f_C1R</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Pixel-Shift-Problem-when-Resize-an-image-with/m-p/875096#M9395</link>
      <description>&lt;P&gt;I am using Ipp6.0 version, The input and output image(Dicom image) only have one channel, 16bits per pixel. After Resize with ippiResizeSqrPixel_32f_C1R function, the interpolated image has about 0.5 pixel shift.&lt;/P&gt;
&lt;P&gt;Some parameters for my test: original image size: 512*512; ResizeFactor=2.0; pfImageIn, pfImageOut is a memory block allocated with new operator&lt;/P&gt;
&lt;P&gt;Here is part of my code, waiting for your help:&lt;/P&gt;
&lt;P&gt;&lt;BR /&gt; int iColSrc = iImgCol; // original image's width&lt;BR /&gt; int iLinSrc = iImgLin; // original image's height&lt;BR /&gt; int iColDst = short((float)iColSrc * fResizeCol) ; // dest image's width&lt;BR /&gt; int iLinDst = short((float)iLinSrc * fResizeLin) ; // dest image's height&lt;BR /&gt; &lt;BR /&gt; IppiSize size = {iColSrc, iLinSrc};&lt;BR /&gt; IppiRect srect = { 0, 0, iColSrc, iLinSrc };&lt;BR /&gt; IppiRect drect = { 0, 0, iColDst, iLinDst };&lt;BR /&gt; Ipp8u *buf;&lt;BR /&gt; int bufsize;&lt;BR /&gt; &lt;BR /&gt; //calculation of work buffer size&lt;BR /&gt; ippStatus = ippiResizeGetBufSize(srect,drect,1,iInterType,&amp;amp;bufsize);&lt;BR /&gt; buf = ippsMalloc_8u(bufsize);&lt;BR /&gt; if(NULL==buf)&lt;BR /&gt; {&lt;BR /&gt; iErrType = MemoryErr;&lt;BR /&gt; return false;&lt;BR /&gt; }&lt;BR /&gt; // resize m_pfImageIn &lt;BR /&gt; ippStatus = ippiResizeSqrPixel_32f_C1R(pfImageIn, size, iColSrc*(int)(sizeof(Ipp32f)), srect,&lt;BR /&gt; pfImageOut, iColDst*(int)(sizeof(Ipp32f)), drect,&lt;BR /&gt; fResizeCol, fResizeLin, 0, 0, iInterType, buf);&lt;/P&gt;</description>
      <pubDate>Tue, 09 Mar 2010 07:07:59 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Pixel-Shift-Problem-when-Resize-an-image-with/m-p/875096#M9395</guid>
      <dc:creator>kangscut</dc:creator>
      <dc:date>2010-03-09T07:07:59Z</dc:date>
    </item>
    <item>
      <title>Help: Pixel Shift Problem when Resize an image with ippiResizeS</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Pixel-Shift-Problem-when-Resize-an-image-with/m-p/875097#M9396</link>
      <description>&lt;P&gt;Hell Kangscut,&lt;/P&gt;
&lt;P&gt;What interpolation type are you using? (theiInterTypevalue) . Can youprovide the test image (bmp format if possible) so we can reproduce the issue.&lt;/P&gt;
&lt;P&gt;Additionally, the latest IPP version is6.1 update 4, which can be getten following the guide on&lt;A href="http://software.intel.com/en-us/articles/ipp-downloads-registration-and-licensing/"&gt;IPP Downloads, Registration and Licensing&lt;/A&gt;.How about the result iftry the new version?&lt;/P&gt;
&lt;P&gt;Regards,&lt;/P&gt;
&lt;P&gt;Ying&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2010 09:21:14 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Pixel-Shift-Problem-when-Resize-an-image-with/m-p/875097#M9396</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2010-03-11T09:21:14Z</dc:date>
    </item>
    <item>
      <title>Help: Pixel Shift Problem when Resize an image with ippiResizeS</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Pixel-Shift-Problem-when-Resize-an-image-with/m-p/875098#M9397</link>
      <description>I'm working on 16bit dicom image too...&lt;BR /&gt;can i know why do you use ippiResizeSqrPixel_32f_C1R instead of using ippiResizeSqrPixel_16u_C1R that is supposed to be faster?&lt;BR /&gt;&lt;BR /&gt;it will be surely more precise but you can't represent it on video as no monitor support 32bit grayscale so what's the benefit? are you working on multiple filter image effect so that you must keep the maximun definition on channel data?&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 11 Mar 2010 13:50:48 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Pixel-Shift-Problem-when-Resize-an-image-with/m-p/875098#M9397</guid>
      <dc:creator>Andreoli__Carlo</dc:creator>
      <dc:date>2010-03-11T13:50:48Z</dc:date>
    </item>
    <item>
      <title>Help: Pixel Shift Problem when Resize an image with ippiResizeS</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Pixel-Shift-Problem-when-Resize-an-image-with/m-p/875099#M9398</link>
      <description>&lt;P&gt;To answer to your question...are you using windows bitmap?&lt;/P&gt;
&lt;P&gt;if yes you have to know that the windows Bitmap format require that address of each image row should be aligned onfour bytes resulting in one  padding byte at the each image row end in case of odd image width.&lt;/P&gt;
&lt;P&gt;i previously have your same problem of shifting&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="23651-3.gif"&gt;&lt;img src="https://community.intel.com/t5/image/serverpage/image-id/9984i587D9759EB9BD3A9/image-size/large?v=v2&amp;amp;px=999&amp;amp;whitelist-exif-data=Orientation%2CResolution%2COriginalDefaultFinalSize%2CCopyright" role="button" title="23651-3.gif" alt="23651-3.gif" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2010 14:08:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Pixel-Shift-Problem-when-Resize-an-image-with/m-p/875099#M9398</guid>
      <dc:creator>Andreoli__Carlo</dc:creator>
      <dc:date>2010-03-11T14:08:57Z</dc:date>
    </item>
    <item>
      <title>Help: Pixel Shift Problem when Resize an image with ippiResizeS</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Pixel-Shift-Problem-when-Resize-an-image-with/m-p/875100#M9399</link>
      <description>To answer Carlo's question,&lt;A hoverintent_s="0" jquery1286846555853="62" hoverintent_t="undefined" rel="/en-us/services/profile/quick_profile.php?is_paid=&amp;amp;user_id=450605" href="http://software.intel.com/en-us/profile/450605/" class="basic"&gt;&lt;STRONG&gt;&lt;/STRONG&gt;&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt; i believed the shift problem as above image should be resolved via set &lt;STRONG&gt;right stepBytes&lt;/STRONG&gt; as we discussed in other threads, eg&lt;BR /&gt;&lt;A href="http://software.intel.com/en-us/forums/showthread.php?t=66171"&gt;http://software.intel.com/en-us/forums/showthread.php?t=66171&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;The stepBytesmay not always equal tochannel*Width. &lt;BR /&gt;It may be ((nChannel*srcWidth+3)&amp;gt;&amp;gt;2)&amp;lt;&amp;lt;2 if a bmp image with4 bytes-aligned ora multiple of 32 when use ippiMalloc.&lt;BR /&gt;&lt;BR /&gt;As it is unavoidable to involve the floatingoperation in Resize operation. if considering the cost of convertion of float 32f to 16u, theippiResizeSqrPixel_16u_C1R is not supposed to be faster thanippiResizeSqrPixel_32f_C1R ona general CPU.&lt;BR /&gt;&lt;BR /&gt;To &lt;A jquery1286847053195="89" hoverintent_s="1" hoverintent_t="undefined" rel="/en-us/services/profile/quick_profile.php?is_paid=NO&amp;amp;user_id=468434" href="http://software.intel.com/en-us/profile/468434/" class="basic"&gt;kangscut&lt;/A&gt;, aboutabout 0.5 pixel shift,&lt;BR /&gt;&lt;BR /&gt;I guess, thereisrounding issue in some steps indata type conversion or inippiResizeSqrPixel internally.&lt;BR /&gt;Forexample,&lt;A href="http://software.intel.com/en-us/articles/intel-ipp-library-61-fixes-list/"&gt;Intel IPP Library 6.1 Fixes List &lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;H4&gt;IPP v6.1 update 3 (26 Nov 2009)&lt;/H4&gt;&lt;TABLE width="700" cellpadding="0" cellspacing="0" border="0"&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD width="100"&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;DPD200141560&lt;/TD&gt;&lt;TD&gt;BZIP2 with ipp_ prefixes&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;STRONG&gt;DPD200140668&lt;/STRONG&gt;&lt;/TD&gt;&lt;TD&gt;&lt;STRONG&gt;ippiResizeSqrPixel_8u_C1R has differing results depending on CPU (rounding error problem)&lt;/STRONG&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;BR /&gt;Besideofupgrade tothe latest IPP version, we may say moreifyou have the exact information abouthowthe image wasstored/loaded/converted. &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Ying&lt;BR /&gt;</description>
      <pubDate>Tue, 12 Oct 2010 02:01:20 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Help-Pixel-Shift-Problem-when-Resize-an-image-with/m-p/875100#M9399</guid>
      <dc:creator>Ying_H_Intel</dc:creator>
      <dc:date>2010-10-12T02:01:20Z</dc:date>
    </item>
  </channel>
</rss>

