title: MATLAB sub2ind / ind2sub in OpenCV /C++
body: <p>Are there any functions in OpenCV which are equal to MATLAB's <code>sub2ind</code> and <code>ind2sub</code> functions? I need both functions for my C++ app.
  If OpenCV lacks of these functions, are there any C++ libs which provide equivalent functionality?</p>