Apparently, NPP relies on the pixel order of its input arrays (they need to be interleaved). If you are planning on using CImg with NPP, be sure to check this post out before attempting to do so. Failing to permute CImg image axes will result in wrong filtered values for color images.
Took me hours before I found and read the documentation. CImg stores pixels in a planer format (RRRR…..GGGG…..BBBB). For most tasks in CUDA, it’s much better to store the pixel values in the interleaved format (RGBRGBRGB……). In order to do that, just call the permute_axes method of the CImg object: CImg image(“image.jpg”); image.permute_axes(“cxyz”); IMPORTANT: After …