How does OpenCV ensure that Mat::data is correctly aligned?
Suppose I have a matrix whose elements are shorts, e.g. 16UC1. The actual data in a Mat is stored in a uchar array pointed to by Mat::data. Could anyone point me to the bit of code that ensures that the uchar* is actually correctly aligned for 16-bit elements? Thank you.