1 | initial version |
The at-statement should work, e.g.:test.at<cv::Vec2f>[y][x][0] = 1.0
(or: test.at<cv::Vec2f>(y,x)[0] = 1.0
).
Alternatively and much more convenient: instead of
cv::Mat test = cv::Mat::zeros(Img.rows, Img.cols, CV_32FC2);
use the templated Matrix-version, i.e.
cv::Mat2f test = cv::Mat2f::zeros(Img.rows, Img.cols);
then you don't need to use .at<>
and the rest of your code should work as is.