8

I want to know if it is possible to use opencv gpu functions like those from here? Or I have to wrap it into python class.

2

2 Answers 2

6

Right now OpenCV 2.4.7 doesn't support the GPU module on OpenCV-Python.

That means that you must write wrappers yourself.

Sign up to request clarification or add additional context in comments.

6 Comments

Ok thank's, I did it, but in fact it's useless to wrap it because it's faster on CPU (allocation on GPU take more time)
The performance of GPU processing depends on a few factors: how fast the GPU is, how big the dimensions of the image are, and finally, the arithmetic intensity of the algorithm. In some cases the CPU will really be faster! But that usually happens with small images or with algorithms with low arithmetic intensity.
Since it's been 3 years since the answer and OpenCV 3 is out, is this still the case?
@fbence Yes, unfortunately this is still the case.
@Farhan there seems to be a contradictory answer alreasy
|
1

To answer the question in the comment made by fbence in the accepted answer, this is now possible with OpenCV 3 and Python 2.7+ or Python 3+. However, the OpenCV 3 GPU module must be compiled from source.

Assuming you are working on a Linux system you can follow these guides:

3 Comments

In fact, you can see in the guide for Python 3 that the author compiles OpenCV with the flag "-D WITH_CUDA=OFF"! This means the author isn't even compiling OpenCV with CUDA support!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.