Asiva Newsletter
December 16, 2003
 

Hello –

Happy Holidays! We are sure you are in the midst of excitement as you head into the final days before the holidays and the new year. With all of the shopping, decorating, last minute projects and who can even name all of the things to be done, we hope you are enjoying it.

Well, maybe when things settle down a bit, you will be able to relax and read up on your Asiva Newsletter. This issue, we are digging deeper into Shift and Gain and looking at examples of when they are best used. Also, our discussion on good pre-production continues with different methods and technologies used for separating a background from a foreground.

We also are proud to announce the release of Asiva Selection. A free trial version can be downloaded here.

In the new year, you can expect to find upgrades to the Asiva plug-ins. In the Asiva Selection plug-in, Scratch Settings or 'memory dots' were debuted. There are five Scratch Settings buttons, which allow the user to quickly save and recall multiple plug-in settings without having to load or save them via the operating system. The Scratch Settings buttons can be expected in upgrades to other Asiva plug-ins in the near future.

Well, see you next year!

Shapiro Consulting Group, Inc.


New Selection Plug-in

Asiva has used its mask-less selection technology to assist those who just can’t move away from masks. The new Asiva Selection plug-in basically gives users the precise and natural control found in the other Asiva plug-ins or Asiva Photo’s Operations, and actually creates an elaborate gradient selection, which can be used with any Photoshop filter or effect.

Asiva Selection works exactly the same as the previous Asiva Plug-ins. You will still find true 16-bit processing, adjustable Hue, Saturation and Luminance curves, and the built-in Color Sampler Tool. The only difference is that instead of making any changes to the image, this plug-in leaves you with a floating gradient selection to save or work with to your desire.

Although Photoshop CS now offers more 16-bit compatibility, for pre-CS users working on 16-bit files, the plug-in directly creates a gradient selection without having to create an 8-bit duplicate file and transferring a selection.

Even using CS, for those colorists out there, you should be able to get even more precise results than the built in Photoshop color range selection, via proper Asiva curve settings.


In our previous newsletter I described what the Shift and Gain Operations were. Now I will give some examples of how to use Shift and Gain.

Recall that a shift is either adding a whole number to, or subtracting a whole number from each pixel’s designated component. For example, adding 6,000 to the red component of every pixel (in a 16-bit representation) is a shift of +6,000.

A mathematical gain is multiplying, or one could say “dividing” when the gain factor is less than 1.0. Gain uses fractional numbers like 1.33. The larger a component’s numeric value, the more a gain will impact it. This is just pure math. For example, in the HSI color model, we know that the “I” stand for Intensity. Intensity is essentially the particular brightness value of a given pixel. The lower the intensity number, the darker a pixel is. The relative amount of change to intensity using a gain, increases with the actual intensity.

Shift or Gain
 

Download a free trial of the Asiva Shift+Gain Plug-in for Photoshop here.

 

Remember, in general, if you want to impact high values of some component but not so much the low values, use gain (multiply/divide). If you need to alter low values, typically to increase them, use shift (add/subtract).

For our first example we will use the Shift Operation on the saturation component. One of the classic deficiencies of electronic image/video capture is the rapid transition from good, saturated color to washed-out color. This contributes to, what I call the ‘tinny-look’ of digitally captured images or video. An easy way to correct these types of images is to fill-in some saturation using shift. That is, make the saturation transition smoother.

Consider the following image, taken by a digital camera:

Orig. Shady Grove

To fill-in some color saturation where it is lacking, we could use the Asiva Shift Operation to shift upwards the lower saturation values. Shift would be more appropriate than gain here because we are trying to impact lower values. The screen capture below shows how we would set the curves and the Saturation slider to get the results we desire.

Screen Shot Shift Operation

Notice the Saturation curve in particular. What the curve shows in general is lower level saturation values should be selected, or impacted, more than higher level saturation values. In particular, fully saturated pixels should not be touched at all, nor should 0% saturated pixels - that is our grayscale, and we certainly do not wish to throw off the white balance. Also notice the Hue Map is flat-lined at “Full On”. This means the saturation will be filled-in for all hue’s. If we wanted to impact reds more than blues, or omit greens altogether, we could set this curve appropriately.

The Saturation slider has been set to about a 15% increase. All other sliders are at zero so they will not impact the image.

I encourage you to experiment with this basic use of the Shift Operation on the saturation component. Tweak the Saturation curve, and try different Hue curve settings, as well as Saturation slider amounts.

Our next example will use the Gain Operation to gain down some of the higher level brightness values in a digital image. Similar to the rapid color saturation transition, electronic images are notorious for a rapid transition of light levels. This also contributes to the poor aesthetic of digitally-acquired images, in general.

Looking at the image below, lets just say we choose to smooth-out the brightness transition and also treat different basic colors unequally. I mean, lower the brightness levels in the reds and yellows more than in the cyans and blues.

Orig. Construction

