Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
6709 Discussions

Supersampling in ippiResize gives constant offset of 0.5

thijse
Beginner
347 Views
I am using ippiResize_32f_C1R to downscale images by a factor of 32. In order to use all original pixels, I tried using pixel supersampling (mode IPPI_INTER_SUPER). However, i notice that all pixes consequently have an offset of (amost?) exactly + 0.5!
I have tried different downscaling factors and images, but this offset remains. The offset is not present when using bicubic of bilinear downsampling.
Is this a known problem in IPP 3.0?
0 Kudos
4 Replies
thijse
Beginner
347 Views
Could somebody try to reproduce this problem? In my opion it is a fairly severe bug and although I can correct for it, I do not feel happy using subtraction as a workaround. Allthough I tested it for quite a lot of diffent cases (although not for higher versions of IPP), my software would break if suddenly the offset was gone or different.
0 Kudos
Vladimir_Dudnik
Employee
347 Views

Hi, IPP v3.0 is about three years old. Could you please try your test on IPP v5.0? Note, you can download IPP v5.0 evaluation version for free.

BTW, it also would be useful if you provide some minimal info, what OS and on which CPU did you use? If you can attach simple test case it also can simplify us investigation.

Regards,
Vladimir

0 Kudos
thijse
Beginner
347 Views
Hi,
IPP is used on many places (implemented my multiple people) in our software, so upgrading would require a lot of regression testing. This will happen eventually but not quite yet, i'm afraid (not my decision). However, Icould try if IPP v5.0 does not have this problem in a seperate project.
We are developing for dual Xeon processor Dell 670 machines running Windows 2000 SP 2.
This example program examplifies my problem
--------------------------------------------------------------------------
// supersamptest.cpp : Rescales image using supersampling
//
#include "stdafx.h"
#include
#include "ippi.h"
#include "ippcv.h"
int main(int argc, char* argv[])
{
int stepBytes;
const int Ipp32fSize = sizeof( Ipp32f );

int binsize = 2;

IppiSize srcSize = {100, 100};
IppiRect srcRoi = {0, 0, srcSize.width, srcSize.height };
Ipp32f* srcImage= ( Ipp32f * )ippiMalloc_32f_C1( srcSize.width, srcSize.height, &stepBytes );

IppiSize dstSize = {srcSize.width/binsize, srcSize.height/binsize};
Ipp32f* dstImage= ( Ipp32f * )ippiMalloc_32f_C1( dstSize.width, dstSize.height, &stepBytes );
// Set values in image to 1...
ippiSet_32f_C1R( 1.0f, srcImage, srcSize.width * Ipp32fSize, srcSize );
// Resize image...
ippiResize_32f_C1R( srcImage, srcSize, srcSize.width * Ipp32fSize, srcRoi, dstImage, dstSize.width * Ipp32fSize, dstSize, (1/(float)binsize), 1/((float)binsize), IPPI_INTER_SUPER );
// ...and read value 1.5 on any point!!!
printf("mean %f ",dstImage[dstSize.width*(dstSize.height/2)+(dstSize.width/2)]);

ippiFree( srcImage );
ippiFree( dstImage );
return 0;
}

--------------------------------------------------------------------------
0 Kudos
Vladimir_Dudnik
Employee
347 Views

Hello,

we donfirm that there is issue in ippiResample function. This bug will be fixed in future version of IPP. Please submit your bug report to Intel Premier Support to be automatically notified when fix will be available.

Thanks,
Vladimir

0 Kudos
Reply