<?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 Zhan, in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133476#M25852</link>
    <description>&lt;P&gt;Zhan,&lt;/P&gt;

&lt;P&gt;Could you please provide parameters of the machine that you are used to run IPP warp functions and the version of IPP library (IPP 9.0, IPP 9.0 U1, &lt;SPAN style="font-size: 13.008px;"&gt;IPP 9.0 U2&lt;/SPAN&gt;)?&lt;/P&gt;

&lt;P&gt;It would be great, if you create a simple sample code to reproduce the problem.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Valentin&lt;/P&gt;</description>
    <pubDate>Wed, 05 Jul 2017 09:53:01 GMT</pubDate>
    <dc:creator>Valentin_K_Intel</dc:creator>
    <dc:date>2017-07-05T09:53:01Z</dc:date>
    <item>
      <title>ippiWarpAffine status 30</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133470#M25846</link>
      <description>&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Hi, I'm using intel ipp9.0 for a 16bit unsigned image affine transform.My destination is to &amp;nbsp;zoom,pan and rotate the raw image.Then I'll display this image under the window (I just think this means the destROI?).&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;&amp;nbsp;I always get a status code of 30.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;the passed in parameters:&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;pSrc: the raw image data. I get it as byte* .And make a convert to Ipp16u*.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;srcSize: the sizeof raw image: width 2314 and height 2949&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;srcStep: I caculate it by this:&amp;nbsp;&lt;/SPAN&gt;int srcStep = ((srcBytesPerPixel(which is 16) * srcWidth) + 31) / 32 * 4;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;srcROI:x 0 y 0 width&amp;nbsp;2314 &amp;nbsp;and&amp;nbsp;&amp;nbsp;height 2949&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;pDst:just a byte Pointer point to a byte array.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;dstStep: I caculate this by:&lt;/SPAN&gt;((destBytesPerPixel(16) * dstWidth) + 31) / 32 * 4;&lt;/P&gt;

