image processing - Advise filters to improve text visibility on photo -


i need filters improve text visibility on photo, since has noise. filters (algorithms) know purpose?

now, use monochrome filter doesn't improve image quality. need filter can determine medium background of little area , make image monochrome depending on medium background.

for example picture background white , grey characters areas has darker color (grey) , black characters. need algorithm can understand area of image more darker , make level of black accepting lower.


for example, source image: photo
and processed photo (median, monochrome filters) processed photo

unfortunately i'm not able provide accurate , fast answer using image processing package in code, can provide hints based on quick tests done in photoshop(sorry, visual thinker, slow typist). worst case scenario, can run photoshop filters matlab, filters used should available or not difficult implement since i've constraint myself to:

  • curves
  • levels
  • high pass

in simple terms, recommend first getting read of gradient dark bright gradient: easier play contrast/threshold on more image. in photoshop applied curves (which other people wondered implementing in code)

curves curves settings

not perfect, illustrates idea of cancelling out bit of strong gradient.

on resulting image applied levels:

levels levels settings

afterwards, high pass:

high pass

you can use high pass result , blend (overlay) previous step emphasize details:

high pass + overlay

then apply stamp filter (a mixture of small gaussian blur + threshold):

stamp filter

or simpler, on high pass result, apply curves again or threshold:

curves curves settings

the idea threshold should deal segmentation @ last stage , need make it's job easy possible cancelling out elements not pertaining text (like flash light gradient). if need cleanup small dots later, morphological filter (like erode, dilate) should help. can find info on detecting gradients well.


Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -