Image processing on CUDA or OpenCV?

I need to develop an image processing program for my project, in which I have to count the number of cars on the road. I am using GPU programming. Should I switch to an OpenCV program with GPU processing function or do I need to develop my entire CUDA program without any OpenCV library?

The algorithms that I use to count the number of cars are background subtraction, segmentation, and border detection.

+6
source share
2 answers

You can use the GPU features in OpenCV.

First visit the introduction about this: http://docs.opencv.org/modules/gpu/doc/introduction.html

Secondly, I think that the above processes are already implemented in OpenCV, optimized for the GPU. So with OpenCV it will be much easier to develop.

Canny Edge Detection: http://docs.opencv.org/modules/gpu/doc/image_processing.html#gpu-canny

PerElement operations (including subtraction): http://docs.opencv.org/modules/gpu/doc/per_element_operations.html#per-element-operations

For other features, visit OpenCV docs.

+6
source

OpenCV, without a doubt, has the largest collection of image processing functions, and recently they have begun to serve porting functions in CUDA. There appeared a new GPU module in the latest OpenCV with several features ported to CUDA.

Saying that OpenCV is not the best option for creating a CUDA-based application, since there are many dedicated CUDA libraries, such as CUVI , that beat OpenCV in performance . If you are looking for an optimized solution, try also.

+2
source

Source: https://habr.com/ru/post/918886/


All Articles