1 | initial version |
To answer all your basic questions, check out the tutorials HERE.
Both .get and .put are, in c++, .at< type >(). However, this is not the most efficient way if you need to access all the elements of a Mat, but for your example, it's simple enough.
For example
Mat A = Mat(1,3,CV_32F);
A.at<float>(0,0) = -1;
A.at<float>(0,1) = 0;
A.at<float>(0,2) = 1;
The type is replaced by the appropriate c++ type that the matrix is. For example:
ect.