title: OpenCV element-wise matrix multiplication
body: <p>OpenCV <a href="http://docs.opencv.org/modules/core/doc/basic_structures.html" rel="noreferrer">docs</a> say <code>A.mul(B)</code> is per-element multiplication. Yet the following code produces the following output, and then gives this error: </p>
  
  <pre><code>OpenCV Error: Sizes of input arguments do not match
  </code></pre>
  
  <p>.</p>
  
  <pre><code>cout &lt;&lt; laplacian_pyramids[i][numLevels - 1 - l].rows &lt;&lt; endl;
  cout &lt;&lt; gaussian_weight_pyramids[i][l].rows &lt;&lt; endl;
  cout &lt;&lt; laplacian_pyramids[i][numLevels - 1 - l].cols &lt;&lt; endl;
  cout &lt;&lt; gaussian_weight_pyramids[i][l].cols &lt;&lt; endl;
  </code></pre>
  
  <p>Gives:</p>
  
  <pre><code>339
  339
  571
  571
  </code></pre>
  
  <p>Then:</p>
  
  <pre><code>Mat prod = gaussian_weight_pyramids[i][l].mul(laplacian_pyramids[i][numLevels - 1 - l]);
  </code></pre>
  
  <p>gives the error. I tried <code>Mat::multiply</code> to a similar effect.</p>