&lt;P&gt;dstROI:this is just the size of the windows, x 0 y 0 width 666 height 604&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;coeffs00~coeffs12:&amp;nbsp;&lt;/SPAN&gt;0.204407945&amp;nbsp; 0 &amp;nbsp;342.0&amp;nbsp; &amp;nbsp;0.0&amp;nbsp;&amp;nbsp;0.204407945&amp;nbsp;&amp;nbsp;&amp;nbsp;1173.20264&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;IppStatus IPPInterpolationWrapper::IPPInterpolation::ippiWarpAffine_16u_C1R1(const Ipp16u* pSrc,
    IppiSize srcSize, 
    int srcStep, 
    IppiRect srcROI, 
    Ipp16u* pDst, 
    int dstStep, 
    IppiRect dstROI,
    double coeffs00,
    double coeffs01,
    double coeffs02,
    double coeffs10,
    double coeffs11,
    double coeffs12,
    int interpolation)
{
    IppiWarpSpec* pSpec = 0;
    Ipp8u* pInitBuf = 0;
    int specSize = 0, initSize = 0, bufSize = 0; Ipp8u* pBuffer = 0;
    const Ipp32u numChannels = 1;  //此参数修改通道数
    IppiPoint dstOffset = { 0, 0 };
    IppStatus status = ippStsNoErr;
    IppiBorderType borderType = ippBorderTransp;
    IppiWarpDirection direction = ippWarpForward;
    IppiSize dstRoiSize = { dstROI.width, dstROI.height };
    double cf[2][3];
    IppiSize srcRoiSize;
    Ipp16u* pSrcRoi = (Ipp16u*)((Ipp8u*)pSrc + srcROI.y * srcStep) + srcROI.x *
        numChannels;
    Ipp16u* pDstRoi = (Ipp16u*)((Ipp8u*)pDst + dstROI.y * dstStep) + dstROI.x *
        numChannels;
    IppiInterpolationType interp;
    int borderSize = 0;
    Ipp64f valB = 0.0, valC = 0.5; /* Catmull-Rom filter */
    if (srcROI.x &amp;lt; 0 || srcROI.y &amp;lt; 0 || srcROI.x &amp;gt;= srcSize.width || srcROI.y &amp;gt;=
        srcSize.height)
        return ippStsRectErr;
    if (dstROI.x &amp;lt; 0 || dstROI.y &amp;lt; 0)
        return ippStsRectErr;
    /* Clip the source roi */
    if (srcROI.x + srcROI.width &amp;gt; srcSize.width) srcROI.width = srcSize.width -
        srcROI.x;
    if (srcROI.y + srcROI.height &amp;gt; srcSize.height) srcROI.height = srcSize.height -
        srcROI.y;
    srcRoiSize.width = srcROI.width;
    srcRoiSize.height = srcROI.height;
    switch (interpolation)
    {
    case IPPI_INTER_NN:
        interp = ippNearest;
        break;
    case IPPI_INTER_LINEAR:
        interp = ippLinear;
        break;
    case IPPI_INTER_CUBIC:
        interp = ippCubic;
        borderSize = 1;
        break;
    default:
        return ippStsInterpolationErr;
    }
    /* compute new coefficients with taking into account ROI offsets*/
    /*cf[0][0] = coeffs00; cf[0][1] = coeffs01; cf[0][2] = coeffs02 +
        coeffs00 * srcROI.x + coeffs01 * srcROI.y - dstROI.x;
    cf[1][0] = coeffs10; cf[1][1] = coeffs11; cf[1][2] = coeffs12 +
        coeffs10 * srcROI.x + coeffs11 * srcROI.y - dstROI.y;*/
    cf[0][0] = coeffs00;
    cf[0][1] = coeffs01;
    cf[0][2] = coeffs02;
    cf[1][0] = coeffs10;
    cf[1][1] = coeffs11;
    cf[1][2] = coeffs12;
    /* define border type depending on the source ROI */
    if (srcROI.x &amp;gt;= borderSize) borderType = (IppiBorderType)(borderType |
        ippBorderInMemLeft);
    if (srcROI.y &amp;gt;= borderSize) borderType = (IppiBorderType)(borderType |
        ippBorderInMemTop);
    if (srcROI.x + srcROI.width &amp;lt;= srcSize.width - borderSize) borderType =
        (IppiBorderType)(borderType | ippBorderInMemRight);
    if (srcROI.y + srcROI.height &amp;lt;= srcSize.height - borderSize) borderType =
        (IppiBorderType)(borderType | ippBorderInMemBottom);
    /* Spec and init buffer sizes */
    status = ippiWarpAffineGetSize(srcRoiSize, dstRoiSize, ipp16u, cf, interp, direction,
        borderType, &amp;amp;specSize, &amp;amp;initSize);
    if (status &amp;lt; ippStsNoErr) return status;
    /* Memory allocation */
    pSpec = (IppiWarpSpec*)ippsMalloc_8u(specSize);
    if (pSpec == nullptr)
    {
        return ippStsNoMemErr;
    }
    /* Memory allocation */
    pInitBuf = ippsMalloc_8u(initSize);
    if (pInitBuf == nullptr)
    {
        ippsFree(pSpec);
        return ippStsNoMemErr;
    }
    /* Filter initialization */
    switch (interpolation)
    {
    case IPPI_INTER_NN:
        status = ippiWarpAffineNearestInit(srcRoiSize, dstRoiSize, ipp16u, cf, direction,
            numChannels, borderType, 0, 0, pSpec);
        break;
    case IPPI_INTER_LINEAR:
        status = ippiWarpAffineLinearInit(srcRoiSize, dstRoiSize, ipp16u, cf, direction,
            numChannels, borderType, 0, 0, pSpec);
        break;
    case IPPI_INTER_CUBIC:
        status = ippiWarpAffineCubicInit(srcRoiSize, dstRoiSize, ipp16u, cf, direction,
            numChannels, valB, valC, borderType, 0, 0, pSpec, pInitBuf);
        break;
    }
    ippsFree(pInitBuf);
    if (status &amp;lt; ippStsNoErr)
    {
        ippsFree(pSpec);
        return status;
    }
    /* work buffer size */
    status = ippiWarpGetBufferSize(pSpec, dstRoiSize, &amp;amp;bufSize);
    if (status &amp;lt; ippStsNoErr)
    {
        ippsFree(pSpec);
        return status;
    }
    pBuffer = ippsMalloc_8u(bufSize);
    if (pBuffer == nullptr)
    {
        ippsFree(pSpec);
        return ippStsNoMemErr;
    }
    /* Warp processing */
    switch (interpolation)
    {
    case IPPI_INTER_NN:
        status = ippiWarpAffineNearest_16u_C1R(pSrcRoi, srcStep, pDstRoi, dstStep,
            dstOffset, dstRoiSize, pSpec, pBuffer);
        break;
    case IPPI_INTER_LINEAR:
        status = ippiWarpAffineLinear_16u_C1R(pSrcRoi, srcStep, pDstRoi, dstStep,
            dstOffset, dstRoiSize, pSpec, pBuffer);
        break;
    case IPPI_INTER_CUBIC:
        status = ippiWarpAffineCubic_16u_C1R(pSrcRoi, srcStep, pDstRoi, dstStep,
            dstOffset, dstRoiSize, pSpec, pBuffer);
        break;
    }
    ippsFree(pSpec);
    ippsFree(pBuffer);
    return status;
}&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 22 Jun 2017 08:10:45 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133470#M25846</guid>
      <dc:creator>zhan_z_</dc:creator>
      <dc:date>2017-06-22T08:10:45Z</dc:date>
    </item>
    <item>
      <title>Hi Zhan,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133471#M25847</link>
      <description>&lt;P&gt;Hi Zhan,&lt;/P&gt;

