Opencv gpu::split not working properly
gpu, opencv, split
Solution
Thanks for the tip scap3y. The problem was with the initializing.
When replaced the first two lines with the below code, problem got solved.
gpu::GpuMat splitted_gpu[2];
Problem
I've being trying to split 2 channel GpuMat using gpu::split. Given below is my code ``` gpu::GpuMat gpu_zeros; gpu_zeros.upload(Mat::zeros(Size(J,I), CV_32F)); gpu::GpuMat splitted_gpu[] = {gpu_zeros,gpu_zeros}; gpu::split(complex_gpu,splitted_gpu); // Here complex_gpu is a 2 channel GpuMat. // Downloading the splitted GpuMat to check the results Mat t1,t2; splitted_gpu[0].download(t1); splitted_gpu[1].download(t2); ``` But when I check t1 and t2 , they both have channel 2 of the complex_gpu GpuMat. The channel 1 data is missing. Have I done anything wrong ? Is there a way to solve this problem ? Note : I'm using them inside mexFunctions. Opencv version is 2.4