Home > Software engineering >  OpenCV How to apply filter on image with CUDA kernel?
OpenCV How to apply filter on image with CUDA kernel?

Time:11-07

I want to apply a filter to an OpenCV ROI from Lenna 512x512 using CUDA. But I think I'm having troubles copying data properly from host to device.

I realized the Mat object isn't continuous, hence, the ROI matrix dimensions are not as expected; step[0] is much larger than cols*elemSize().

When I see enter image description here

Note:

  • Most filters requires small environment around the pixel.
    In that case, we may have to copy larger ROI from host to device (and copy the exact ROI from device to host).
    In that case, testing if the pixel exceeds the image boundaries may become more complicated.
  • Related