Ask Your Question
0

GpuMat submatrix out of GpuMat object?

asked 2012-07-01 08:11:28 -0600

Anton 7 gravatar image

Since accessing pixels in GpuMat object is not possible, is it possible to create GpuMat sub matrix out of main GpuMat matrix with defined range or ROI and how? Transferring GpuMat to Mat and then again to GpuMat is not an option, since memory transfers will actually slow down my program. Thanks in advance.

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
2

answered 2012-07-02 11:57:12 -0600

Andrey Pavlenko gravatar image

updated 2012-07-02 11:57:50 -0600

You can create a sub-mat of a GpuMat with a call to

cv::gpu::GpuMat::GpuMat(const GpuMat& m, Rect roi)

but to access its pixels you'll still have to download it to a Mat.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2012-07-01 08:11:28 -0600

Seen: 1,874 times

Last updated: Jul 02 '12