title: Text blur after thresholding using opencv
body: <p>I am doing some transformations to capture text from image using <code>tesseract</code> OCR, but, doing so, my text after applying some threshold effect is blurry, so I need some assistance here, a little help.</p>
  <p>This is my code:</p>
  <pre><code>import cv2
  import pytesseract as pyt
  import numpy as np
  
  pyt.pytesseract.tesseract_cmd = r&quot;C:\Program Files\Tesseract-OCR\tesseract.exe&quot;
  
  image = cv2.imread('vacunacion.jpg')
  gris = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
  thresh = cv2.threshold(gris, 90, 255, cv2.THRESH_BINARY_INV)[1]
  imagen_detalle = pyt.image_to_string(thresh, lang='eng',config='--psm 6')
  print(imagen_detalle)
  cv2.imshow('thresh', thresh)
  cv2.imwrite('thresh.jpg', thresh)
  cv2.waitKey()
  </code></pre>
  <p>My outpout:</p>
  <pre><code>2
  &gt; PLAN NACIONAL DE VACUNACION
  CONTRA COVID-19 Hooia&gt;—
  | DOSIS APLICADAS: 191.480
  CORTE 4:00 P.M. MARZO - 03 - 2021
  SE AMDRES ay
  “a 7 women {A GUNIRA (1345)
  twas jf Ae d &amp;
  paunaanma Goer anda 760 — 2) ©? maaan
  CARTABENA (3.457) BOLI (2500) — OESAN 018)
  SURES) a ‘3 NORTE DE SANTANDER (25131
  CORDOBA (2968) wo 6 SAATANDER (5.936)
  ANTIONUIA (24.8563 TS - BOVAGA (5883),
  CUNDALAMARCA (12.0251 TY ‘ ARAUCA C8)
  SALDAS (23151 EN, f PS yionann 2
  RAMLDA C320 wey Pee casa 1227
  oan oe ts
  Touma 5.080) BK eae 8 WETA (2444)
  ALLE DEL cqUGA (20,160) ~=% se GUAINLA 592)
  “m8 Se aN +S UAE (3023
  ‘ante ca o eco yqurtsig2an
  puna 2635) ae SO BARUETAISES!
  a
  rum fe ‘AMAZDAAS (10548)
  Oa
  Fuente: Ministerio de Salud y Protecciin Saciat - Datos procesados 03 de marzo - 2021
  </code></pre>
  <p>and this is the final image<a href="https://i.stack.imgur.com/VnvmU.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/VnvmU.jpg" alt="enter image description here" /></a></p>
  <p>The number of applied dosis don't appreciate well in the image, because is so blurry, any technique can be applied here?</p>
  <p>This is the original Image.
  <a href="https://i.stack.imgur.com/u1niV.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/u1niV.jpg" alt="enter image description here" /></a></p>