Monday, November 19, 2012

DStretch - Removing the Wild and Crazy Colors

In this DStretch tutorial I am going to show you one method of how to remove the wild and crazy colors sometimes produced by the color space enhancements of DStretch.
The method I will show you in this tutorial will use free software available for all major operating systems. You can download and use all of the software I use in this tutorial for free. I will be using DStretch and the Gimp, hopefully you already have DStretch installed on your computer. The Gimp can be downloaded for free from here If you are using Windows or Mac OS you will need to click the "Show other downloads" link for your operating system.

If you already have Photoshop or another application that supports layers and masks you can use that instead since the techniques used in this tutorial are pretty basic and can be easily interpreted and applied in other image manipulation software programs.

Lets get started...!

We will start with 2 images, the first being the original, non DStretched image and the second will be the wild and crazy colored DStretched image.

Here is the original image and the DStretched image I will use for this tutorial.

Original Image
Photo & Video Sharing by SmugMug

DStretched version with crazy colors

The final image will look something like this
Photo & Video Sharing by SmugMug

The steps involved to create the final image are basically this:

1. Open the original and DStretch images "as layers" in your image application
2. Use a selection tool to outline your pictograph and save it as a "channel"
3. Invert the selection and also save it as a reversed channel
4. Create a Mask of the inverted pictograph channel
5. Erase the background of your pictograph Mask layer to allow the original image background to show thru.
6. Modify the colors of the pictograph Channel layer to get the best results
7. Save your modified images

Once you have your original image and your DStretched version ready you need to open them both "as layers" in Gimp
Photo & Video Sharing by SmugMug

Select both images to open. You can hold down the <Cntrl> Key while clicking on each image

You should end up with 2 layers in Gimp. One is the original image and the second is the DStretched version. You want to make sure the DStretched version is the top layer, if it is below the original image layer than you can drag the layer above the original image layer
Photo & Video Sharing by SmugMug

Now we will need to trace around the pictograph using the Free Select tool. This tool icon looks like a lasso rope, just select it by clicking the mouse on it

To trace around the pictograph just start clicking around the edges of the pictograph. You can be as precise or not as you choose. For this tutorial I am only going to trace a rough outline. Here is how it should look as you get started, once you go around the entire pictograph double click on the last point and it will automatically finish the trace for you

Here is how your finished selection should look
Photo & Video Sharing by SmugMug

I recommend you add a bit of a feathering effect to the edges of the selection. This will help soften the overall look of the colors of the pictograph. With your selection still active choose the menu option Select > Feather and enter a value you want to use, I used 20.00 for this tutorial
Photo & Video Sharing by SmugMug

The next steps are where some of the magic happens. First, save your work now! File > Save and it will prompt you for a filename and the extension will be .xcf which is fine, that is the default for a Gimp file just like Photshop uses .psd. This file format will allow you to save all of your layers, selections, etc so you can modify them later if you like. Once you save your photo as a jpg all the hard work you are doing now will be lost so save your .xcf file now!

With your selection still active you need to save it to a Channel. You will do that by clicking the menu option Select > Save to Channel
Photo & Video Sharing by SmugMug

This will save the Channel and pop you over to a new window of saved Channels

Next you need to reverse or "invert" the selection to make the background the selection and not the pictograph. Do that by selecting the menu option Select > Invert
Photo & Video Sharing by SmugMug

You will need to save this inverted selection to a new Channel just like the previous step. When you have saved both the normal and the inverted selection to Channels you should see both of them in the Channels window. The white area denotes the selection area. (I have renamed the channels to reflect picto and background selections, you can do the same)
Photo & Video Sharing by SmugMug

Now you are ready to apply some magic....
On the inverted Channel, right click the mouse and choose "Channel to Selection". This will apply the background selection to the main image layer.
Photo & Video Sharing by SmugMug

Next you need to select the layers window to get back to the actual photograph workspace. Select the tab circled in red shown here
Photo & Video Sharing by SmugMug

You should see your two image layers now and the next step is to add a Layer Mask. Make the DStretched layer active by single clicking it and then on the menu select Layer > Mask > Add Layer Mask....
Accept the default value of White(full opacity) and click Add

You will see a new white box next the image on the layer itself. This is the new Mask. Make sure the Mask is selected by clicking the white box. A white outline indicates the currently selected item. If you click the image it will get a white outline instead, for now select the white Mask box instead.
Photo & Video Sharing by SmugMug

Now pick your current color which needs to be black
Photo & Video Sharing by SmugMug

Select the bucket tool
Photo & Video Sharing by SmugMug

And then apply the black color with the bucket tool by clicking anywhere on the main image window (make sure the layer with the Mask is the highlighted layer)
Photo & Video Sharing by SmugMug

Now you see magic!

Those are the basic steps. You can Save/Export the current image as is or you can fine tune it to look a little better. Some of things I do are change the opacity of the layer and change some of the Hue/Saturation effects on the pictograph layer.

To try those things, you need to go back to the Channel window and right click the picto outline Channel (not the background one we did already) and select Channel to Selection. This will make just the picto the selection and not the background like we had before. You can select/highlight the Mask layer to make it the active layer and also make sure you click the image to make it active, not the Mask box and change the opacity or from the Colors Menu select Hue-Saturation and play with the values.
Photo & Video Sharing by SmugMug

This was a pretty long tutorial and you can watch the 6.5 minute video below instead. It covers everything here as well as showing you how to Save/Export your final image.

If you are familiar with how to use Layers and Masks this tutorial is probably all you need to tackle some of the tougher pictograph images. This tutorial used a simple, solid shaped pictograph which is pretty easy to enhance. An image with lots of pictographs or others with many open areas in the pictograph will require some crafty use of Masks and Layers to get good results.

Jon Harmon commented to me that this technique is an interpretation of the rock art and I agree. This technique may not be good for all pictographs and there is another method you can use to help isolate the colors using just DStretch alone. Jon has built into DStretch the concept of Masks and it can be a tricky beast to use. I will cover how to use the Hue Mask panel in another tutorial but for now you can watch the below video for a quick overview of how it works.

Links to all of my DStretch Tutorials are here:

DStretch Tutorials - Getting started
DStretch Tutorials - Modifying the Default Enhancements
DStretch Tutorials - Batch Mode
DStretch Tutorials - Removing the Wild and Crazy Colors

Please do not email me and ask me for locations of rock art, I will not reply to you.

No comments:

Post a Comment