Reputation: 31
I'm currently transferring a program in OpenCV 2.4.9 over to OpenCV 3.1.0, however I've been having trouble changing from Mat
s to UMat
s. I use Mat
s to store pictures that I need to access single binary pixel values from. In 2.4.9 I did it like so:
Mat test_mat;
test_mat.at<uchar>(row,column);
Unfortunately, I haven't been able to find a way to do the same sort of thing with the UMat
s OpenCV 3.1.0 provides through my research. Does anyone have any ideas? Apologies if this is a really trivial thing.
Upvotes: 3
Views: 3951
Reputation: 1124
Try the following:
UMat test_umat;
test_umat.getMat(ACCESS_READ).at<uchar>(row, column);
Different access flags are:
Upvotes: 4