Revision history [back]

Gpu API call <misaligned adress="">

Hi erverybody, I have a little question, which I hope you can help me with:

I just started working with Cuda over OpenCV. As a part of my algorithm I need to calculate the Histogram of a certain region around each pixel.

So, I upload my image (1600*1600) to the gpu memory via

gpu_MainImage = new GpuMat();


Then, for every Pixel, that is far away from the border to have enough space around him, I call:

inline vector<float>* m_Histogram(const GpuMat *tmpGpuMat, const Range *myRowRange, const Range *myColRange)
{
GpuMat GpuDest;
GpuMat pgu_partImage(*tmpGpuMat, *myRowRange,*myColRange);

cv::cuda::calcHist(pgu_partImage,GpuDest);

Mat* tmpMat = new Mat();