Ask Your Question

aurelien's profile - activity

2014-06-02 03:28:54 -0500 asked a question How opencv_gpu multiplication works for big images

Hi, I would like to know if someone can explain me how OpenCV computes multiplication for very big image (1920*1080). I have to create a specific image processing but my kernel is very slow. So I have created a kernel for just a multiplication. It takes 45ms against 0ms (1ms) with OpenCV_gpu multiplication. How to optimize the number of thread and wrap for my application (for my real application I use 7 ints and 9 floats for my computation)?

2014-05-13 05:02:23 -0500 asked a question how to add .cu file to OPENCV source without obtain linked error

Hi everybody. I would like to know how to add .cu file to the OPENCV source. To test a CUDA function, I have written a simple function who adds a value to all pixels of matrix. But when I compile the project, I obtain link error. I follow the same scheme as for pyrup functions: - Templates functions in .cu file - I create the declaration of the host function in the gpu.hpp file and I create a .cpp file in which I define the host function (which called the CUDA function). If I put my function in original sources files ( , gpu.hpp, pyramids.cpp), I can build the solution and access to the function, but not if I create new files… I’ve got one error by each type of data, they all looks like to : Erreur 101 error LNK2001: symbole externe non résolu "void __cdecl cv::gpu::device::imgproc::test_gpu<float>(struct cv::gpu::DevMem2D_<unsigned char="">,struct cv::gpu::DevMem2D_<unsigned char="">,struct CUstream_st *)" ([email protected]@[email protected]@[email protected]@@[email protected]@[email protected][email protected]@@Z) F:\install_opencv_cuda_modif\modules\gpu\testCuda.obj

2014-02-17 00:59:19 -0500 answered a question why the result of filter2D function is correct on cpu and wrong on gpu??

Thanks a lot ;-)

2014-02-17 00:56:01 -0500 received badge  Scholar (source)
2014-02-13 05:09:36 -0500 asked a question why the result of filter2D function is correct on cpu and wrong on gpu??

The processing on the GPU give me wrong result and noise(not randomly). This is my code :

Mat ker(3,3,CV_8S);
// gain=0<char>(0,0)=-(1+gain),<char>(0,1)=-(1+gain),<char>(0,2)=-(1+gain);<char>(1,0)=-(1+gain),<char>(1,1)=(1+gain)*8,<char>(1,2)=-(1+gain);<char>(2,0)=-(1+gain),<char>(2,1)=-(1+gain),<char>(2,2)=-(1+gain);
Mat test(taille,taille,CV_8UC1,125);
for(int x=0;x<taille;x++)
    for(int y=0;y<taille;y++)
     //<uchar>(y,x)=((x%2)^(y%2))*255; //corect
Mat res;
Mat temp;
GpuMat resgpu(test);

vector<int> compression_params;
compression_params.push_back(CV_IMWRITE_JPEG_QUALITY );



image description:


image description