Ask Your Question

Revision history [back]

calcHist with GpuMat submatrix

I get an unspecified launch error in hist.cu, line 187, from the following call.

calcHist(storage.input(xr,yr), storage.hist);

Where storage.input and storage.hist are both GpuMat objects and xr,yr are Range objects.

This crash only occurs if yr.start > 0. I have tried using a Rect, or using GpuMat(storage.input,xr,yr), as well as creating another object set to equal storage.input(xr,yr). In all cases I get the unspecified launch error if the second dimension starts with a value above 0. The first axis can have any values, as can yr.end. The matrix I am testing is 2 dimensional.

I have checked that downloading storage.input(xr,yr) gives an identical result to the original Mat object with the same Ranges.

I think I should have covered everything, but it's been a while since I've used OpenCV for much and this is my first major use of the GPU code. Is this a bug? Is it me?