title: OpenCV Mat array access, which way is the fastest for and why?
body: <p>I am wondering about the way of accessing data in Mat in OpenCV. As you know, we can access to get data in many ways. I want to store image (Width x Height x 1-depth) in Mat and looping access each pixel in the image. Using ptr&lt;>(irow) to get row-pixel and then access each column in the row is the best way? or using at&lt;>(irow,jcol) is the best?  or using directly calculate the index by using index = irow*Width + jrow is the best? Anyone know the reason.</p>
  
  <p>Thanks in advance</p>