Ask Your Question
0

I want to know whether opencv3 and python3 have GPU mode?

asked 2018-01-12 07:26:38 -0500

MadFrog gravatar image

I want to know whether opencv3 and python3 have GPU mode,I looked at this link and knew that there was no GPU mode when opencv2, but does opencv3 have GPU mode now?

Not deep learning, just the methods commonly used by opencv, is there a GPU mode?

edit retag flag offensive close merge delete

1 answer

Sort by ยป oldest newest most voted
1

answered 2018-01-12 07:56:07 -0500

berak gravatar image

updated 2018-01-12 07:56:52 -0500

you can use opencl (cv2.UMat), but there is no cuda support at all for python.

(if you need that, you have to use c++)

edit flag offensive delete link more

Comments

@break How do I start OpenCL when I speed up? I have installed CUDA.

MadFrog gravatar imageMadFrog ( 2018-01-12 08:11:44 -0500 )edit

@break

print(cv2.ocl.haveOpenCL())
cv2.ocl.setUseOpenCL(True)

So it starts? So it's speeding up?

MadFrog gravatar imageMadFrog ( 2018-01-12 08:14:36 -0500 )edit

@MadFrog, againg installing CUDA is useless, if you want to use opencv & python. (though there are 3rdparty libs like pycuda)

berak gravatar imageberak ( 2018-01-12 08:32:46 -0500 )edit

and you have to put your numpy arrays into cv2.UMat, to use opencl

berak gravatar imageberak ( 2018-01-12 09:33:52 -0500 )edit

@break I have already installed CUDA.And "print(cv2.ocl.haveOpenCL())" is "True".Then how to put numpy arrays into cv2.UMat?Can you give me a example?

MadFrog gravatar imageMadFrog ( 2018-01-12 22:39:22 -0500 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2018-01-12 07:26:38 -0500

Seen: 582 times

Last updated: Jan 12