title: How do I compute an averaged profile in OpenCV
body: <p>I call an average profile the 1D signal obtained by averaging along the rows or columns in a rectangular image.</p>
  
  <pre><code>Px := Σ(y=1,H) I(x, y) / H
  </code></pre>
  
  <p>and</p>
  
  <pre><code>Py := Σ(x=1,W) I(x, y) / W
  </code></pre>
  
  <p>I couldn't find that in the API, maybe by not using the appropriate terminology.</p>
  
  <p>I don't want a box filter, just one value per row/column. The sum instead of the average is equally good.</p>