Passing an array of cv::GpuMat to a cuda kernel?
I'm trying to write my own cuda kernel but I can't find a way to pass an array of cv::GpuMat
to the cuda kernel.
Here is what I have until now:
__global__ void somename(cv::cuda::PtrStepSz<float> *array_of_images) {
...
}
...
int main(...) {
cv::cuda::GpuMat *mats = new cv::cuda::GpuMat[180]();
// Initialize eachof the mats
somename<<<...>>>(mats); // Doesn't work
}
The compile error that the above snippet produces is:
filane.cu(89): error: argument of type "cv::cuda::GpuMat *" is incompatible with parameter of type "cv::cuda::PtrStepSz<float> *"
What's the correct way to pass an array of images to a cuda kernel?