Can anyone tell me how to use the Resize function in cuda NPP ? I have a source image, I converted it to Y Cb Cr colour space by using the nppiRGBToYCbCr_8u_C3R NPP function which works, then I wrote a kernel to extract the three components and stored them as separate images. Till this everything works correctly. Now I want to resize the 3 channels. But the resize NPP function does not work correctly. Is this the right way to use it ?
double ratio_aim = 25;
NppiSize srcSize = {srcWidth, srcHeight};
int srcLineStep = srcWidth;
NppiRect srcROI = {srcWidth, srcHeight};
NppiSize resdstROI = {(int)srcWidth*ratio_aim, (int)srcHeight*ratio_aim};
int yLine,cbLine, crLine;
Npp8u *y_img = nppiMalloc_8u_C1(resdstROI.width, resdstROI.height, &yLine);
Npp8u *cb_img = nppiMalloc_8u_C1(resdstROI.width, resdstROI.height, &cbLine);
Npp8u *cr_img = nppiMalloc_8u_C1(resdstROI.width, resdstROI.height, &crLine);
nppiResize_8u_C1R(y_channel, srcSize, srcLineStep, srcROI, y_img, yLine, resdstROI, 0.25, 0.25, 4);
nppiResize_8u_C1R(cb_channel, srcSize, srcLineStep, srcROI, cb_img, cbLine, resdstROI, ratio_aim, ratio_aim, 4);
nppiResize_8u_C1R(cr_channel, srcSize, srcLineStep, srcROI, cr_img, crLine, resdstROI, ratio_aim, ratio_aim, 4);
Thanks,