Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Select on colour range/blurry colours?
#1
I have an image which consists of text, which appears to be black, and a a light blue background (see attachment). I want to extract the text/remove the background and tried with 'Select colour'; however, when I zoom in, I can see that the two colours are actually several shades; so the black seems to be at least 4 grey tones, and the same for the background. Is there any easy way to select on (and delete) several colours in one go? Ot some other way to achieve the same, that I haven't thought of?

   
Reply
#2
Try this:
1) Colors > Map > Color Exchange... to replace the light blue by white
- Pick the light blue as "From Color" and set the "To Color" to white.
- Set all thresholds to 1.000
2) Colors > Desaturate > Desaturate... to throw away any colors from the black text
3) Colors > Levels... to enforce the black
4) Colors > Color to Alpha... to make the white background transparent
Reply
#3
Another way, for that type of image try
see: https://i.imgur.com/WoU0tMk.jpg (1) Apply Colors -> Threshold to reduce to black / white pixels. That leaves the text somewhat pixellated (2)
see: https://i.imgur.com/mFBIz3D.jpg (3) Scale the image up by 400% to introduce some anti-aliasing then (4) immediately back down by 25 % to get abit more antialiasing and back to original size.
Reply
#4
To remove the colors you can use : Colours / Desaturate / Mono Mixer and move the 'Blue Channel Multipier' to the right.
To tune the result you can copy the layer (one or more) and set the layer mode to 'multiply' and then 'flatten' the layers to one layer
Then you can further beautify the result the way rich mentioned.
Reply
#5
Lots of good suggestions! Thanks - I'll go and experiment.
Reply
#6
The blue background is actually fairly variable, so it is best replaced by something else to ease the processing.
  • Color-pick the light blue
  • Edit the FG color in the FG color editor, in HSL mode, reduce the L channel (luminosity)   slightly, the idea being to obtain a color that is just darker than any blue in the image, but only just so.
  • Bucket-fill the whole image with that color after setting the BF tool to Darken only mode (so in practice this will make the whole backrgound this slightly darker shade of blue paint (darked than the source image) but leave the text (black) and the text edges (dark blue) unchnaged). You can check the result with the Pointer dialog (values should be constant over the background) or with the Histogram (in RGB mode, a very sharp spike in each color)
  • Color->Color to alpha and remove the background blue (pick the background color with the color picker in the C2A dialog)
   
Reply


Forum Jump: