Scan processing and cleaning

Talk about images!
Post Reply
Merun
Posts: 2897
Joined: Sat Mar 17, 2007 9:44 am
Location: NoWheRe

Scan processing and cleaning

Post by Merun »

This tutorial is aimed at people knowing the basis of Photoshop, more specifically layer, filter, and eventually brush. I won't explain in all detail how to make this or that.

1/Scan basis

This part will explain to you the basis to know

2/ Scan stitching

This is where I will deal with scan which are split in 2 or more image

3/ Scan processing

Processing will be about removing screening and noise. This part is highly subjective considering people have different workflow that might give better or worst result.

4/ Scan cleaning

Certainly the hardest part, I will explain how to remove dust, crease, and text.


Here are the scan I made and that I will use for my example, resized to 10% of the original size. These will be mostly for those who wants to try automatic stitching.
Image Image Image

And another set for stitching, scanned by icie ( great thanks to him )

Image Image

And finally a crappy scan you so want to remove the watermark...

Image
Last edited by Merun on Fri Jun 13, 2008 5:15 pm, edited 4 times in total.
Merun @ Twitter
Merun
Posts: 2897
Joined: Sat Mar 17, 2007 9:44 am
Location: NoWheRe

1/ Scan basis

Post by Merun »

1/ Scan basis

Here I will explain the different element that you can encounter. You can pass this part since it's not really compulsory.


Let's start first with the example I gave, but this time with a zoom at 100%, and at the original resolution of 1200dpi.

Image

Ugly isn't it? This odd pattern is due to both noise and screening. You can get more information about these on WIkipedia

http://en.wikipedia.org/wiki/Image_noise

http://en.wikipedia.org/wiki/Screening_%28printing%29

I will deal with these effect in the scan processing part which is mostly applying filter, and resizing. But now the most important part for the cleaning tutorial.

Image

Here is the same image as above, just taken in the right corner, and zoomed at 1200%. As you can see, the rounded edge became almost like a line. The problem for most people when you will start stitching or cleaning, you are most likely going to zoom the image. When you zoom the image you loose the perception of roundness.

So for these part, understand that when you zoom, you shouldn't go beyond 800%. 400% is really good, and the best would be 100% but it's impossible to retouch part of a picture with precision with such zoom.


And finally, the case in which your image is a supposedly already processed scan, but still crappy like this image
Image

First, removing more artifact from a small scan will mean losing details, or a smaller resolution, so I don't recommend going through another processing.

Image

Then the watermark.. I hate watermark. You can remove it, with the paint brush ! But the problem is when you will look at a normal zoom, you will notice your correction because it won't fit in the crapiness of the scan. The best is be to keep the crappy texture, sadly.
Last edited by Merun on Tue Jun 10, 2008 11:20 am, edited 1 time in total.
Merun @ Twitter
Merun
Posts: 2897
Joined: Sat Mar 17, 2007 9:44 am
Location: NoWheRe

2/ Scan stitching

Post by Merun »

2/ Scan stitching

There is 2 different cases you will encounter when stitching. Either it's the scan overlap themselves, or not. The first case is the easiest since you can stitch automatically with Photoshop, or some other software.


First, the automatic process with Photoshop with over lapping images

Image

Get into the menu Photomerge, choose the Auto mode, select your file, and let it do the work! Then you might need to rotate a little bit, and crop and tadaaa!

Image

Easy isn't it? Well... if you can't automate this, pray a little because the manual method is a lot harder sometime.

Let's take the second set of image. The instruction should be changed according to the image you want to stitch. Here it's for 2 pages.

1/ Open the two image
2/ Copy one layer to the other document, and close the one you just copied
3/ Copy the background layer. You should have this ( no locked layer)

Image
4/ Image>Canvas Size. Set the width to at least 200%, and add a little bit of heigh, like 110%
5/ Choose one layer, which you won't move later. Move it where it should be.
6/ Take the second layer, and move it. Here you will need to be precise, so you might use the arrow key to move pixel by pixel
7/ Trim transparent pixel
Here is what I get:
Image