To accomplish the changes I described, we could use the Asiva Gain Operation to gain down the brighter values. Gain would be more appropriate than shift here because we are trying to impact higher brightness levels more than lower brightness levels. In fact, we do not want to touch the shadows at all because that would actually contribute more toward a ‘contrasty’ image - not what we are trying to achieve here.

The screen capture below shows how we would set the Gain Operation’s curves and the Value slider to get the results I described.

Screen Shot Gain Operation

The Value slider has been set to 0.80. This is the base number the applicable Value components will be multiplied by. I say “applicable” because the three curves will select the pixels in the image to be affected.

Notice all other sliders are set to 1.0 so they will not impact the image. This is due to the fact any number multiplied by 1.0 is equal to itself.

Pay special attention to the last curve, Value. What this curve shows is for the Gain Operation to affect high level brightness values. The middle curve, saturation, is highest around 25% saturation. We know by definition that the brighter pixels we desire to change will tend to have lower saturation amounts. Also notice the Hue Map is set to mostly change red to yellow pixels and to a lesser degree, cyan to blue pixels.

The results of gaining the brightness down, using Asiva’s Gain Operation settings shown above, would tend to smooth the transition from dark to bright areas. The best aesthetic is something you will have to judge for yourself.

Written by: Kevin K. Gordon, Chief Technology Officer SCGI


  Tips and Tricks

The Value Of Good Pre-Production III

Setting up a shot for background replacement is not a difficult process if you understand the fundamentals of good lighting and the capability of the software you will be using in the post-production process. In this article we will deal with the different methods and technologies used for separating a background from a foreground image. A good understanding of this is important before we deal with the issue of set-up.

Most applications use one of several ways to define a background for removal or replacement.

Chroma Selection

Also known in the video world as ‘chroma key’. This video term has been around since the first video switchers appeared. This hardware based, real-time system, primarily used the extremely unique reflectance value of ‘chroma-key blue’ to identify the pixels to be removed or replaced with pixels from a different background.

The problems that might arise when using this method of background replacement is the presence of a color of similar reflectance value in the foreground. This won’t be a real problem when dealing with a still image if that part of the image can easily be masked or matted out, but can be a problem in video as that mask would have to ‘travel’ with the subject as it moves. This gives rise to the video term ‘traveling matte’. One way to solve this is to find a color that is not present in the foreground subject. Chroma key green and red are alternative colors if blue is not suitable.

Luminance Selection

A second method often used to generate a matte or mask of the foreground subject is to use the resulting luminance difference of that mask to ‘cut a hole’ in the new background and fill it with your foreground subject. Grayscale values in the generated matte define the different transparencies in the hole cut from the foreground.

Physical Selection

This is accomplished by making a selection of the physical location of the pixels in the image to be replaced. This is often used in the video world to ‘cut holes’ for logos and static graphics. This method is primitive and for obvious reasons is not often used for complex objects that move in the image over time.

Hybrid Selection

This is by far the most prevalent method of obtaining a good selection, mask or matte of your foreground subject. Applications that use this method utilize a combination of Hue and Luminance values to define pixels to be selected for replacement or removal (think magic wand). Stray pixels or regions may then be removed by defining their physical location in the image (think ellipse or rectangle selection tool).

The problems most of us face when trying to make a good mask is when some areas of the image are just too ill defined. For example, if there are out-of-focused areas or if certain colors bleed into another etc. If you define these areas by their physical properties (e.g. magic wand), there is a good chance some of the transitional values may be identified and be evident in the grayscale part of the matte if your tolerance or ‘fuzziness’ is set correctly. If you use the physical selection tool (lasso, rectangle, ellipse), you will have automatically created a physical boundary that is most likely inconsistent with that found in the image. There is no way you could variably feather that boundary so your selection looks natural.

The ideal method would be to define the selection purely based on all the color properties of pixels to be replaced or removed, not by their location within the image. By doing so you would have an accurate selection that would take into consideration the natural boundaries in the transitional areas. The ideal situation then would obviously be a ‘magic wand’ type tool that takes into consideration as much of the pixels color properties as possible when a selection is made, and then be able to identify how dominant each of these values would be when defining the transitional pixels of that selection. For example, you might want to feather that region’s boundary by color, if that boundary bleeds from one color to another as in the case of green leaves that are out of focused over a blue sky; or by luminance if that region’s boundary bleeds from one luminance value to another as in the case of soft shadows; and feathering a region’s boundary based on saturation as in the case of bleeding into highlights and shadows.

A simple exercise would be trying to make a gradient selection with this image. Or try replacing the blue in the image with white or any other background.

Red to Blue Gradient

If you are successful then you know how difficult it would be if the gradient in the image was irregular in shape and non-uniform in terms of hue, saturation and/or luminance values.

In the next newsletter, we will delve into some simple rules for lighting a set for background replacement.

Written By: Roland Lee, Technical Evangelis SCGI