1 | initial version |
You use method getMat with parameter access flag
There is an example in cam_shift.cpp
2 | No.2 Revision |
You use method getMat with parameter access flag
There is an example in cam_shift.cpp
You cannot access to gpu data. Method getMat make a copy of gpu data to cpu and when it is finished copy cpu data to gpu
example
UMat w;
...
// get access to UMat
{
Mat b= w.getMat(cv::ACCESS_READ);
b.at<Vec3b>(10,12) = Vec3b(17,15,14);
} // b object is copy to gpu and b is destroyed (cpu memory used)
3 | No.3 Revision |
You use method getMat with parameter access flag
There is an example in cam_shift.cpp
You cannot access to gpu data. Method getMat make a copy of gpu data to cpu and when it is finished copy cpu data to gpu
example
UMat w;
...
// get access to UMat
{
Mat b= w.getMat(cv::ACCESS_READ);
b.at<Vec3b>(10,12) b.at<Vec3b>(Point(10,12)) = Vec3b(17,15,14);
} // b object is copy to gpu and b is destroyed (cpu memory used)