First time here? Check out the FAQ!
answered 2013-10-07 11:58:21 -0600
cv::Rect has next constructor:
cv::Rect
Rect(int x, int y, int width, int height);
Correct code (swap last two parameters):
GpuMat roi(gm, Rect(0, 0, gm.cols-1, gm.rows-1);