&lt;P&gt;The status 30 "ippStsWrongIntersectQuad" means that the transformed source image has no intersection with the given destination image ROI, so the output image is not changed. It is just a warning status, not error.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
	Valentin&lt;/P&gt;</description>
      <pubDate>Fri, 23 Jun 2017 14:05:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133471#M25847</guid>
      <dc:creator>Valentin_K_Intel</dc:creator>
      <dc:date>2017-06-23T14:05:26Z</dc:date>
    </item>
    <item>
      <title>Quote:Valentin K. (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133472#M25848</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Valentin K. (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Hi Zhan,&lt;/P&gt;

&lt;P&gt;The status 30 "ippStsWrongIntersectQuad" means that the transformed source image has no intersection with the given destination image ROI, so the output image is not changed. It is just a warning status, not error.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
	Valentin&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you for relply. But I haven't solved my problem.My destination is using ippiWarpAffineLinear_16u_C1R to complete a affine transformation.&lt;/P&gt;

&lt;P&gt;The raw image is 512*512 16unsigned bits/pixel grayscale image.I want to transform it to the central of a show window with a &amp;nbsp;size 1340*670.But I'm failed after one thousand trials and errors. I'm looking forward for your help. the annex I is desirable answer. The annex II is intel ipp answer. There three details:&lt;/P&gt;

&lt;P&gt;1 there are two identical images in the show windows.&lt;BR /&gt;
	2 there are something like fogs above the image which should be identical to the left thumbnails.&lt;BR /&gt;
	3 the first show position should be on the central of the show windows.&lt;/P&gt;

&lt;P&gt;Best regard.&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 07:35:00 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133472#M25848</guid>
      <dc:creator>zhan_z_</dc:creator>
      <dc:date>2017-06-26T07:35:00Z</dc:date>
    </item>
    <item>
      <title>Ok, let's try to figure out</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133473#M25849</link>
      <description>&lt;P&gt;Ok, let's try to figure out all issues in order.&lt;/P&gt;

&lt;P&gt;In the first case the resize operation with shift is performed. So we have the transformation coefficients ((&lt;SPAN style="font-size: 12px;"&gt;0.204407945, 0.0, 342.0&lt;/SPAN&gt;&lt;SPAN style="font-size: 13.008px;"&gt;), (&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt;0.0, 0.204407945, 1173.20264&lt;/SPAN&gt;)) that means that the source image is scaled and after shifted with the translate vector (&lt;SPAN style="font-size: 12px;"&gt;342.0,&amp;nbsp;1173.20264&lt;/SPAN&gt;). The scale operation is performed relative to (0,0) point, so the left corner of the scaled image is in (0,0) point. After scaling the shift operation is executed, so the left corner of the image is shifted to (&lt;SPAN style="font-size: 12px;"&gt;342.0,&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN style="font-size: 12px;"&gt;1173.20264&lt;/SPAN&gt;) that is outside of the image borders (&lt;SPAN style="font-size: 12px;"&gt;x: 0; y: 0; width: 666; height :604&lt;/SPAN&gt;), hence the status "&lt;SPAN style="font-size: 12px;"&gt;ippStsWrongIntersectQuad&lt;/SPAN&gt;" is returned.&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;zhan z. wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&lt;SPAN style="font-size: 13.008px;"&gt;The raw image is 512*512 16unsigned bits/pixel grayscale image.I want to transform it to the central of a show window with a &amp;nbsp;size 1340*670.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="font-size: 13.008px;"&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Could you please provide the code example with transformation coefficients to investigate the issue? At the first glance it can be the problem with image steps.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
	Valentin&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 26 Jun 2017 13:44:57 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133473#M25849</guid>
      <dc:creator>Valentin_K_Intel</dc:creator>
      <dc:date>2017-06-26T13:44:57Z</dc:date>
    </item>
    <item>
      <title>Quote:Valentin K. (Intel)</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133474#M25850</link>
      <description>&lt;P&gt;&lt;/P&gt;&lt;BLOCKQUOTE&gt;Valentin K. (Intel) wrote:&lt;BR /&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;Ok, let's try to figure out all issues in order.&lt;/P&gt;

&lt;P&gt;In the first case the resize operation with shift is performed. So we have the transformation coefficients ((0.204407945, 0.0, 342.0), (0.0, 0.204407945, 1173.20264)) that means that the source image is scaled and after shifted with the translate vector (342.0,&amp;nbsp;1173.20264). The scale operation is performed relative to (0,0) point, so the left corner of the scaled image is in (0,0) point. After scaling the shift operation is executed, so the left corner of the image is shifted to (342.0,&amp;nbsp;1173.20264) that is outside of the image borders (x: 0; y: 0; width: 666; height :604), hence the status "ippStsWrongIntersectQuad" is returned.&lt;/P&gt;

&lt;P&gt;&lt;STRONG class="quote-header"&gt;Quote:&lt;/STRONG&gt;&lt;/P&gt;

&lt;BLOCKQUOTE class="quote-msg quote-nest-1 odd"&gt;
	&lt;DIV class="quote-author"&gt;&lt;EM class="placeholder"&gt;zhan z.&lt;/EM&gt; wrote:&lt;/DIV&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;

	&lt;P&gt;The raw image is 512*512 16unsigned bits/pixel grayscale image.I want to transform it to the central of a show window with a &amp;nbsp;size 1340*670.&lt;/P&gt;

	&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;/BLOCKQUOTE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Could you please provide the code example with transformation coefficients to investigate the issue? At the first glance it can be the problem with image steps.&lt;/P&gt;

&lt;P&gt;Best regards,&lt;BR /&gt;
	Valentin&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Thank you very much, what a nice man. I just follow your caculation process. &amp;nbsp;I inspect the&amp;nbsp;&lt;SPAN style="font-size: 13.008px;"&gt;&amp;nbsp;transformation coefficients carefully. Now my destImage is&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;on the right place. There are still three questions.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;1. the Image seems not scale as my expect.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;2. There're always two identical images on the show window.&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;3. the dest image has a layer of foggy.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;(if that is convenient, please check attached files. The attached I is the desirable Image which we get from our alternative software. In the alternative software the affine parameters are the same as Intel ipp process. The attached II is Intel Ipp processed destImage.)&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 13.008px;"&gt;The code example for&amp;nbsp;transformation coefficients:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:csharp;"&gt;  Matrix ceoffes = new Matrix();
            //1 transfer the image center to show wnd center, host means  the window host.
            ceoffes.Translate(-Convert.ToSingle(this.host.HostSize.Width) / 2, -Convert.ToSingle(this.host.HostSize.Height) / 2);
            //2 do scale, ratate and translate
            double ratox = this.host.HostSize.Width / (double)this.host.DicomImage.DicomImage.Width;
            double ratoy = this.host.HostSize.Height / (double)this.host.DicomImage.DicomImage.Height;
            if (ratox &amp;gt; ratoy)
            {
                ratox = ratoy;
            }
            ceoffes.Scale(ratox, ratox);
            ceoffes.Rotate(0);
            ceoffes.Translate(offsetX, offsetY);
            //3 move the image back to it's center, dicomImage means the raw Image.
            ceoffes.Translate(this.host.DicomImage.DicomImage.Width / 2, this.host.DicomImage.DicomImage.Height / 2);&lt;/PRE&gt;

&lt;P&gt;&amp;nbsp;&lt;/P&gt;

&lt;P&gt;Then I use the "&lt;SPAN style="font-size: 12px;"&gt;ippiWarpAffineLinear_16u_C1R" to do affine transform:&lt;/SPAN&gt;&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;the passed in parameters:&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;pSrc: the raw image data. I get it as byte* .And make a convert to Ipp16u*.&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;srcSize: the sizeof raw image: width 2012 and height 2012&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;srcStep: I caculate it by this:&amp;nbsp;int srcStep = ((srcBytesPerPixel(which is 16) * srcWidth) + 31) / 32 * 4;&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;srcROI:x 0 y 0 width&amp;nbsp;2012 and&amp;nbsp;&amp;nbsp;height 2012&amp;nbsp;&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;pDst:just a byte Pointer point to a byte array. (I allocate this as&lt;/P&gt;

&lt;PRE class="brush:csharp;"&gt;byte[] pDst = new byte(destwidth * destHeight * 2);&lt;/PRE&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;&amp;nbsp;)&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;dstStep: I caculate this by:((destBytesPerPixel(16) * dstWidth) + 31) / 32 * 4;&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;dstROI:this is just the size of the windows, x 0 y 0 width 1345 height 610&lt;/P&gt;

&lt;P style="word-wrap: break-word; font-size: 12px;"&gt;coeffs00~coeffs12:&amp;nbsp;0.3031809 &amp;nbsp;0 &amp;nbsp; 367.5 &amp;nbsp;0.0 &amp;nbsp;&amp;nbsp;&lt;SPAN style="font-size: 12px;"&gt;0.3031809&amp;nbsp;&lt;/SPAN&gt;&amp;nbsp;0 &amp;nbsp;(the dest Image is on the right place.)&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;IppStatus IPPInterpolationWrapper::IPPInterpolation::ippiWarpAffine_16u_C1R1(const Ipp16u* pSrc,
	IppiSize srcSize, 
	int srcStep, 
	IppiRect srcROI, 
	Ipp16u* pDst, 
	int dstStep, 
	IppiRect dstROI,
	double coeffs00,
	double coeffs01,
	double coeffs02,
	double coeffs10,
	double coeffs11,
	double coeffs12,
	int interpolation)
{
	IppiWarpSpec* pSpec = 0;
	Ipp8u* pInitBuf = 0;
	int specSize = 0, initSize = 0, bufSize = 0; Ipp8u* pBuffer = 0;
	const Ipp32u numChannels = 1;  //此参数修改通道数
	IppiPoint dstOffset = { 0, 0 };
	IppStatus status = ippStsNoErr;
	IppiBorderType borderType = ippBorderTransp;
	IppiWarpDirection direction = ippWarpForward;
	IppiSize dstRoiSize = { dstROI.width, dstROI.height };
	double cf[2][3];
	IppiSize srcRoiSize;
	Ipp16u* pSrcRoi = (Ipp16u*)((Ipp8u*)pSrc + srcROI.y * srcStep) + srcROI.x *
		numChannels;
	Ipp16u* pDstRoi = (Ipp16u*)((Ipp8u*)pDst + dstROI.y * dstStep) + dstROI.x *
		numChannels;
	IppiInterpolationType interp;
	int borderSize = 0;
	Ipp64f valB = 0.0, valC = 0.5; /* Catmull-Rom filter */
	if (srcROI.x &amp;lt; 0 || srcROI.y &amp;lt; 0 || srcROI.x &amp;gt;= srcSize.width || srcROI.y &amp;gt;=
		srcSize.height)
		return ippStsRectErr;
	if (dstROI.x &amp;lt; 0 || dstROI.y &amp;lt; 0)
		return ippStsRectErr;
	/* Clip the source roi */
	if (srcROI.x + srcROI.width &amp;gt; srcSize.width) srcROI.width = srcSize.width -
		srcROI.x;
	if (srcROI.y + srcROI.height &amp;gt; srcSize.height) srcROI.height = srcSize.height -
		srcROI.y;
	srcRoiSize.width = srcROI.width;
	srcRoiSize.height = srcROI.height;
	switch (interpolation)
	{
	case IPPI_INTER_NN:
		interp = ippNearest;
		break;
	case IPPI_INTER_LINEAR:
		interp = ippLinear;
		break;
	case IPPI_INTER_CUBIC:
		interp = ippCubic;
		borderSize = 1;
		break;
	default:
		return ippStsInterpolationErr;
	}
	/* compute new coefficients with taking into account ROI offsets*/
	cf[0][0] = coeffs00; cf[0][1] = coeffs01; cf[0][2] = coeffs02 +
		coeffs00 * srcROI.x + coeffs01 * srcROI.y - dstROI.x;
	cf[1][0] = coeffs10; cf[1][1] = coeffs11; cf[1][2] = coeffs12 +
		coeffs10 * srcROI.x + coeffs11 * srcROI.y - dstROI.y;
	/*cf[0][0] = coeffs00;
	cf[0][1] = coeffs01;
	cf[0][2] = coeffs02;
	cf[1][0] = coeffs10;
	cf[1][1] = coeffs11;
	cf[1][2] = coeffs12;*/
	/* define border type depending on the source ROI */
	if (srcROI.x &amp;gt;= borderSize) borderType = (IppiBorderType)(borderType |
		ippBorderInMemLeft);
	if (srcROI.y &amp;gt;= borderSize) borderType = (IppiBorderType)(borderType |
		ippBorderInMemTop);
	if (srcROI.x + srcROI.width &amp;lt;= srcSize.width - borderSize) borderType =
		(IppiBorderType)(borderType | ippBorderInMemRight);
	if (srcROI.y + srcROI.height &amp;lt;= srcSize.height - borderSize) borderType =
		(IppiBorderType)(borderType | ippBorderInMemBottom);

	/* Spec and init buffer sizes */
	status = ippiWarpAffineGetSize(srcRoiSize, dstRoiSize, ipp16u, cf, interp, direction,
		borderType, &amp;amp;specSize, &amp;amp;initSize);
	if (status &amp;lt; ippStsNoErr) return status;
	/* Memory allocation */
	pSpec = (IppiWarpSpec*)ippsMalloc_8u(specSize);
	//pSpec = (IppiWarpSpec*)ippsMalloc_16u(specSize);
	if (pSpec == nullptr)
	{
		return ippStsNoMemErr;
	}
	/* Memory allocation */
	pInitBuf = ippsMalloc_8u(initSize);
	if (pInitBuf == nullptr)
	{
		ippsFree(pSpec);
		return ippStsNoMemErr;
	}
	/* Filter initialization */
	switch (interpolation)
	{
	case IPPI_INTER_NN:
		status = ippiWarpAffineNearestInit(srcRoiSize, dstRoiSize, ipp16u, cf, direction,
			numChannels, borderType, 0, 0, pSpec);
		break;
	case IPPI_INTER_LINEAR:
		status = ippiWarpAffineLinearInit(srcRoiSize, dstRoiSize, ipp16u, cf, direction,
			numChannels, borderType, 0, 0, pSpec);
		break;
	case IPPI_INTER_CUBIC:
		status = ippiWarpAffineCubicInit(srcRoiSize, dstRoiSize, ipp16u, cf, direction,
			numChannels, valB, valC, borderType, 0, 0, pSpec, pInitBuf);
		break;
	}
	ippsFree(pInitBuf);
	if (status &amp;lt; ippStsNoErr)
	{
		ippsFree(pSpec);
		return status;
	}
	/* work buffer size */
	status = ippiWarpGetBufferSize(pSpec, dstRoiSize, &amp;amp;bufSize);
	if (status &amp;lt; ippStsNoErr)
	{
		ippsFree(pSpec);
		return status;
	}
	pBuffer = ippsMalloc_8u(bufSize);
	if (pBuffer == nullptr)
	{
		ippsFree(pSpec);
		return ippStsNoMemErr;
	}
	/* Warp processing */
	switch (interpolation)
	{
	case IPPI_INTER_NN:
		status = ippiWarpAffineNearest_16u_C1R(pSrcRoi, srcStep, pDstRoi, dstStep,
			dstOffset, dstRoiSize, pSpec, pBuffer);
		break;
	case IPPI_INTER_LINEAR:
		status = ippiWarpAffineLinear_16u_C1R(pSrcRoi, srcStep, pDstRoi, dstStep,
			dstOffset, dstRoiSize, pSpec, pBuffer);
		break;
	case IPPI_INTER_CUBIC:
		status = ippiWarpAffineCubic_16u_C1R(pSrcRoi, srcStep, pDstRoi, dstStep,
			dstOffset, dstRoiSize, pSpec, pBuffer);
		break;
	}
	ippsFree(pSpec);
	ippsFree(pBuffer);
	return status;
}&lt;/PRE&gt;

&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 27 Jun 2017 03:32:51 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133474#M25850</guid>
      <dc:creator>zhan_z_</dc:creator>
      <dc:date>2017-06-27T03:32:51Z</dc:date>
    </item>
    <item>
      <title>Hi Zhan,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133475#M25851</link>
      <description>&lt;P&gt;Hi Zhan,&lt;/P&gt;

&lt;P&gt;I could not reproduce the issue. I used the coefficients and image parameters values you gave:&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;static IppiRect srcROI  = { 0, 0, 2012, 2012};
static IppiRect dstROI  = { 0, 0, 1345, 610};
static IppiSize srcSize = { 2012, 2012 };
static int srcStep = 4024;
static int dstStep = 2692;
static double coeffs00 =  0.3031809;
static double coeffs01 =  0.00;
static double coeffs02 =  367.5;
static double coeffs10 =  0.00;
static double coeffs11 =  0.3031809;
static double coeffs12 =  0.00;

IppStatus Process_16u_C1R(const Ipp16u* pSrc, Ipp16u* pDst)
{
       return ippiWarpAffine_16u_C1R1(pSrc, srcSize, srcStep, srcROI, pDst, dstStep, dstROI,
                            coeffs00, coeffs01, coeffs02,
                            coeffs10, coeffs11, coeffs12, IPPI_INTER_LINEAR);
}

IppStatus ippiWarpAffine_16u_C1R1(const Ipp16u* pSrc,
    IppiSize srcSize, 
    int srcStep, 
    IppiRect srcROI, 
    Ipp16u* pDst, 
    int dstStep, 
    IppiRect dstROI,
    double coeffs00,
    double coeffs01,
    double coeffs02,
    double coeffs10,
    double coeffs11,
    double coeffs12,
    int interpolation)
{
    IppiWarpSpec* pSpec = 0;
    Ipp8u* pInitBuf = 0;
    int specSize = 0, initSize = 0, bufSize = 0; Ipp8u* pBuffer = 0;
    const Ipp32u numChannels = 1;  //此参数修改通道数
    IppiPoint dstOffset = { 0, 0 };
    IppStatus status = ippStsNoErr;
    IppiBorderType borderType = ippBorderTransp;
    IppiWarpDirection direction = ippWarpForward;
    IppiSize dstRoiSize = { dstROI.width, dstROI.height };
    double cf[2][3];
    IppiSize srcRoiSize;
    Ipp16u* pSrcRoi = (Ipp16u*)((Ipp8u*)pSrc + srcROI.y * srcStep) + srcROI.x *
        numChannels;
    Ipp16u* pDstRoi = (Ipp16u*)((Ipp8u*)pDst + dstROI.y * dstStep) + dstROI.x *
        numChannels;
    IppiInterpolationType interp;
    int borderSize = 0;
    Ipp64f valB = 0.0, valC = 0.5; /* Catmull-Rom filter */
    if (srcROI.x &amp;lt; 0 || srcROI.y &amp;lt; 0 || srcROI.x &amp;gt;= srcSize.width || srcROI.y &amp;gt;=
        srcSize.height)
        return ippStsRectErr;
    if (dstROI.x &amp;lt; 0 || dstROI.y &amp;lt; 0)
        return ippStsRectErr;
    /* Clip the source roi */
    if (srcROI.x + srcROI.width &amp;gt; srcSize.width) srcROI.width = srcSize.width -
        srcROI.x;
    if (srcROI.y + srcROI.height &amp;gt; srcSize.height) srcROI.height = srcSize.height -
        srcROI.y;
    srcRoiSize.width = srcROI.width;
    srcRoiSize.height = srcROI.height;
    switch (interpolation)
    {
    case IPPI_INTER_NN:
        interp = ippNearest;
        break;
    case IPPI_INTER_LINEAR:
        interp = ippLinear;
        break;
    case IPPI_INTER_CUBIC:
        interp = ippCubic;
        borderSize = 1;
        break;
    default:
        return ippStsInterpolationErr;
    }
    /* compute new coefficients with taking into account ROI offsets*/
    /*cf[0][0] = coeffs00; cf[0][1] = coeffs01; cf[0][2] = coeffs02 +
        coeffs00 * srcROI.x + coeffs01 * srcROI.y - dstROI.x;
    cf[1][0] = coeffs10; cf[1][1] = coeffs11; cf[1][2] = coeffs12 +
        coeffs10 * srcROI.x + coeffs11 * srcROI.y - dstROI.y;*/
    cf[0][0] = coeffs00;
    cf[0][1] = coeffs01;
    cf[0][2] = coeffs02;
    cf[1][0] = coeffs10;
    cf[1][1] = coeffs11;
    cf[1][2] = coeffs12;
    /* define border type depending on the source ROI */
    if (srcROI.x &amp;gt;= borderSize) borderType = (IppiBorderType)(borderType |
        ippBorderInMemLeft);
    if (srcROI.y &amp;gt;= borderSize) borderType = (IppiBorderType)(borderType |
        ippBorderInMemTop);
    if (srcROI.x + srcROI.width &amp;lt;= srcSize.width - borderSize) borderType =
        (IppiBorderType)(borderType | ippBorderInMemRight);
    if (srcROI.y + srcROI.height &amp;lt;= srcSize.height - borderSize) borderType =
        (IppiBorderType)(borderType | ippBorderInMemBottom);
    /* Spec and init buffer sizes */
    status = ippiWarpAffineGetSize(srcRoiSize, dstRoiSize, ipp16u, cf, interp, direction,
        borderType, &amp;amp;specSize, &amp;amp;initSize);
    if (status &amp;lt; ippStsNoErr) return status;
    /* Memory allocation */
    pSpec = (IppiWarpSpec*)ippsMalloc_8u(specSize);
    if (pSpec == nullptr)
    {
        return ippStsNoMemErr;
    }
    /* Memory allocation */
    pInitBuf = ippsMalloc_8u(initSize);
    if (pInitBuf == nullptr)
    {
        ippsFree(pSpec);
        return ippStsNoMemErr;
    }
    /* Filter initialization */
    switch (interpolation)
    {
    case IPPI_INTER_NN:
        status = ippiWarpAffineNearestInit(srcRoiSize, dstRoiSize, ipp16u, cf, direction,
            numChannels, borderType, 0, 0, pSpec);
        break;
    case IPPI_INTER_LINEAR:
        status = ippiWarpAffineLinearInit(srcRoiSize, dstRoiSize, ipp16u, cf, direction,
            numChannels, borderType, 0, 0, pSpec);
        break;
    case IPPI_INTER_CUBIC:
        status = ippiWarpAffineCubicInit(srcRoiSize, dstRoiSize, ipp16u, cf, direction,
            numChannels, valB, valC, borderType, 0, 0, pSpec, pInitBuf);
        break;
    }
    ippsFree(pInitBuf);
    if (status &amp;lt; ippStsNoErr)
    {
        ippsFree(pSpec);
        return status;
    }
    /* work buffer size */
    status = ippiWarpGetBufferSize(pSpec, dstRoiSize, &amp;amp;bufSize);
    if (status &amp;lt; ippStsNoErr)
    {
        ippsFree(pSpec);
        return status;
    }
    pBuffer = ippsMalloc_8u(bufSize);
    if (pBuffer == nullptr)
    {
        ippsFree(pSpec);
        return ippStsNoMemErr;
    }
    /* Warp processing */
    switch (interpolation)
    {
    case IPPI_INTER_NN:
        status = ippiWarpAffineNearest_16u_C1R(pSrcRoi, srcStep, pDstRoi, dstStep,
            dstOffset, dstRoiSize, pSpec, pBuffer);
        break;
    case IPPI_INTER_LINEAR:
        status = ippiWarpAffineLinear_16u_C1R(pSrcRoi, srcStep, pDstRoi, dstStep,
            dstOffset, dstRoiSize, pSpec, pBuffer);
        break;
    case IPPI_INTER_CUBIC:
        status = ippiWarpAffineCubic_16u_C1R(pSrcRoi, srcStep, pDstRoi, dstStep,
            dstOffset, dstRoiSize, pSpec, pBuffer);
        break;
    }
    ippsFree(pSpec);
    ippsFree(pBuffer);
    return status;
}&lt;/PRE&gt;

&lt;P&gt;I allocated the destination image as:&amp;nbsp;&lt;/P&gt;

&lt;PRE class="brush:cpp;"&gt;byte* pDst = new byte(dstROI.width * dstStep);&lt;/PRE&gt;

&lt;P&gt;The destination image that I obtained is correct.&lt;/P&gt;

&lt;P&gt;&lt;SPAN style="font-size: 1em;"&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;
	&lt;SPAN style="font-size: 1em;"&gt;Valentin&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 07:49:27 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133475#M25851</guid>
      <dc:creator>Valentin_K_Intel</dc:creator>
      <dc:date>2017-07-05T07:49:27Z</dc:date>
    </item>
    <item>
      <title>Zhan,</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133476#M25852</link>
      <description>&lt;P&gt;Zhan,&lt;/P&gt;

&lt;P&gt;Could you please provide parameters of the machine that you are used to run IPP warp functions and the version of IPP library (IPP 9.0, IPP 9.0 U1, &lt;SPAN style="font-size: 13.008px;"&gt;IPP 9.0 U2&lt;/SPAN&gt;)?&lt;/P&gt;

&lt;P&gt;It would be great, if you create a simple sample code to reproduce the problem.&lt;/P&gt;

&lt;P&gt;Thanks,&lt;BR /&gt;
	Valentin&lt;/P&gt;</description>
      <pubDate>Wed, 05 Jul 2017 09:53:01 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/ippiWarpAffine-status-30/m-p/1133476#M25852</guid>
      <dc:creator>Valentin_K_Intel</dc:creator>
      <dc:date>2017-07-05T09:53:01Z</dc:date>
    </item>
  </channel>
</rss>

