title: Vertical projection and horizontal projection
body: <p>I'm trying to implement the following algorithm for ocr in that paper.</p>
  
  <p><a href="https://arxiv.org/ftp/arxiv/papers/1707/1707.00800.pdf" rel="nofollow noreferrer">https://arxiv.org/ftp/arxiv/papers/1707/1707.00800.pdf</a></p>
  
  <p>I'm confused about that part:</p>
  
  <p><a href="https://i.stack.imgur.com/fj7G6.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/fj7G6.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/koFsY.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/koFsY.png" alt="enter image description here"></a></p>
  
  <p>I constructed the vertical profile of an image: </p>
  
  <pre><code>env = np.sum(img, axis=1)
  </code></pre>
  
  <p><a href="https://i.stack.imgur.com/XXGSp.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/XXGSp.png" alt="enter image description here"></a></p>
  
  <p>and that's What I get</p>
  
  <p><a href="https://i.stack.imgur.com/wjSg4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/wjSg4.png" alt="enter image description here"></a></p>
  
  <p>I'm looking for a clear explanation of the algorithm, maybe with a pseudo code</p>