gpu::morphologyEx is slower than morphologyEx in CPU?
问题 I am writing a c++ code for comparing the performance of morphologyEx method of opencv using the CPU and GPU versions. Here is my code: #include <opencv2/opencv.hpp> #include <opencv2/gpu/gpu.hpp> #include <sys/time.h> #include <ctime> using namespace cv; using namespace std; double start_timer() { double start_time = (double) getTickCount(); return start_time; } double end_timer(double start_time,int num_tests) { double time = (1000 * ((double) getTickCount() - start_time)/ getTickFrequency(