Not too hard with this scan, there is just some cleaning to do after.
But it happens sometime you get bad scan which make scan really hard, see impossible to stitch ( or at least I didn't manage sometime ).

Not to hard is a scan with a missing piece in the middle. Just leave some space and then apply the cleaning method, except that you will have to redraw that piece.

Then you can have different sized or different oriented scan... There is no miracle technique there. Take one layer, CTRL + T, and rotate and scale. You can keep the aspect ratio by holding SHIFT. If you are REALLY lucky.. it will stitch.













Now that the scan is stitched, you can have some difference with the color of the different part. This is due to the scanner that adjust it’s setting. Normally Photoshop when using photomerge, will also hide this effect. But if you still have a problem with overlapping scan, then you need to apply a gradient on the Layer Mask.


For scan which are not overlapping, the only solution is to use Adjustment Layer and Layer mask.

TO BE DETAILLED AND ILUSTRATED
Last edited by Merun on Fri Jun 13, 2008 5:15 pm, edited 4 times in total.
Merun @ Twitter
Merun
Posts: 2897
Joined: Sat Mar 17, 2007 9:44 am
Location: NoWheRe

3/ Scan processing

Post by Merun »

3/ Scan processing

Scan processing is rather easy, but it takes quite a lot of CPU depending of the size of your image. Note that you should process the scan before uploading anywhere, and resizing. As such, the higher the resolution is, the better it is. I remind you also that this is my own workflow, and it might not be the best.

First, choose a part of the image where details prevail. In general for anime character, it's either the eyes, the hair, or some frilly dress.

My workflow is as follow:

1/ Noise Removal with Noise Ninja
2/ Removing the screening
3/ Sharpening
4/ Resizing

I will take the example for noise and screening above and apply Noise Ninja.

Image

Here I used the auto profiling with chart. The software will then analyze the image and set some zone, in yellow rectangle as it's profile and apply it's algorithm to remove noise. Here it looks quite good with some addition setting in the filter tab. But sometimes you will need to select yourself where to profile the image. For that, click on the green graph button at the bottom, then select uniform area of the image ( no edge, no color gradient ), and repeat it with different area and look at the preview to see if it's good or not.

Here are my setting for the filter. Mess a bit with it to see the different result.
Image

Then click Ok and let it run.

Now, step 2, we are going to remove the left over of screening. Since the image was quite clean, I applied a little Gausian Blur of 1px here.

Image

Sometime you might need to apply a Median Noise filter if there is a lot of artifact left. Just don't go over 2-3px, and you can still apply a Gausian Blur after.

Last filter to apply is the Smart Sharpen. Leave the default configuration, or adjust a little bit the radius ( up to 2px ). This will strengthen the edge

Image

Now, resize it to at least 50%, or even lower.

Image
Last edited by Merun on Wed Jun 11, 2008 5:34 pm, edited 3 times in total.
Merun @ Twitter
Merun
Posts: 2897
Joined: Sat Mar 17, 2007 9:44 am
Location: NoWheRe

4/ Scan cleaning

Post by Merun »

4/Scan cleaning

Finally I will explain how to remove crease. This part is quite difficult since you will mostly need to redraw, and it's also hard for me to explain.


First, it’s a good idea to understand the picture while zooming. Removing crease is time consuming and it takes me between 1 and 2 hours to remove, depending of the size of the picture and the complexity of the drawing. Also try to get a good mouse, it’s essential ( personally I use a touchpad for this ) .Crease are just 2-4 pixel wide, so there is not a lot to redraw. It’s the same for small gap between 2 scans. It’s the same technique to remove text, except that text are usually bigger, and you need a better appreciation of the drawing.

In this tutorial I will refer a lot to stroke and surface. Stroke are the drawing line, and the surface is the color. ( I needed some name )

1/ Add a layer on top of the scan and select it.
2/Zoom to the crease with something around 400%
2/ Select the Clone Stamp tool.


The clone stamp allow you to set a zone which you recopy with a brush. This allow to edit image that even have some kind of texture. The best setting to use it is a soft brush. The radius is to be set according to the situation. With wide uniform surface, you can easily use a large brush, but for details, it’s between 2 and 20 pixels. It might be easier for you also to reduce de opacity of the brush. You will need more click and a little bit more of time. 70% is a good idea. Also set the tool to sample “All layer”. To set the zone to copy, hold ALT and select with your mouse

Now there will be 3 things you will need to know how to redraw: straight stroke, gradient, rounded edge. It’s always a bit of trial, so you might need to go back into the history if it doesn’t looks nice.


The first one is the easiest. Usually, the stroke are straight, so on each part of the crease, you will have the correct drawing. Set the copy area on either side, and then, clone it over the crease. It’s better to have the brush big enough to take the entire width of the stroke, but also a bit of the surface. You can always correct your stroke by setting the copy area on the surface and adjust around the stroke you created.

The second things is quite easy too. Gradient are usually quite uniform too, so you can apply the same technique we used for stroke. However, you should also sometimes make gradient yourself, when the scan isn’t uniformly exposed. This should be done with a low opacity ( 20-30% )

Finally, rounded edge. Rounded edge are sometimes hard to redraw. The clone stamp won’t be enough in most case, and you will the following tools:

Brush tool
Blur tool
Dodge tool
Burn tool

First take the Brush tool, and hold ALT. This will turn the brush in a color picker. Pick the color of the stroke, and try to redraw the rounded edge. After that, it’s up to you how you are going to transform this into a nice drawing stroke and I can only give you advice.
You will most likely need to soften the edge of your line to make it looks like a gradient. For this, there is always the clone stamp. Set the copy area to the surface and clone around the edge. Use the surrounding of the soft brush, so that it won’t be to strong, and click several time if needed.
You can improve this also with the Blur tool and the Dodge tool. Just don’t use high setting. The Burn tool is for the center part of the line.

TO BE CONTINUED AND ILLUSTRATED
Last edited by Merun on Fri Jun 13, 2008 5:17 pm, edited 2 times in total.
Merun @ Twitter
User avatar
Gardenia
Posts: 224
Joined: Sat Sep 22, 2007 4:00 am

Re: Scan processing and cleaning

Post by Gardenia »

Wow. Merun, you are the god of all scanning. xD
User avatar
anonymous_object
Site Admin
Posts: 1584
Joined: Tue Jan 24, 2006 2:04 pm
Location: Good old US of A
Contact:

Re: Scan processing and cleaning

Post by anonymous_object »

I personally think there's too much processing going on with these steps >_<
Also, I've never been a fan of trying to undo the result of a previous filter (sharpening after blurring). Each filter applied to an image decreases detail from the raw scan so as few filters as possible should be applied. If it looks like an image needs sharpening after a blur filter, then you should adjust the parameters or type of blurring taking place ^^;
e-shuushuu!
Image
Merun
Posts: 2897
Joined: Sat Mar 17, 2007 9:44 am
Location: NoWheRe

Re: Scan processing and cleaning

Post by Merun »

I know that the least the better, but I need to kick my scanner... It can't descreen... ( note, do not buy Lexmark for scanning )

I think that instead of Gaussian Blur, you can always try the Smart Blur, but it's a little bit more annoying to configure. ( high quality and reduce the threshold ). There is also the Median noise. Every of these filter need to be applied with low setting.

I'm not too fond of sharpening, so I only apply a little bit ( in fact I wonder if its make a lot of difference after resize ). Also it does not really undo previous filter, no sharpening for screening since there isn't any more.

Also the resize allow to be quite, generous with the process. But I keep experimenting different setting.
Merun @ Twitter
User avatar
tw
Lyrical Magical tw-chan
Posts: 47
Joined: Sat Jan 20, 2007 3:17 pm

Re: Scan processing and cleaning

Post by tw »

anonymous_object wrote:If it looks like an image needs sharpening after a blur filter, then you should adjust the parameters or type of blurring taking place ^^;
From a DSP perspective, a blur is a low pass filter, where a sharpen is a high pass filter. When you add them together, you get a band pass filter. In fact, the order in which you perform the operations should not matter if the filter is not adaptive.

There are good reasons, mathematically to do both operations.
User avatar
anonymous_object
Site Admin
Posts: 1584
Joined: Tue Jan 24, 2006 2:04 pm
Location: Good old US of A
Contact:

Re: Scan processing and cleaning

Post by anonymous_object »

I don't know the formulas that Photoshop's filters use, but I'm willing to bet that the blur and sharpen functions are more than just low-pass and high-pass filters, respectively. They are probably band-pass filters themselves.

From my experience, blurring an image and then sharpening it does not achieve the same affect as sharpening and then blurring. Yeah, I think there are times to blur and then sharpen, but I was trying to make a point that over filtering an image is bad :-/
e-shuushuu!
Image
Post Reply