cv::gpu::norm speed up
Hi all,
I use the function cv::gpu::norm in a program. This function gets called a lot. With CPU i get about 5 Hz, with GPU it's not usable (a couple of seconds). I suppose the problem is, that the matrices are very small (4x4 - 16x16), so that I can't really make use of the GPU's performance.
Just some background information: I use the norm function to calculate the radial basis function:
double calculateRBFresponse(boost::shared_ptr<cv::gpu::GpuMat> input, boost::shared_ptr<cv::gpu::GpuMat> neuron, double beta){
double response = cv::gpu::norm(*input, *neuron, cv::NORM_L2);
return cv::exp( -beta * cv::pow ( response, 2.0 ));
}
Is there any way to speed this up? Or is it - as i suppose - the wrong task for a GPU? Or is there maybe a way to parallelize the task, so that multiple norm calls are run in parallel?
Cheers, Andreas