Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs have moved to the Altera Community. Existing Intel Community members can sign in with their current credentials.
6818 Discussions

Help: Image Quality Problem when resize an image with ippiResizeSqrPixel_32f_C1R function

kangscut
Beginner
532 Views

Figure1. Original image Figure2. resized with Lanczos method

I am using Ipp6.0 version, The input and output image(Dicom image) only have one channel, 16bits per pixel. After Res ize with ippiResizeSqrPixel_32f_C1R function, the interpolated image obviously has much more noise than the original image with IPPI_INTER_LANCZOS, IPPI_INTER_CUBIC, IPPI_INTER_CUBIC2P_CATMULLROM. Especially for Lanczos method.

Some parameters for my test: original image size: 512*512; ResizeFactor=2.0; pfImageIn, pfImageOut is a memory block allocated with new operator

Here is part of my code, waiting for your help:


int iColSrc = iImgCol; // original image's width
int iLinSrc = iImgLin; // original image's height
int iColDst = short((float)iColSrc * fResizeCol) ; // dest image's width
int iLinDst = short((float)iLinSrc * fResizeLin) ; // dest image's height
IppiSize size = {iColSrc, iLinSrc};
IppiRect srect = { 0, 0, iColSrc, iLinSrc };
Ipp iRect drect = { 0, 0, iColDst, iLinDst };
Ipp8u *buf;
int bufsize;

//calculation of work buffer size
ippStatus = ippiResizeGetBufSize(srect,drect,1,iInterType,&bufsize);
buf = ippsM alloc_8u(bufsize);
if(NULL==buf)
{
iErrType = MemoryErr;
return false;
}
// resize m_pfImageIn
ippStatus = ippiResizeSqrPixel_32f_C1R(pfImageIn, size, iColSrc*(int)(siz eof(Ipp32f)), srect,
pfImageOut, iColDst*(int)(sizeof(Ipp32f)), drect,
fResizeCol, fResizeLin, 0, 0, iInterType, buf);


0 Kudos
1 Reply
Vladimir_Dudnik
Employee
532 Views

Hello,

somehow I do not see your images. Also wondering if you can test this with the latest version which is IPP 6.1 update 4?

Regards,
Vladimir

0 Kudos
Reply