Ask Your Question

Revision history [back]

How to you OpenCV draw functions on the GPU?

I want to draw a bezier curve ( which is piece-wise drawn through a set of points ) on an empty canvas using OpenCV and Python. I then want to get the resultant image in matrix form.

To do this I used a small code to calculate the the points of the bezier curve and then rendered it using cv2.polylines. This works but it is too slow. I was wondering

(1) if there was a way to draw a bezier curve faster, using openCV (2) if I could do the drawing operation using the GPU to make this faster.

Any help would be much appreciated!

click to hide/show revision 2
retagged

updated 2016-08-20 00:27:50 -0600

berak gravatar image

How to you OpenCV draw functions on the GPU?

I want to draw a bezier curve ( which is piece-wise drawn through a set of points ) on an empty canvas using OpenCV and Python. I then want to get the resultant image in matrix form.

To do this I used a small code to calculate the the points of the bezier curve and then rendered it using cv2.polylines. This works but it is too slow. I was wondering

(1) if there was a way to draw a bezier curve faster, using openCV (2) if I could do the drawing operation using the GPU to make this faster.

Any help would be much appreciated!