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
at does a range check at every call, thus making it slower than ptr, but safer.
at
ptr
So, if you're confident that your range calculations are correct and you want the best possible speed, use ptr.