Umat equivalent of to access specific pixel

Using OCV 4.5; C++, Visual Studio 2017; MFC; Windows 10

I am trying to convert some Mat code to UMat. An example line would be, j) = temp_s;

I get the error that ‘at’ is not a member of Umat.

What would be the equivalent for a UMat. In other words, I want to access each pixel of a UMat and make changes.


there is no such thing, this is where CPU and GPU progamming differs

in general, there are no “random access” operations on the GPU
(no (i,j), no drawing)

if you cannot express your idea “as vectors”, it’s not possible on the GPU.

Thanks…I was afraid that was the case.


yes, UMats are opaque to the CPU. you’d have to “getMat” the contents of a UMat, which is returned as a Mat… and then you probably need to stick it in another UMat again

Thanks. Apparently that would defeat the purpose of me trying to use UMat in the first place…oh well.