title: Process the image for good OCR recognition
body: <p>I'm trying to proccess a picture. Initially, there is a lot of noise, but I'm trying to make some improvements. Unfortunately, this does not give much result. It may be possible to realize such a thing that somehow select the center of each black line of letters in the word and do something like their skeleton. I have no idea how to do this, so please help here.
  The code i'm using now:</p>
  
  <pre><code>word = cv2.resize(word, (word.shape[1]*2, word.shape[0]*2))
  kernel = np.array([[-1,-1,-1], [-1,9,-1], [-1,-1,-1]])
  word = cv2.filter2D(word, -1, kernel)
  word[np.where((word &gt;= [180,180,180]).all(axis=2))] = [255,255,255]
  word[np.where((word &lt;= [179,179,179]).all(axis=2))] = [0,0,0]
  cv2.imshow(str(i), word)
  </code></pre>
  
  <p>it gives this result:<a href="https://i.stack.imgur.com/R4iZM.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/R4iZM.jpg" alt="enter image description here"></a> from this: <a href="https://i.stack.imgur.com/LnjEE.jpg" rel="nofollow noreferrer" title="The text is russian because i can&#39;t find the same sample on English. I hope you understood what i want to do"><img src="https://i.stack.imgur.com/LnjEE.jpg" alt="enter image description here" title="The text is russian because i can&#39;t find the same sample on English. I hope you understood what i want to do"></a></p>