I have an image in which text is lighter and not clearly visible, i want to enhance the text and lighten then background using python pil or cv2. Help is needed. I needed to print this image and hence it has ro be clearer.
what i have done till now is below
from PIL import Image, ImageEnhance
im = Image.open('t.jpg')
im2 = im.point(lambda p:p * 0.8)
im2.save('t1.jpg')
Above has slightly darken the text but still i needed to make text clear and background whiter or lighter.
The image is a photo of a printed document with text colour in black on white paper but that is not clearly visible. Below is snap of photo
In image above behind and surrounding letters and words there is some kind of noise white and silver dots. How can i completely remove them so that text borders can be clearly visible.
I have also inverted image colours and given below sample
I have tried following
Adaptive thresolding ,(failed)
Otsu method, (failed)
Gaussian blurring, (failed)
Colour segmentation, (failed)
Connected component removal (failed)
Denoising( failed because it also removed text)
but nothing worked. Above all methods made it even worse because result of above methods gave me below image. Also text is affected when connected compoment method is used
Please help is needed.
Also tried image magick morphology editing but failed How actually noise exist is shown in below image. It is continous rectangle bar filled with dots surrounding text ![enter image description here (https://i.stack.imgur.com/ZMHim.jpg)!