Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion. Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules. |
15th May 2020, 18:56 | #1 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Masking text from an image?
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 |
15th May 2020, 19:20 | #2 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
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.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
15th May 2020, 21:35 | #4 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
You can expand your selection, just google it. There are tons of videos showing how to properly select stuff in PS.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
15th May 2020, 21:52 | #5 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
Basically selecting stuff = masking stuff when you apply filters https://imgur.com/a/QPd1jwZ
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
16th May 2020, 03:19 | #6 | Link |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
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. With this image the text was printed on top of a screened background. |
16th May 2020, 07:58 | #7 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
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/us...nge-image.html
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database |
16th May 2020, 10:20 | #8 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
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? |
|
16th May 2020, 10:39 | #9 | Link |
Registered User
Join Date: Dec 2005
Location: Germany
Posts: 1,795
|
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.
__________________
AVSRepoGUI // VSRepoGUI - Package Manager for AviSynth // VapourSynth VapourSynth Portable FATPACK || VapourSynth Database Last edited by ChaosKing; 16th May 2020 at 10:54. |
16th May 2020, 15:04 | #10 | Link | |
Registered User
Join Date: Sep 2006
Posts: 1,657
|
Quote:
UPDATE: These methods are actually good at eliminating small dot noise that may be selected. Last edited by lansing; 16th May 2020 at 15:30. Reason: update |
|
Tags |
descreening, text masking |
|
|