<?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 Using a negative offset in the dstRoi parameter of ippiRotateCe in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-a-negative-offset-in-the-dstRoi-parameter-of/m-p/766421#M273</link>
    <description>Hello, I want to rotate my image along its center, by "angle" degrees in the clockwise direction.&lt;BR /&gt;ippiRotateCenter function wants me to specify the destination size. But the destination size should change based on the current "angle" value. How can I compute my destination image size using the angle value?</description>
    <pubDate>Thu, 26 May 2011 15:15:13 GMT</pubDate>
    <dc:creator>Kadir_Kirtac</dc:creator>
    <dc:date>2011-05-26T15:15:13Z</dc:date>
    <item>
      <title>Using a negative offset in the dstRoi parameter of ippiRotateCenter</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-a-negative-offset-in-the-dstRoi-parameter-of/m-p/766417#M269</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;Q: can I use a negative offset in the dstRoi parameter in ippiRotateCenter ?&lt;BR /&gt;&lt;BR /&gt;When I try to do so, I get an error ( ippStsSizeErr ). However, I make sure the all pixels in the ROI (eventually used with negative index) exist and are properly allocated).&lt;BR /&gt;&lt;BR /&gt;~~~~&lt;BR /&gt;&lt;BR /&gt;Why do I need a negative offset?&lt;BR /&gt;&lt;BR /&gt;Sorry for the long story, the followingis just to justify my need of a negative offset in the dstROI:&lt;BR /&gt;&lt;BR /&gt;I am using the ippiRotateCenter function to rotate a small tile of variable size of an image : I am only interested in the tile region centerred around the center point (parameters xCenter and yCenter) after rotation.&lt;BR /&gt;&lt;BR /&gt;If I understand well that function, the center point (xCenter, yCenter) will have the same coordinates in the src and destination image (we are rotating about that point). So, if I only want a small rotated tile around the center point, I need to offset my dst pointer, example:&lt;BR /&gt;&lt;BR /&gt; pDst = pDst - (xCenter - dstWidth/2)- (yCenter - dstHeight/2) * dstStep ;&lt;BR /&gt;&lt;BR /&gt;to have the center point at the center of my dst image (assuming a 1 channel byte image) and set a small size ROI and an offset that takes into account the center point:&lt;BR /&gt;&lt;BR /&gt;dstROI = { xCenter - dstWidth/2, yCenter - dstHeight/2, dstWidth, dstHeight }&lt;BR /&gt;&lt;BR /&gt;The dst image ROI is then a small rectanglewith a relatively large offset WRT image origin. However, when the desired size of the dst image grows compare to the radius of the center point, my offset in x and/or in y becomes negative and the routine returns an error.I dont see what is wrong with my usage...but there must be something wrong. ..&lt;BR /&gt;&lt;BR /&gt;~~~~&lt;BR /&gt;&lt;BR /&gt;Thank you!&lt;BR /&gt;&lt;BR /&gt;Gilbert</description>
      <pubDate>Fri, 08 Apr 2011 17:20:50 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-a-negative-offset-in-the-dstRoi-parameter-of/m-p/766417#M269</guid>
      <dc:creator>georgiswan</dc:creator>
      <dc:date>2011-04-08T17:20:50Z</dc:date>
    </item>
    <item>
      <title>Using a negative offset in the dstRoi parameter of ippiRotateCe</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-a-negative-offset-in-the-dstRoi-parameter-of/m-p/766418#M270</link>
      <description>I'm sorry, but I don't understand how you could supply a "negative offset in the dstRoi parameter." According to the definition of ippiRotateCenter, this parameter is an IppiRectstructure... &lt;BR /&gt;&lt;BR /&gt;&lt;PRE&gt;typedef structure _IppiRect {
	int 	x;
	int 	y;
	int 	width;
	int 	height;
}
&lt;/PRE&gt;&lt;BR /&gt;Perhaps I have misunderstood your question...&lt;BR /&gt;</description>
      <pubDate>Sat, 09 Apr 2011 00:57:53 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-a-negative-offset-in-the-dstRoi-parameter-of/m-p/766418#M270</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2011-04-09T00:57:53Z</dc:date>
    </item>
    <item>
      <title>Using a negative offset in the dstRoi parameter of ippiRotateCe</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-a-negative-offset-in-the-dstRoi-parameter-of/m-p/766419#M271</link>
      <description>I may have abused the IPP notion of x and y in the IppiRect. According to the doc:&lt;BR /&gt;&lt;P class="sectionBodyText" style="padding-left: 20pt;"&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;STRONG&gt;&lt;EM&gt;The structure IppiRect for storing the geometric position and size of a rectangle is defined as&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="sectionBodyText" style="padding-left: 20pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;typedef struct {&lt;BR /&gt; int x;&lt;BR /&gt; int y;&lt;BR /&gt; int width;&lt;BR /&gt; int height;&lt;BR /&gt;} IppiRect;&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P class="sectionBodyText" style="padding-left: 20pt;"&gt;&lt;STRONG&gt;&lt;EM&gt;where x,y denote the coordinates of the top left corner of the rectangle that has dimensions width in the x-direction by height in the y-direction.&lt;/EM&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;BR /&gt;So, I simply entered a negative value for x and/or y to point &lt;EM&gt;behind &lt;/EM&gt;the image pointer (coordinates values (x,y) of the top left corner of a ROI can be negative -- of course, width and height must be positive). That would position the ROI in the region of the space where I was interested to get the &lt;EM&gt;src image&lt;/EM&gt; after rotation (after rotation, the src image can effectively cover a region of the space where you would need negative index to reach). For most functions, negative image indices dont make much sense but for a rotation, they might make sense). I had applied an offset to my dst pointer to avoid memory out of bound access: i.e. all index (even negative ones) when legal in my ROI using the pointer provided to the routine.&lt;BR /&gt;&lt;BR /&gt;My approach worked for large positive indices (also way outside the original source image) but always failed for negative indices ( this can happen when the center point (x,y) is close to the origin of the source imageand I want a large destination region, larger then the radius of the center point sqrt(centerx^2 + centery^2) ).&lt;BR /&gt;&lt;BR /&gt;I think that using negative x or y in IppiRect is simply blindly forbidden in IPP. So, I solved my problem by giving up &lt;STRONG&gt;rotateCenter&lt;/STRONG&gt; andusing &lt;STRONG&gt;ippiRotate&lt;/STRONG&gt; instead with (sometimes negative) shiftx and shifty values that give me the right view of the source image after rotation.</description>
      <pubDate>Mon, 11 Apr 2011 15:11:08 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-a-negative-offset-in-the-dstRoi-parameter-of/m-p/766419#M271</guid>
      <dc:creator>georgiswan</dc:creator>
      <dc:date>2011-04-11T15:11:08Z</dc:date>
    </item>
    <item>
      <title>Using a negative offset in the dstRoi parameter of ippiRotateCe</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-a-negative-offset-in-the-dstRoi-parameter-of/m-p/766420#M272</link>
      <description>Glad to hear you found a workable solution.</description>
      <pubDate>Tue, 12 Apr 2011 17:58:21 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-a-negative-offset-in-the-dstRoi-parameter-of/m-p/766420#M272</guid>
      <dc:creator>PaulF_IntelCorp</dc:creator>
      <dc:date>2011-04-12T17:58:21Z</dc:date>
    </item>
    <item>
      <title>Using a negative offset in the dstRoi parameter of ippiRotateCe</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/Using-a-negative-offset-in-the-dstRoi-parameter-of/m-p/766421#M273</link>
      <description>Hello, I want to rotate my image along its center, by "angle" degrees in the clockwise direction.&lt;BR /&gt;ippiRotateCenter function wants me to specify the destination size. But the destination size should change based on the current "angle" value. How can I compute my destination image size using the angle value?</description>
      <pubDate>Thu, 26 May 2011 15:15:13 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/Using-a-negative-offset-in-the-dstRoi-parameter-of/m-p/766421#M273</guid>
      <dc:creator>Kadir_Kirtac</dc:creator>
      <dc:date>2011-05-26T15:15:13Z</dc:date>
    </item>
  </channel>
</rss>

