impact Posted January 4, 2017 Share Posted January 4, 2017 Hello, does anyone know good methods to recover pure state of scanned/photographed document pages with colors. Goals: Remove grain/noise Gray/yellow background convert to white Keep colors of stamps and details of text Optionally fix perspective My method: 1. Optional correction of perspective using Mesh Warp Tool and setting on source points to the corners of page and straightening curves. 2. Use Flood Selection Tool with ~20-25% tolerance not contigous on background and after that delete key, but the problem is i'm loosing too much details and text become too gray/invisible. 3. Use Inpainting Tool to remove separated noise/dust/scratches. 4. Use Undo Brush Tool on color stamps,text,graphics to recover it's colors saturation. 5. Use Erase Brush Tool on that color stamps recovered in 4th point to remove gray/yellow borders. Maybe there is better method to select for example all gray channel and remove it but without loosing details from text? Maybe someone knows faster and more accurate method than mine - using channels, levels, colors selection, etc. ? I remember that in Gimp there was something like Threshold - but there was problem with colors also. I provide few samples below. Quote Link to comment Share on other sites More sharing options...
kirkt Posted January 5, 2017 Share Posted January 5, 2017 Maybe try frequency separation to isolate the small details like textures on the paper, sports and blemishes, etc. You need to use pretty extreme values, with Feature Protection enabled. Then you can do your inpainting to remove creases and folds, etc. and a Levels adjustment to set the overall black and white points. Use Lab mode in the Levels dialog and adjust the black and white points of the lightness levels. You can adjust the opacity of the high-frequency layer to restore some of the texture, or turn it off completely to remove all of the texture. Have fun! kirk Quote Link to comment Share on other sites More sharing options...
kirkt Posted January 5, 2017 Share Posted January 5, 2017 If you want to convert a colored background to white - convert the document to grayscale and adjust the white point in the levels to make the light gray background white. kirk Quote Link to comment Share on other sites More sharing options...
impact Posted January 5, 2017 Author Share Posted January 5, 2017 Thanks, I was thinking about frequency. Could this help with removing whole dust/noise for example like on that bill sample? I'll try this method later. :) I was using mostly: Flood selection tool and select color range with low values to remove dust and noise areas. I don't want to loose details. impact 1 Quote Link to comment Share on other sites More sharing options...
Madame Posted January 6, 2017 Share Posted January 6, 2017 This is just a very quick go at this. First levels, then white balance, then HSL and dial down the yellow (these are all adjustments layers). Then merge visible and Frequency Separation (FS) on that layer. Worked my way around the picture with the inpainting brush on the FS layers. Cloned the edge, so the edge got even. (This was very sloppy) Then a brightness and contrast adjusment. Quote - Affinity Photo 1.8.6 - Affinity Designer 1.8.6 -Affinity Publisher 1.8.6 MacBook Pro 16 GB MacOS Big Sur v.11.1 Link to comment Share on other sites More sharing options...
impact Posted January 6, 2017 Author Share Posted January 6, 2017 @Madame thanks but i'm not sure if I understand all steps. Are You using first Frequency Separation and You are working on which layer? High Frequency or Low Frequency? Also are You dialing down yellows in HSL on Yellows channel and lowering saturation? Maybe You can share sample in APh format with history? I was trying to do FS with 43px and around 80%, almost all from high frequency was in my opinion to be removed ( whole layer ). Maybe I'm doing something wrong :) Quote Link to comment Share on other sites More sharing options...
Madame Posted January 7, 2017 Share Posted January 7, 2017 @Madame thanks but i'm not sure if I understand all steps. Are You using first Frequency Separation and You are working on which layer? High Frequency or Low Frequency? Also are You dialing down yellows in HSL on Yellows channel and lowering saturation? Maybe You can share sample in APh format with history? :) Are You using first Frequency Separation and You are working on which layer? High Frequency or Low Frequency? I'm working with both layers, on low frequency and high frequency. You will see what will do what when you work your way around. Also are You dialing down yellows in HSL on Yellows channel and lowering saturation? Yes, that's right. Maybe You can share sample in APh format with history? Sorry, I deleted the picture. I'm not sure I have the time to do it all over again. Every picture has it's own approach, there's no absolutes, but there's a lot of learning if you try. Quote - Affinity Photo 1.8.6 - Affinity Designer 1.8.6 -Affinity Publisher 1.8.6 MacBook Pro 16 GB MacOS Big Sur v.11.1 Link to comment Share on other sites More sharing options...
momokoo Posted January 7, 2017 Share Posted January 7, 2017 I've also been working on the first example. The result attached. 1. A level adjustments layer was used to turn it almost black and white, leaving just some color for the red stamp. 2. Another used to bring back some contrast (darken). 3. Now I more or less just used inpainting, blemish removal and healing brush. 4. A high frequency layer in combination with dodge brush (set to highlights) not only adds some more contrast and sharpens the document but also helps removing yellow-ish parts around text and the border which would be a pain to remove with a very small brush 5. That little border chain piece at the bottom had so much detail using the cloning brush didn't look good so I just copied the entire thing (select, copy, paste). It's also a rather sloppy job a couple black dots are left and I only just corrected the border on the right because the rest is just cloning and painting. Originally I added the high frequency trying to bring back in some texture of the paper but I didn't like that so I used it in a different way. The version attached does not show the low frequency layer. The red line at the top border is the inpainting brush's red, it's a very rare bug in APh. carl123 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.