none
Gaussian Blur faster on OpenCV than on NVidia CUDA RRS feed

  • Question

  • Hi!

    It's my first time posting here!

    I was trying to do a comparison between applying Gaussian blur in OpenCV and with the NVidia Toolkit and compare their speeds. I was expecting the CUDA version to be much faster, but in fact it isn't.

    On 8K images, OpenCV's Gaussian Blur takes 700 miliseconds and CUDA takes 2700 miliseconds.

    Might it be that I only counted the time of the filtering only? And for CUDA it takes some time to transfer the data between CPU and GPU? I started the counter before applying the filter and ended counting the time afte the filtering was done. No other operation was included in this observation.

    The codes I got for reference in this comparison:

    https://github.com/BartoszBartniczak/Gaussian-Blur-CUDA/tree/master/GaussianBlurCuda

    https://stackoverflow.com/questions/21988259/applying-gaussian-blur-filter-to-an-image-in-opencv-c

    I limited myself to using 3x3 kernels for now.

    Monday, June 5, 2017 3:35 PM

All replies

  • Hi Dorian,

    Thanks for posting here.

    This forum is about VS IDE, as your issue is more related to CUDA Programming and Performance, we suggest you can submit this question on https://devtalk.nvidia.com/default/board/57/ forum for better support.

    Besides, I have found a similar question on that forum, you can follow it with your question.

    https://devtalk.nvidia.com/default/topic/1011766/speed-comparison-between-cuda-and-opencv/?offset=2

    Thank you for your understanding.

    Note: This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites;Therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there.There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    MSDN Community Support Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Tuesday, June 6, 2017 7:55 AM