When we access specific elements of a cv::Mat structure, we can use mat.at<float>(i,j) to access the element at position i, j. What is not immediately clear, however, whether i, j refers to the x, y coordinate in the matrix, or the ith row and the jth column.
When we access specific elements of a cv::Mat structure, we can use mat.at<float>(i,j) to
Share
OpenCV, like may other libraries, treat matrices (and images) in row-major order. That means every access is defined as
(row, column).Notable exceptions from this general rule are Matlab and Eigen libraries.