Hello,
I am trying to apply an image warping operator to an image using the nppiWarpAffine_32f_C1R function. I am looking for a function to have the same behavior as this fproj function: http://megawave.cmla.ens-cachan.fr/stuff/guid3/node130.html.
My code looks like:
width_t = 799;
width_r = 799;
height_t = 599;
height_r = 423;
NppiSize srcSize = {width_r, height_r};
NppiRect srcROI;
srcROI.x = 0;
srcROI.y = 0;
srcROI.height = height_r;
srcROI.width = width_r;
NppiRect dstROI;
dstROI.x = 0;
dstROI.y = 0;
dstROI.height = height_t;
dstROI.width = width_t;
double coeffs[2][3];
coeffs[0][0] = (double)width_r/(double)width_t;
coeffs[0][1] = 0;
coeffs[0][2] = 0;
coeffs[1][0] = 0;
coeffs[1][1] = (double)height_r/(double)height_t;
coeffs[1][2] = 0;
NppStatus stat = nppiWarpAffine_32f_C1R(dev_image_t, srcSize , width_r * 4, srcROI, dev_image_after_proj, width_t * 4, dstROI, coeffs, NPPI_INTER_CUBIC);
However, the only behavior that I see is that the output image is the same as the input image after the kernel call.
I use CUDA 5, because for CUDA 4.2 the function outputted an error status.
Do you have any suggestions? Maybe I can use a different function?
Thank you,
Valeriu