Tuesday, January 29, 2008

Monday, January 28, 2008

Smoother skin in Photoshop

clipped from www.lunacore.com

1. Remove blemishes

We're going to use the following image for this Photoshop tutorial:

Original Image

Download this image to your hard drive by right clicking on it and selecting (when you use Windows) Save Picture As...

The first thing we're going to do is removing blemishes in the face. In the following image I've marked which areas I considered needed a correction:

Areas that contain blemishes

The reason why we're going to remove blemishes first is because we will have better results when we soften the skin in our next step.

The tool that we're going to use to remove blemishes is the Healing Brush Tool Clone Stamp Tool which can be found in the tool bar:

Healing Brush in tool bar

Let's first add a new layer by clicking on the Create a New Layer icon New Layer in the layers palette. Rename this layer by double clicking on its name in the layers palette and name it Blemishes.

With the Healing Brush Tool still selected, let's look at the option bar:

Options Bar for Healing Brush

On the left we can see a black dot with a sharp edge; it means that the brush is going to have a hard edge (also called 100% hardness). Underneath we can see the size of the brush which is 19. More to the right we notice the selected Blending Mode for this brush. For this tutorial we're only going to use Normal mode. If you want to know more about blending modes then you might consider to look at this very detailed article by Jay Arraich: Blend Modes

The next option is called Source, for which we have two options; Sampled or Pattern.
Sampled means that we're going to use our image as our source.
Pattern means that we're going to use an existing pattern as our source.

In most cases you will use the Sampled option, because quite often we want the new area to have the same texture as the area surrounding it. Pattern can be useful if you don't have any descent area in your image that you would like to use as your texture.

We are going to use Sampled.

The Aligned option allows us to have a source area that follows our mouse cursor. Look at the following screenshot:

Option 'Aligned'

In this example the user has selected area C as the source (later we will learn how to set the source). The first moment the user presses the mouse button to remove a blemish (in this case at A), Photoshop will remember the distance and angle between A and C. So if the user now decides to remove a blemish at B, then the source will be D (same angle, same distance).
So you could say that after the user starts to use the Healing Brush that both cursor and source are 'glued' together as shown in this little animation:

Animation: Aligned

The advantage of the option Aligned is that we always stay close to the area that needs to be corrected and that the texture resembles the texture we want to use for our correction.

Notice that the option Use All Layer is selected. This means that the source area doesn't have to be on the same layer, in our case the Blemishes layer. It also means that the result of using the Healing Brush Tool will be placed on the active layer, which is in our case the Blemishes layer. The Healing Brush however only uses those pixels that are visible in our document window, but like I said, it doesn't matter on which layer they are.

If you return to the screenshot of the options bar you'll notice that I have placed the letter A beside a little black triangle. Click with the mouse on this little triangle and a new window will pop up:

Brush Options

We're going to use a small brush size for our Healing Brush Tool so we select a value of about 20 px. We also want to have soft edges to avoid that our corrections are noticeable in the final image and that's why we're going to select a value of 0% for Hardness. The other settings have Photoshop's default values and don't need to be changed. If these values are different in your case then change them according to the values of the screenshot of the options bar.

