Quantcast
Channel: Intel® Software - Intel® Integrated Performance Primitives
Viewing all articles
Browse latest Browse all 1489

Tiled rotate with smoothing has bad edges

$
0
0

Hi,

ippiRotate gives me different results with single image rotation and tiled one. Tiled result has some artifacts on the edges.

Here is my code:

// Rotate on single image
{
  IppiRect dstBounds = {0, 0, pResult->GetWidth(), pResult->GetHeight()};
  IppStatus res = ippiRotate_8u_C3R(pSrcPixels, srcSize, stripe.GetStride(), srcBounds, pDstPixels, pResult->GetStride(), dstBounds, _angle, _xShift, _yShift, IPPI_INTER_CUBIC | IPPI_SMOOTH_EDGE);

  if (res < ippStsNoErr)
    EX_THROW(IppException(EX_PARAMS, res));
}

// Rotate on tiled image
{

  uint32_t tileSize = 15;

  uint32_t tileCountX = 15;

  uint32_t tileCountY = 15;

  for (uint32_t i = 0; i < tileCountY; i++)
  {
    for (uint32_t j = 0; j < tileCountX; j++)
      {
        IppiRect dstBounds = {i * tileSize, j * tileSize, tileSize, tileSize};

        IppStatus res = ippiRotate_8u_C3R(pSrcPixels, srcSize, stripe.GetStride(), srcBounds, pDstPixels, pResult->GetStride(), dstBounds, _angle, _xShift, _yShift, IPPI_INTER_CUBIC | IPPI_SMOOTH_EDGE);

        if (res < ippStsNoErr)
            EX_THROW(IppException(EX_PARAMS, res));
      }
  }
}

Without IPPI_SMOOTH_EDGE both results are equal.

Please correct me if I’m doing something wrong.

Best regards,
Evgeniy Kosmin

AttachmentSize
Downloadsingle.png113.94 KB
Downloadtiled.png82.35 KB

Viewing all articles
Browse latest Browse all 1489

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>