title: Construct cv::Mat via C++ 1D array
body: <p>I took over a program, which use 1d array to construct cv::Mat. I'm confuse about it, and I make a demo:</p>
  <pre class="lang-cpp prettyprint-override"><code>int main()
  {
      short data[] = {
          11, 12, 13, 14,
          21, 22, 23, 24,
          31, 32, 33, 34,
          43, 42, 43, 44
      };
  
      cv::Mat m{ 4, 4, CV_8U, data};
  
      cv::imwrite(&quot;test.png&quot;, m);
  
      return 0;
  }
  </code></pre>
  <p>I expect the output is</p>
  <pre class="lang-cpp prettyprint-override"><code>11 12 13 14
  21 22 23 24
  31 32 33 34
  43 42 43 44
  </code></pre>
  <p>But I open the img in MATLAB:</p>
  <pre class="lang-cpp prettyprint-override"><code>11  0   12  0
  13  0   14  0
  21  0   22  0
  23  0   24  0
  </code></pre>