Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to Darken Faint/Dim Gray Text

I have a scanned text document. After some pre-processing, I managed to get texts on a white background. However, some texts are in gray colour (faint/light gray) and some text in black. At least, the black text is darker than the gray text.

I tried using thresholding but the gray like didn't change much.

What is a good approach to make the gray text darker (or black) and not affecting the already black text and white surrounding.

I also attached a sample image. Basically I would like to make the string "This is a demonstration" in light gray darker or black will be ideal.

C:\fakepath\image.png

click to hide/show revision 2
None

updated 2020-11-18 08:10:29 -0600

berak gravatar image

How to Darken Faint/Dim Gray Text

I have a scanned text document. After some pre-processing, I managed to get texts on a white background. However, some texts are in gray colour (faint/light gray) and some text in black. At least, the black text is darker than the gray text.

I tried using thresholding but the gray like didn't change much.

What is a good approach to make the gray text darker (or black) and not affecting the already black text and white surrounding.

I also attached a sample image. Basically I would like to make the string "This is a demonstration" in light gray darker or black will be ideal.

C:\fakepath\image.pngC:\fakepath\image.png