Skip to main content
Stack Overflow
  1. About
  2. For Teams

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

Does PyOpenCV support GPUs?

Is it possible to write PyOpenCV code using GPUs? I want to know if I can write the following on Python:

#include <opencv2/opencv.hpp> 
#include <opencv2/gpu/gpu.hpp> 
using namespace cv; 
int main() { 
 Mat src = imread("car1080.jpg", 0); 
 if (!src.data) exit(1); 
 gpu::GpuMat d_src(src); 
 gpu::GpuMat d_dst; 
 gpu::bilateralFilter(d_src, d_dst, -1, 50, 7); 
 gpu::Canny(d_dst, d_dst, 35, 200, 3); 
 Mat dst(d_dst); 
 imwrite("out.png", dst); 
 return 0; 
} 

Answer*

Draft saved
Draft discarded
Cancel

lang-py

AltStyle によって変換されたページ (->オリジナル) /