View Full Version : Masking text from an image?
lansing
15th May 2020, 18:56
I have a scanned image, and after applying a descreen filter in photoshop, the screen was removed but the text on the image were also blurred. So I'm looking for a way to mask the text from the descreen filter. I couldn't find anything useful about masking text in photoshop so I think maybe vapoursynth and python can help?
Here what I have observed so far: the screen only applies to areas that were printed with color. Since most of the text were black, they didn't have any screen.
Testing image here:
https://imgur.com/bpVcWMV
ChaosKing
15th May 2020, 19:20
Use the magic wand tool to select the background. Then Right click and invert selection. You have selected all your text. Now you can copy it, create a mask etc.
But you probably want to just apply the descreen filter while the background is selected.
lansing
15th May 2020, 21:15
Use the magic wand tool to select the background. Then Right click and invert selection. You have selected all your text. Now you can copy it, create a mask etc.
But you probably want to just apply the descreen filter while the background is selected.
I tried it, I stacked the masked one on top of the descreened, it works okay, but it doesn't have option to expand the mask like in vapoursynth. The masked one couldn't cover the whole text and its surrounding.
ChaosKing
15th May 2020, 21:35
You can expand your selection, just google it. There are tons of videos showing how to properly select stuff in PS.
ChaosKing
15th May 2020, 21:52
Basically selecting stuff = masking stuff when you apply filters https://imgur.com/a/QPd1jwZ
lansing
16th May 2020, 03:19
Thanks ChaosKing, you're right the mask selection of photoshop is the most advance in the world. After more tests, I finally figured out a workflow to do this effectively.
I used the "select and mask" option to further refine the mask after using magic wand. After that I saved the selection as a mask and made a new copy of the original for the descreen layer. Applied the text mask to the new copy and deleted the text, and then run the descreen. So what we got is a descreened image with no text.
Finally I put the descreened layer on top of the original and done.
This workflow produces better result than extracting the text first and put it on top of the descreened layer.
I put up the comparison images here (http://www.framecompare.com/screenshotcomparison/77LK7NNX).
With this image the text was printed on top of a screened background.
ChaosKing
16th May 2020, 07:58
Select by color range could be a better selection in this case to avoid manually selections of fonts like A O Q P B
https://helpx.adobe.com/photoshop/using/selecting-color-range-image.html
lansing
16th May 2020, 10:20
Select by color range could be a better selection in this case to avoid manually selections of fonts like A O Q P B
https://helpx.adobe.com/photoshop/using/selecting-color-range-image.html
Wow this is a great tips, I was manually going over every character that has a hole in the middle to add them to the selection and I was like "this can't be the right way."
Do you have anymore tips to select only the text with this color range selection? Right now when I eyedropped the text color, some images on the page were also selected, right now I'm manually erasing them in the "select and mask" window, is there other way to do this?
ChaosKing
16th May 2020, 10:39
Hmm maybe look also at "Posterize". It could help with selecting text in your case. Just reduce it to like 2-4 color tones.
And remember, you can always make a selection on layer A und work with layer B!
EDIT And of course "tone correction". https://imgur.com/a/yAgglYD
EDIT I would google how to batch process in PS if you have many images.
lansing
16th May 2020, 15:04
Hmm maybe look also at "Posterize". It could help with selecting text in your case. Just reduce it to like 2-4 color tones.
And remember, you can always make a selection on layer A und work with layer B!
EDIT And of course "tone correction". https://imgur.com/a/yAgglYD
EDIT I would google how to batch process in PS if you have many images.
I tried both methods, they didn't really help much. They did reduced the selection of wrong areas but I would still have to go through the same process cleaning them, so I guess that's the limit of text masking.
UPDATE: These methods are actually good at eliminating small dot noise that may be selected.
vBulletin® v3.8.11, Copyright ©2000-2025, vBulletin Solutions Inc.