<?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 Re: Optimized (un)rotation of rectangular ROI in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Optimized-un-rotation-of-rectangular-ROI/m-p/958736#M19441</link>
    <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;You can try to use the ippWarpAffineQuad function with interpolation IPPI_INTER_LINEAR.&lt;/P&gt;
&lt;P&gt;It performs an Affine transform (Rotate is a subset of Affine Transform) from src Quadrangle to dst Quadrangle.&lt;/P&gt;
&lt;P&gt;You should specify the vertexes of srcQuad by the values of the coordinates of the rotated ROI. You can use ippiGetRotateQuad to get coordinates of rotated ROI.&lt;/P&gt;
&lt;P&gt;You need to set up the dstQuad as rectangle.&lt;/P&gt;
&lt;P&gt;Ipp8u arr2D[32][8];&lt;/P&gt;
&lt;P&gt;IppRect dstROI = {0,0,8,32}, srcFull = {0, 0, srcWidth, srcHeight};&lt;/P&gt;
&lt;P&gt;double dstQuad = {{0,0},{0,7},{7,31},{0,31}};&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ippiGetRotateQuad(srcRoi, srcQuad, angle, xShift, yShift);&lt;/P&gt;
&lt;P&gt;ippiWarpAffineQuad(pSrc, srcSize, srcStep, srcFull, srcQuad, arr2D, 8, dstROI, dstQuad, IPPI_INTER_LINEAR);&lt;/P&gt;
&lt;P&gt;look at the picture attached&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Regards,  Vladimir&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Message Edited by vdudnik on &lt;SPAN class="date_text"&gt;05-24-2004&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;09:05 PM&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Message Edited by vdudnik on &lt;SPAN class="date_text"&gt;05-24-2004&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;09:11 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Message Edited by vdudnik on &lt;SPAN class="date_text"&gt;05-24-2004&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;10:12 PM&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Tue, 25 May 2004 00:04:32 GMT</pubDate>
    <dc:creator>Intel_C_Intel</dc:creator>
    <dc:date>2004-05-25T00:04:32Z</dc:date>
    <item>
      <title>Optimized (un)rotation of rectangular ROI</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Optimized-un-rotation-of-rectangular-ROI/m-p/958735#M19440</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;I have an 8-bit grayscale image (e.g. 1000x1000) and rotated rectangular&lt;BR /&gt;ROI (typically 8x32).&lt;BR /&gt;&lt;BR /&gt;I want to copy this rotated ROI to a regular C-style 2D array.&lt;BR /&gt;In other words I want to undo rotation of the ROI and convert it to&lt;BR /&gt;an easy-to-use 2D array.&lt;BR /&gt;&lt;BR /&gt;The array's values must be computed using bilinear interpolation.&lt;BR /&gt;&lt;BR /&gt;ROI's width and height are integers.&lt;BR /&gt;ROI's origin and rotation angle are "float"-s.&lt;BR /&gt;&lt;/DIV&gt;
&lt;DIV&gt;Does there exist an IPP function which would allow me to do this efficiently?&lt;/DIV&gt;
&lt;DIV&gt;WarpBiliniar is more powerful than necessary for this taskand, as a result, isn't fast enough. All other geometric image transformation functions I checked seem to be not quite suitable. Am I missing something?&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Thu, 13 May 2004 09:47:02 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Optimized-un-rotation-of-rectangular-ROI/m-p/958735#M19440</guid>
      <dc:creator>zxs</dc:creator>
      <dc:date>2004-05-13T09:47:02Z</dc:date>
    </item>
    <item>
      <title>Re: Optimized (un)rotation of rectangular ROI</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Optimized-un-rotation-of-rectangular-ROI/m-p/958736#M19441</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;DIV&gt;&lt;/DIV&gt;
&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;You can try to use the ippWarpAffineQuad function with interpolation IPPI_INTER_LINEAR.&lt;/P&gt;
&lt;P&gt;It performs an Affine transform (Rotate is a subset of Affine Transform) from src Quadrangle to dst Quadrangle.&lt;/P&gt;
&lt;P&gt;You should specify the vertexes of srcQuad by the values of the coordinates of the rotated ROI. You can use ippiGetRotateQuad to get coordinates of rotated ROI.&lt;/P&gt;
&lt;P&gt;You need to set up the dstQuad as rectangle.&lt;/P&gt;
&lt;P&gt;Ipp8u arr2D[32][8];&lt;/P&gt;
&lt;P&gt;IppRect dstROI = {0,0,8,32}, srcFull = {0, 0, srcWidth, srcHeight};&lt;/P&gt;
&lt;P&gt;double dstQuad = {{0,0},{0,7},{7,31},{0,31}};&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ippiGetRotateQuad(srcRoi, srcQuad, angle, xShift, yShift);&lt;/P&gt;
&lt;P&gt;ippiWarpAffineQuad(pSrc, srcSize, srcStep, srcFull, srcQuad, arr2D, 8, dstROI, dstQuad, IPPI_INTER_LINEAR);&lt;/P&gt;
&lt;P&gt;look at the picture attached&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Regards,  Vladimir&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;Message Edited by vdudnik on &lt;SPAN class="date_text"&gt;05-24-2004&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;09:05 PM&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Message Edited by vdudnik on &lt;SPAN class="date_text"&gt;05-24-2004&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;09:11 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Message Edited by vdudnik on &lt;SPAN class="date_text"&gt;05-24-2004&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;10:12 PM&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 25 May 2004 00:04:32 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Optimized-un-rotation-of-rectangular-ROI/m-p/958736#M19441</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2004-05-25T00:04:32Z</dc:date>
    </item>
    <item>
      <title>Re: Optimized (un)rotation of rectangular ROI</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Optimized-un-rotation-of-rectangular-ROI/m-p/958737#M19442</link>
      <description>&lt;FONT color="#0000ff" size="2"&gt;
&lt;P&gt;You can try to use the ippWarpAffineQuad function with interpolation IPPI_INTER_LINEAR.&lt;/P&gt;
&lt;P&gt;It performs an Affine transform (Rotate is a subset of Affine Transform) from src Quadrangle to dst Quadrangle.&lt;/P&gt;
&lt;P&gt;You should specify the vertexes of srcQuad by the values of the coordinates of the rotated ROI. You can use ippiGetRotateQuad to get coordinates of rotated ROI.&lt;/P&gt;
&lt;P&gt;You need to set up the dstQuad as rectangle.&lt;/P&gt;&lt;/FONT&gt;&lt;FONT face="Courier New" color="#0000ff" size="2"&gt;
&lt;P&gt;Ipp8u arr2D[32][8];&lt;/P&gt;
&lt;P&gt;IppRect dstROI = {0,0,8,32}, srcFull = {0, 0, srcWidth, srcHeight};&lt;/P&gt;
&lt;P&gt;double dstQuad = {{0,0},{0,7},{7,31},{0,31}};&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;ippiGetRotateQuad(srcRoi, srcQuad, angle, xShift, yShift);&lt;/P&gt;
&lt;P&gt;ippiWarpAffineQuad(pSrc, srcSize, srcStep, srcFull, srcQuad, arr2D, 8, dstROI, dstQuad, &lt;/P&gt;&lt;/FONT&gt;&lt;FONT face="Times New Roman" color="#0000ff" size="2"&gt;IPPI_INTER_LINEAR&lt;/FONT&gt;&lt;FONT face="Courier New" color="#0000ff" size="2"&gt;);&lt;P&gt;&lt;/P&gt;&lt;/FONT&gt;
&lt;DIV&gt;&lt;/DIV&gt;</description>
      <pubDate>Tue, 25 May 2004 01:14:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Optimized-un-rotation-of-rectangular-ROI/m-p/958737#M19442</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2004-05-25T01:14:27Z</dc:date>
    </item>
    <item>
      <title>Re: Optimized (un)rotation of rectangular ROI</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Optimized-un-rotation-of-rectangular-ROI/m-p/958738#M19443</link>
      <description>Thanks, I guess WarpAffine must be faster than the function I previously tried. I will have to test it for my data and report the result later.&lt;BR /&gt;&lt;BR /&gt;Another issue left is data types. Ideally I want to have Ipp32f output and "standard" Ipp8u input. Of course, I can live with Ipp8u output, but it will introduce some unnecessary interpolation error. Alternatively, I can pre-convert my 8u input to 32f. &lt;BR /&gt;&lt;BR /&gt;But still IMHO it's probably an overlook in IPP function set: IPP supports functions to perform image rotation (i.e. to convert axis-aligned ROI to a rotated one) but there are no explicit functions to do "un-rotation" (i.e. convert rotated ROI to axis-aligned one).&lt;BR /&gt;&lt;BR /&gt;This might make sense if Rotate functions are just shortcuts for WarpAffine. Is this guess correct?</description>
      <pubDate>Thu, 27 May 2004 10:21:03 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Optimized-un-rotation-of-rectangular-ROI/m-p/958738#M19443</guid>
      <dc:creator>zxs</dc:creator>
      <dc:date>2004-05-27T10:21:03Z</dc:date>
    </item>
    <item>
      <title>Re: Optimized (un)rotation of rectangular ROI</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Optimized-un-rotation-of-rectangular-ROI/m-p/958739#M19444</link>
      <description>&lt;P&gt;Hi, please find comments with "--"&lt;/P&gt;
&lt;P&gt;Thanks, I guess WarpAffine must be faster than the function I previously tried. I will have to test it for my data and report the result later.&lt;BR /&gt;&lt;BR /&gt;Another issue left is data types. Ideally I want to have Ipp32f output and "standard" Ipp8u input. Of course, I can live with Ipp8u output, but it will introduce some unnecessary interpolation error. Alternatively, I can pre-convert my 8u input to 32f.&lt;BR /&gt;--&lt;FONT color="#0000ff" size="2"&gt;Yes, you can preconvert 8u input to 32f, and use ipp functions with 32f flavor.&lt;/FONT&gt;&lt;FONT face="Times New Roman"&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;BR /&gt;But still IMHO it's probably an overlook in IPP function set: IPP supports functions to perform image rotation (i.e. to convert axis-aligned ROI to a rotated one) but there are no explicit functions to do "un-rotation" (i.e. convert rotated ROI to axis-aligned one).&lt;BR /&gt;&lt;BR /&gt;This might make sense if Rotate functions are just shortcuts for WarpAffine. Is this guess correct? &lt;BR /&gt;--&lt;FONT color="#0000ff" size="2"&gt;Yes, you are right. &lt;/FONT&gt;&lt;FONT face="Arial" color="#0000ff" size="2"&gt;R&lt;/FONT&gt;&lt;FONT size="3"&gt;&lt;FONT face="Times New Roman" color="#0000ff"&gt;otate&lt;/FONT&gt;&lt;FONT face="Times New Roman CYR" color="#0000ff"&gt; &lt;/FONT&gt;&lt;FONT face="Times New Roman" color="#0000ff"&gt;uses WarpAffine &lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT face="Arial" color="#0000ff" size="2"&gt;for most of angles. With &lt;/FONT&gt;&lt;FONT face="Times New Roman" color="#0000ff"&gt;&lt;FONT size="3"&gt;WarpAffine you can do any Rotate operation you need&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;DIV&gt;Regards,&lt;BR /&gt; Vladimir&lt;/DIV&gt;</description>
      <pubDate>Fri, 04 Jun 2004 18:07:31 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Optimized-un-rotation-of-rectangular-ROI/m-p/958739#M19444</guid>
      <dc:creator>Intel_C_Intel</dc:creator>
      <dc:date>2004-06-04T18:07:31Z</dc:date>
    </item>
  </channel>
</rss>

