Re: udated html file for tutorial

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Whoopsie. Might help if I actually attach the file, eh?

On 25/08/15 08:17, Andrew Walton wrote:
Just fixed a couple of spelling errors and removed extraneous code.

Cheers,

Andrew.

Sharpening and Noise Removal   
These two operations normally work against each other, when you sharpen a picture you also sharpen all those oddly coloured dots (noise) in the background of the picture. Conversely when you remove noise from a picture you also remove most of the sharp edges from your subject.   
How can you achieve both of these things? Easy. You cheat. This tutorial shows you how to create two separate layers of your image, one gets sharpened, one gets noise removal, and we use a layer mask to display the correct parts of each.   
This is done using free software, the Gimp is a full vector drawing and image manipulation suite, one that I personally find to be the most user friendly and most feature rich of all the programs of this type, free or commercial. And some of this richness of features comes from Plugins, little add ons that you can download for free.   
If you are using Linux you should find the Gimp in your regular software repositories, if not you can download it for your system, Win and Mac included, from http://gimp.org Also in the menu on the right hand side of that page is The Plugins Registry where you can get all the little extras you might need.   
The plugin I use for noise removal is called GreyCstoration, this is deprecated (replaced by a more modern program) but I find the old original simpler and easier to use, less confusing because it only does one job. If you are using Fedora you can install GreyCstoration straight from your regular download repositories.   
First we need to open the Gimp and then open an image in it:
Then make sure that the image is displayed full size so that we can properly see all of it's faults:
Next, in the Layers and Brushes Panel click the button to create a duplicate layer of your image:
Now we need to create that mask that tells the Gimp which bits of which layer to show. Do a Right Click on the new layer you just created (the top one) and from the drop down menu select Add Layer Mask.
In the new window that opens select Grayscale Copy of Layer and click the Add button:
Now we change the "Mode" of the layer with the mask. In the Layers and Brushes Panel at the top where it says "Mode" click the little down pointing arrow on the right to open up the drop down menu and select the last option "Value".
As soon as you do this you'll notice a slight improvement in the quality of your image but we're nowhere near finished yet, we're going to turn that greyscale mask into a black and white mask that only shows the edges that we want to sharpen.   
To do so we need to be able to see it. Do a right click on the layer mask in the Layers and Brushes Panel and from the drop down menu select Show Layer Mask.
This mask has to show the difference around all the edges on our subject and hide all the bits we don't want sharpened so we'll remove all the noise from the mask before anything else. Use the menu bar at the top of the main panel to go to Filters, Enhance and GreyCstoration.
At first glance this program looks incredibly confusing, don't worry, we only play with two settings and leave all the rest for another day. Just like all other enhancement filters, the default settings are deliberately exaggerated so that it's easier to see the effects that a particular filter is responsible for. We don't want our picture looking like a piece of Pop Art (not this time anyway) and we want our adjustments to be subtle, non destructive.   
The only two settings to play with are Strength and Scale as shown in the picture. Drop Strength back down to somewhere between 30 and 45, and the Scale back to 0.3 or 0.4. But don't just click OK yet, have a play with that little preview picture at the top of the window, you can click on it and drag it around, the image will be displayed without changes whilst you're dragging it and with changes when you let go. You can zoom in and out with it too. This means you can tweak my suggested settings and see the effects before you apply them. Fantastic tool, brilliant tool.   
If your subject has eyes then this is probably where you want the best results, around the eyes. For landscapes etc choose a section of the picture where you have a combination of high complex detail and plain unbroken flat colour. If you don't make the strength and scale strong enough it won't remove enough noise, but as you go too far you start to get a "halo" effect around the edges of objects, not a good look. Apply when you're ready.
When that's done go to Filters, Edge Detect, and Edge.
The amount (width) of edge detection we want really depends on the size of the original photo that we're playing with, the one I'm playing with is 10 megapixel and I've got room to play with, my suggested setting here would start to look obvious and amateur on a 2 megapixel picture. For my picture I'm going for an edge 8 pixels wide, for a 2 megapixel picture you'd want 6 pixels, or even 5. That's the only setting we change here.
Whoah! Doesn't that look ugly with all that mess in the background. You should see what it looks like if you skip the GreyCstoration step. But you can now see what the mask is going to do, the white parts will show the top layer, the one with the sharpening. The black parts will show the bottom layer, the one that gets the noise removal.
So now it's three quick steps to clean up all the little lines in the mask and just leave the major ones. First of all we'll do some level adjustment under Colors and Levels.
Adjust using sliders, little arrows next to the numbers, or just click in the box and type the numbers, Black = 10, midrange = 0.90, White = 235.
Now we'll blur it a bit. Go to Filters, Blur, and Gaussian Blur.
We want the amount of blur to be just a little bit wider than our edge width. I chose 8 pixels for the width of my edge detect so I'll blur 10 pixels wide. If you used a smaller picture and you only used an edge detect width of 5 pixels then you only want to blur by 7pixels.
Now it's almost there, but we'll do those level adjustments again, you'll notice that the graph is a smooth curve now instead of jagged lines. Same adjustments as before except this time a little more severe on the white, change it to 225.
Our mask is now finished, it's time to hide it and get back to the fun bits. In the Layers and Brushes Panel do a right click on that top layer and in the drop down menu untick Show Layer Mask.
Now we'll sharpen the actual image in the top layer but we have to make sure that it's the image we're adjusting, not the mask. In the Layers and Brushes Panel do a single left click on the image, you should see the white outline highlight change from the mask to the image.
Now go to Filters, Enhance, and Unsharp Mask.
Once again the settings are deliberately way over done:
Don't play with the threshold unless you feel like playing for a while, but a good range for the Radius is between 1.4 to 1.9 and the Amount between 0.4 and 0.9. Once again, use that little preview picture at the top, what you see in there really is what it will end up looking like.
Now we get rid of the noise in the bottom layer. First, click on the image in the bottom layer so that it gets the highlight, so that it's the one we're working on.
Go to Filters, Enhance, and GreyCstoration.
The same settings you last used will still be in there and are probably just how you want them. But pay extra attention to that little preview window this time, this is what other people are going to see.
Now we need to Flatten the image, to press those layers back in to one picture.
Now we can save our picture, but there's a bit of a mix up with words that catches most people out. If you use the Menu Bar to go to File and Save you'll be saving your Gimp Project in it's current state, not saving your picture.   
To save your picture you need to go to File and Export As:
Choose where to save your image and give it an appropriate name, by default it will want to save in the same folder and with the same name as the original. Don't worry, it'll warn you, but if you don't want to destroy the original you'll have to go for a different folder or a different name.   
Down the bottom of this window is a drop down menu where you can choose different image formats such as JPG or PNG, for the sake of this exercise I'm not going to touch that. Instead, because I ended my file name with the .JPG extension it will automatically go into JPG mode and give me the appropriate options.
In the new window that pops up (if you chose a JPG format) you get the options for what quality of image you want and how much compression you want. Click on Advanced Options to get the expanded list. The settings shown in the next image will give you an almost lossless JPG with no compression. Maximum quality but also maximum file size.
But for most every day purposes this is just a ridiculous waste of harddrive space and all your friends will hate getting emails from you. For an every day sort of picture leave all the other settings max'ed out but play with the compression slider at the top. Places where you'll notice over compression first is in people's faces, dark shadowy areas in the pictures, and in pictures with unbroken cloudless skies.
  
For a potrait or an ocean view you can normally run that slider down to 85% and not notice the difference, that turns my 10 Mb file in to a 400 Kb file. If it's a very complex image with lots of varying bright colours you could probably get it down to around 70% and not notice too much depreciation. If it's a black and white text document you've got from the scanner you can run that slider right down to around 5% and still have a perfectly legible copy.   
Cheers,   
Andrew.   
_______________________________________________
design-team mailing list
design-team@xxxxxxxxxxxxxxxxxxxxxxx
https://lists.fedoraproject.org/mailman/listinfo/design-team

[Index of Archives]     [Fedora Music]     [Fedora Development]     [Linux Kernel]     [Fedora Legacy]     [Fedora Desktop]     [Fedora Directory]     [PAM]     [Big List of Linux Books]     [Gimp]     [Yosemite News]

  Powered by Linux