Using cv::Mat at()

How does one access (i,j) th location and k th channels of a 2D cv::Mat. Here k is not constant at runtime. I was thinking cv::Mat at<T>(i,j,k) will do it. But it does not. So how do I do this?


double x=Data.at&lt;double&gt;(i,j*Data.channels()+k);

Leave a Reply

Your email address will not be published.