The last thing we have to do before we start removing some blemishes is setting the source area. Move your mouse cursor close to an area that needs to be fixed (the source area and the area that needs to be fixed shouldn't overlap) and hold down the Alt key (option key on the Mac) and press your left mouse button; this will mark the source area. With the source area set you can start by removing blemishes by using your mouse cursor as if it were some magic brush.

Note: sometimes it's necessary to change the source area of the Healing brush Tool. You can do this at any time by following the same steps that we used to set the initial source area.


2. Smooth skin

Create in Photoshop a new layer on top of the Blemishes layer by clicking on the Create a New Layer icon New Layer. Rename this layer to Smooth Skin by double clicking on its name in the layers palette.

Hold down Ctrl + Alt + Shift + E (Command + Option + Shift + E on the Mac) to merge all visible layers on the active layer (Remember this Photoshop shortcut, it's a very useful one) or in other words; the layer Smooth Skin will contain the image that was visible in the document window when you used this shortcut, which includes all the corrections we did to remove blemishes.

We're going going to use the Median filter to make the skin look smooth. Some tutorials advice you to use Gaussian Blur, but I prefer median because it takes better care of edges and it's exactly those sharp edges that we want to leave intact as much as possible.

Now go to the menu and select Filter / Noise / Median... , enter a radius of 10 pixels and click OK. Set the opacity of this layer to 50%:

Opacity

The result:

Median Filter applied

The skin now looks exactly the way we want it, but by using the Median filter we've blurred areas that need to stay sharp, like eyes, lips, hair, hat, eyebrows, eyelashes and the edges of the nose and nostrils. We are going to fix this by adding a mask which allows us to ignore those area that need to stay sharp.

We add a mask to the Smooth Skin layer by clicking on the Add layer mask iconAdd Mask in the layers palette.

Press the letter D on your keyboard to make the foreground color white and the background color black:Fore- and Background Color
Press the letter X on your keyboard to switch the fore - and background color: Fore- and Background Color

Select the the Brush Tool by clicking on its iconBrush Tool in the tool bar. Check the options bar:

Option Bar

Use the settings that you see in the options bar. Notice that we're going to start with a size 50 brush. This time the hardness of the brush is set too 100% (hard edges). You can change both the size and hardness of this brush by clicking on the little black arrow like we did earlier with the Healing Brush Tool.

Now it's important that you have your mask active at all times before you start using the brush, since we have to apply the brush strokes to our mask and not our image. An active mask can be recognized by its double border (marked with the red arrow) and the mask iconAdd Mask in front of it:

Active Mask

To be able to see what we're actually masking, let's turn on the equivalent of Quick Mask by pressing \ on your keyboard. You won't see anything happen, but let's paint on the hat inside the document window. You'll notice that the quick mask mode now marks the area that is going to be masked with a transparent red. Turn off Quick Mask by pressing \ again and you'll see the area of the background layer that you've made visible by masking the same area on the Smooth Skin layer:

Rollover

Quick Mask On

So that's the whole purpose of our mask in this tutorial, to hide the areas that are blurry and which have to stay sharp. You can change the color and opacity of Quick Mask by righting clicking on the mask's thumbnail in the layers palette and selecting Layer Mask Options... The following window will open:

Quick Mask Settings

In this window you can change the color by double clicking on the red square. You can also change he opacity of the Quick Mask color, which is by default 50%.
Note:
The opacity setting doesn't affect the layer or the mask itself, it only affects the transparency of the mask in Quick Mask mode.

Continue by turning on the Quick Mask mode by pressing \ again.

Look at this screenshot:

Mask

You'll notice that I have masked everything that needs to stay sharp (unaffected by the median filter). If you have a hard time to tell whether you've fully masked those areas that need to be mask, then do the following:

  • if Quick Mask mode is on, turn it off
  • Alt + Left click (Option + click on the Mac) on the mask's thumbnail (see next screenshot, A) in the layers palette

This allows you to view (or edit) the mask in your document window and will show you pretty precise where you need to make adjustments, like in this case around the left eye:

Left Eye

You can return to the normal view by clicking on the layers thumbnail in the layers palette (B).

To create a clean mask you have to use the following guidelines;

  • Change the brush size often. Instead of switching to the options bar several times we're going to use a shortcut; press [ on your keyboard to decrease the brush size or press ] to increase its size. There's also a shortcut for hardness; press Shift + [ to decrease the hardness of your brush or press Shift + ] to increase the hardness.
  • Mask large areas with a large brush and a hardness of 100%.
  • Mask small areas with a small brush and a hardness of 0%.
  • Mask accurate edges by using a large zoom factor and work with a small brush, low hardness of 0% and a low opacity (about 30-50%).

Also make sure that sure that you don't forget to mask areas like the corners of the mouth, fine hairs, eyebrows, eyelashes and the contours of nose and nostrils. For those areas try to use a soft, small brush with a low opacity.

This is the final result (after some slight sharpening):

Woman - Before/After





Note: you can reduce the strength of the effect by lowering the opacity of the Smooth Skin layer.

I hope that you enjoyed this tutorial and don't forget to check out the Beautify a Face Photoshop tutorial that shows a lot more face related retouching.

Saturday, January 26, 2008

HDR Tutorial - Photoshop

HDR Tutorial - Photomatix

Just to warn you that there is no audio in this tutorial.

clipped from www.vanilladays.com

HDR Tutorial: How to create 'High Dynamic Range' images using Photomatix

If you want to know how to take photos such as these, then read on.

The Liverbuilding pierheadhdr.jpg Liverpools Anglican CathedralFrom Princess Dock Inside York Minister condi-rice-liverpool-05.jpg

View More

Contents

What's New?

I've reorganised this guide to include more on Photoshop's HDR feature and why I feel that Photomatix's is better. The latest version of Photomatix will detect if your TIFF's have the same EXIF info and it will ask you to confirm which images have which exposure settings. This means you don't have to remove the EXIF from them anymore. A great feature.

This guide has also been featured in the November issue of Professional Photographer. I think that's an official stamp of approval from the photography industry that HDR is indeed great for photographers world wide. It can produce nice balanced images on harsh sunny days, or it can create arty pictures of already stunning landscapes.

Professional Photographer on the stands in Borders Contents page featuring one of my images Close up of my name in print The first two pages of the article The second set of pages. 4 in total.

Aims of this tutorial

The main aim of this tutorial is to help people use HDR techniques to produce photos with a higher dynamic range than they normally get in a standard out of the camera photo. I will show you how to take a shot from the one on the left, to the one on the right.

Before After

What is HDR?

HDR means 'High Dynamic Range'. Using software like Photomatix you can create images with a more detail in the highlights and shadows than you can with a normal photo from todays digital cameras. Its similar to the old technique of exposure blending. Taking one photo for the sky and one for the ground, then merging them both together in Photoshop. HDR takes it a step further by increase the amount of detail in the image and allows you to create some unique photos. You can use it carefully to create natural looking photos or you can use it creatively to create atmospheric and emotive photos. The choice is yours as to how you process the end result.

Tools Needed

A RAW editor such as Aperture, RawShooter, or Photoshop. Secondly, the HDR program. I use Photomatix.

Step 1: Source images

There are two main ways to create the source images needed for HDR. You can either use AEB, auto exposure bracketing, on your camera to take 3 images while you are out, or you can use RAW to take 1 image and then use a RAW editor to produce 3 shots back at your computer. I shall start with auto exposure bracketing.

Auto Exposure Bracketing (AEB)

The main advantage with AEB is that you can get better source images with less noise. For example, a sunset. You would normally get really dark shadows and enhancing them later from 1 single RAW file would increase the noise. With AEB you can take a completely seperate image for the shadows and one for the highlights to preseve the detail and keep the noise to a minimum. The disadvantge to this approach is that anything moving in the image will become blurred and repeated as it moves across the 3 images. To start with you will need a camera that has the AEB mode and a tripod. You will also need a tripod so that the 3 shots you take can be perfectly aligned later. Go to the menu on your camera and set the AEB mode to -2 / +2 stops.

AEB Before AEB After

It should look like the right image after the changes. Compose your shot, and set the camera up as your normally would to take a picture. Now after you take a picture you will see the exposure compensation level drop down to -2. Take another picture and you will see it goes up to +2. You will notice the shutter speed or aperture changes too. This allows you to get the three shots for the shadows, a balanced image and for the highlights. You now have the 3 shots required to produce a HDR image.

Sumit says: DO NOT CHANGE your aperture with AEB, only the shutter speed (i.e., keep the camera on shutter priority). Why? Cuz, a change in aperture would change the DOF as well and you don't want that!

Using a RAW Editor

The other way to produce the 3 shots needed is to take 1 photo and adjust in a RAW editor such as Aperture, Photoshop or RawShooter. The main advantage to this is that you can produce a HDR shot with moving subjects such as people or cars. The disadvantage is that if you use an image with very dark shadows and you're trying to boost the exposure, the result will be quite noisey.

Load your photo into the editor, then set the exposure level to -2 and save the image as a 16bit TIFF without any metadata such as EXIF info. This is the important part. If you save it with EXIF info you will find that Photomatix relies on that info to produce the HDR shot. The problem with this is that the shutter speed and aperture values will be the same across the 3 images and Photomatix won't know which image is -2, 0 and +2. Set the exposure level to 0, save that and then set it to +2 and save that image.

Aperture

This is how it looks in Aperture. You will now have the 3 images needed to produce a HDR image.

Step 2: Generating a HDR image

Open the 3 images into Photomatix. From the HDRI menu select Generate HDR. Photomatix will ask you if you want to use the 3 opened images or load in some. Make sure it has "Use opened images" selected and click ok. Now Photomatix will confirm the exposures for each image. 9 out of 10 times it will get it right, but just incase make sure that each image has the correct exposure settings. In the case of this guide they should be +2, 0, -2. Click ok, then check that "use standard response curve" is selected. If you are using 3 images taken at the scene tick the "Align LDR images before generating HDR image" option just so that Photomatix aligns the images for you. Click ok and after a few minutes you will see your HDR image. It won't look exactly right just yet. Some areas will be slightly over-exposed and it'll look odd.

Step 3: Tone Mapping

This is the magic part. Using the Tone Mapping feature in Photomatix will convert your HDR image into something usable. Goto the HDRI menu and select Tone Mapping. You will see how your photo looks more like a standard HDR image. The sky will be nicely exposed, as will the ground. The trick now is to adjust the settings to get a nice balanced image. You could be creative and go for something a little more fun if you feel like it. For the image in this guide I wanted something special and yet not too far from the real world. I'll start with a quick run down of the various options.

Luminosity
Adjusts the brightness of the shadows. Moving the slider to the right has the effect of boosting shadow details and brightening the image. Moving it to the left gives a more natural look to the tone mapped image.
The optimal value depends on the image and the effect you want to achieve.

Strength
Controls the strength of local contrast enhancements. A value of 100% gives the maximum increase in local contrast.
The optimal value depends on the image and the effect you want to achieve.

Color Saturation
Controls the saturation of the RGB color channels. The greater the saturation, the more intense the color. The value affects each color channel equally.

White Clip - Black Clip
From watching the way the histogram changes, the white clip adjusts the highlight contrast and the black clip adjusts the shadow contrast.

Micro-smoothing:
Basically this setting should be called "How arty do you want your shot?" At 0 you can get the cool arty style HDR images with all the detail in everything from walls to clouds you didn't know where there. However, if you want a nice simple blended exposure photo set it to 30. 95% of the image should be perfectly exposed as if you spent hours putting them together in Photoshop. This is a great new addition to Photomatix as it allows people to use the software as they see fit. If they want a nice photo that is perfectly exposed then they can get that just as if they used ND Gradient filters on their lens. However, if like me they want something a bit more unique they can drop the micro-smoothing down and get something dramatic.

Light smoothing:
Never set this below 0 as you will get horrible results.

Microcontrast
Controls the accentuation of local details. The default value (High) is the optimal value in most cases. However, this control may be useful in the case of a noisy image or when the accentuation of local details is not desirable (e.g. seams of a stitched pano in a uniform area may become visible when local details are too much enhanced).

Real World Examples

Natural Feel

Natural Exposure Feel

Settings used;

Luminosity +8, Strength 25%, Colour Saturation 65%, White Clip 0.220, Black Clip 0.075

Natural Feel 2

Natural Exposure 2

Luminosity -2, Strength 80%, Colour Saturation 65%, White Clip 2.230, Black Clip 0.490

Being Creative

Being Creative

Luminosity +5, Strength 75%, Colour Saturation 65%, White Clip 4.305, Black Clip 1.140

As you can see, when you increase the strength, luminosity and clipping you increase the visible detail in the image. You can see more detail in the building and the clouds.

Issues

Shooting on high ISO will increase the noise in the image. For example, using ISO100 can produce a noise image like ISO400. So if you use ISO400 it will be very noisy. Don't even think about ISO800 or 1600 unless you are desperate and have a great noise reduction technique. I find that Noiseware doesn't do a thing against the noise in a HDR shot, but Noise Ninja can. However using Noise Ninja will soften the image.

Halo effects around buildings and people can occur too. I've read that this can be due to lowering the luminosity below 0.

Extras

Generating a HDRI from a single RAW file

Using the latest version of Photomatix, 2.3.1, you can load a single RAW file and generate a HDR image. Simply goto File -> Open and then select the RAW file. Photomatix will load the image and generate a HDR from it. You will still need to tone map the image after. I tried it but I didn't really like the results. The image was too noisy and had some corruption in certain areas. The best method is still to take 3 bracketed images on site.

HDR from a RAW file in Photomatix

1 RAW vs 3 RAW's

There is a lot of talk on the Web about true HDR images. Lots of people argue that a HDRI from 1 RAW file isn't a true HDRI. I personally believe that the end result is all that matters. If you sell a print in a gallery is the buyer really going to care if its a true HDR image or a "HDR" image? Are they really that bothered about how many bits of colour there are or just how much data there really is in the image? Probably not. They may ask how you created it out of a passing interest but are they really truely going to care? I doubt they will. They'll take it home and hang it up and look at the end result. They will enjoy the end result. Its all about the end print in my opinion, not about how nerdy the process was. Out of interest I decided to produce a HDR image from 1 RAW and 3 RAW's to compare the end result.

HDR from 1 RAW file

HDR from 1 RAW file

HDR from 3 RAW files

HDR from 3 RAW files

As you can see from the photos they are fairly close. There is more detail and better colour in the image produced from 3 RAW photos. The right hand side wall isn't burnt out like on the 1 RAW image, and neither is the blue wall to a lesser extent. There is also more detail in the sky and the whites aren't as grey. Things like this can corrected to a certain extent in Photoshop so I wouldn't worry too much. I did find that reducing the "Colour Saturation" for this image in the "Tone Mapping" settings did produce a nicer shot. There was more detail in the blue sections and the wall on the far right wasn't burnt out as much. For the most part the images are similar and it does show that a 1 RAW HDR image can produce a striking result. It may not be a true HDR shot and its not a Low Dynamic Range image but what it can be is a stunning photo with a little effort.

Photoshop vs Photomatix

With Photoshop you can create a HDR image from 3 RAW files very easily. Simply open them in PS, goto File -> Automate -> Merge to HDR. It'll ask you where the source images are and then generate the HDR. It will then display the image on screen so you can adjust the histogram to make sure the image isn't overly dark or too blown out. Once you have done that goto Image -> Mode -> 16 or 8 bit and it will bring up another dialog box. From the drop down select "Local Adaption." Using this you can tweak the levels in the image. You have to be careful as it can cause the image to look horrible. The end result will be a well balanced image that you can further edit in Photoshop. The results are quite natural looking and don't feature any of the extreme looks that a lot of HDR images do. For more information read this excellent guide on Photoshop's HDR feature.

Photoshop HDR

You can achieve a similar result using Photomatix. Convert the RAW files to 16bit TIFF's and generate a HDR image using this guide. Once in the Tone Mapping interface set the strength to 1, Micro-smoothing to 30, luminosity to 0, light smoothing to 0 and micro-contrast to 0. The image will then be similar to Photoshops. I found that Photomatix's result was brighter in the shadows, but this was before playing with the "Local Adaption" feature in Photoshop. The benefit of Photomatix over Photoshop is that you have far more control over the end image. You have control over the luminosity, micro-contrast, light smoothing, micro-smoothing, etc. So you have the ability to tweak the image further than you can in Photoshop. How far is up to you.

Photomatix HDR

As you can see they are virtually the same. However, using the features in Photomatix you can create stunning pieces of art like the following;

HDR from 3 RAW files

HDR from JPGs

I've ran a test using my dancer image and it seems that you can get just as good a result using 3 JPGs instead of 3 TIFFs. Its probably better to use TIFF's as they will store more detail, but if you want can use JPGs well enough. There is a definite difference in using JPGs and TIFFs. I prefer the TIFF look. JPGs seem more saturated and noisier.

From 3 JPGs Being Creative

Removing EXIF

This is now redundant as the latest version of Photomatix, 2.3.1, will now detect if the EXIF info is the same and will ask you for confirmation on the various exposures of each shot. However if you need to you can use these tips to remove the EXIF. If you're having trouble removing the EXIF from a TIFF I've found a couple of things you can use. You can copy the TIFF into a new document as save it. Useful when you don't want the lossiness of save for web [eg PSDs or TIFFs] and you can create an action to do it as a batch function. There is also a program called, IrfanView that can supposedly edit EXIF.

For Aperture users, when you export versions click on the export preset drop down, then edit presets. If you select the full size TIFF or JPG preset then click + it will duplicate that. Then make sure that "include metadata" is unticked and click ok.

Conclusion

So that just about wraps up my HDR guide. I hope you found it interesting and a starting point for your own HDR images. Some people see HDR as just another fad but I really believe that it could have plenty of real world applications. I'm already exhibiting a couple of my shots in Liverpool. It definitely has its uses, but as with everything too much of a good thing can be bad for you. Feel free to check out my other HDR photos.

Credits and Links

Thanks to stollerdos for directing me to this great tutorial on HDR that explained the single RAW file trick.

How much of this blog did you find useful? Be honest!