Jump to content
You must now use your email address to sign in [click for more info] ×

[APh] Scanned document pages recovering and whitening techiques


Recommended Posts

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.

post-46652-0-57831500-1483520571_thumb.jpg

post-46652-0-90432900-1483520693_thumb.jpg

post-46652-0-75019100-1483520730_thumb.jpg

post-46652-0-29904700-1483520804_thumb.jpg

Link to comment
Share on other sites

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.

 

freqsep.jpg

 

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

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

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.

 

 

 

post-14034-0-65550800-1483697426_thumb.png

- Affinity Photo 2.3.0
- Affinity Designer 2.3.0
-Affinity Publisher 2.3.0

 

MacBook Pro 16 GB
MacOS Sonoma 14.1.2

Link to comment
Share on other sites

@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 :)

Link to comment
Share on other sites

@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.

- Affinity Photo 2.3.0
- Affinity Designer 2.3.0
-Affinity Publisher 2.3.0

 

MacBook Pro 16 GB
MacOS Sonoma 14.1.2

Link to comment
Share on other sites

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.

post-45807-0-82092800-1483781323_thumb.jpg

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.