Category Archives: Composites

Geometry and The Moon

Please do not run away. We are about to use adult language here. For example we will be using the word trigonometry. Still here? Good.  Here is a very pedestrian looking lunar eclipse photo taken with a 280mm lens*, cropped.

Near and Distant Neighbors

Very Ordinary Photo of the Lunar Eclipse with the planet Uranus in the lower left.

This past lunar eclipse several of us put our heads together to try to come up with a more creative photo than the one above. We had a trigonometry problem, however. On the West Coast the last moment of totality occurred at 4:24 AM PDT. We were brave enough to be out at any time of night – even if it meant extreme sleepiness in our day jobs but our problem was that the lowest the moon would be in the sky at the last bit of totality was 32.6 degrees above the horizon. We determined that angle using Stellarium, by the way. Unfortunately there is pretty much nowhere to go to get a nice large moon near an interesting object when the moon is almost 33 degrees high.

Wait: Why do we want the moon and the object to be similarly sized? Here is why… we want the moon to be noticeable like the Fantasy version below, not merely “present” like the real photo on the right. Even bigger would be better, right!?

N_281-608714+C_281-8150

Notice above right (Reality) and below how tiny the moon is compared to the building in the foreground?  Indeed, if you see a photo taken from anywhere on the West Coast where the eclipsed moon is significantly lower in the sky or larger than shown against foreground, you know it has been “photoshopped“.

Plan C: San Jose City Hall Eclipse Sequence

In short, it is nigh impossible to get the large moon effect with an altitude (angle) of 32 degrees here is why:

Calculating the Angles

Calculating the Angles

Just how far away do we need to be in order to get the moon the same size as an object of interest:

114.6 x object size

In other words, an object that is one foot tall, requires us to stand 114.6 feet away to make the 1/2 a degree angular size of the moon the same angular size as that 1 foot tall object.  The number “114.6” is from this calculation:

1 / TAN (0.5 degrees)

Yeah, that is trigonometry. Using still more trigonometry it is possible to calculate how high above the horizon a 9 inch tall object has to be so that it is “moon sized”.  We did that for you in the “Calculating the Angles” diagram above. Once you calculate the distance from the camera of 85.9, you can multiply that by the sine of the angle to calculate a height of about 46 feet! Here is the trigonometry:

Height = 85.9′ * SIN (32 deg)

You can go one step farther and calculate the distance from the object with ‘distance = 85.9 * COS(32 deg)’.

Of course after all that calculating you will still need to find a location, have contingency plans for weather and so on. At StarCircleAcademy we have built some tools and put together materials to help in all these endeavors.  We teach these things in our NP111 Catching the Moon Webinar.

The Road To The Temple

Below is where we ended up. This image is from our friend and co-conspirator Andy Morris.

Lunar Eclipse over Temple by Andy Morris of PhotoshopScaresMe

Four of us plotted and schemed to get an interesting shot. Above is Andy Morris’ result.  Click the image and you can read a great article about how he created the shot using Photoshop Skills at his site: PhotoshopScaresMe.com. In fact, it’s a great article which we strongly encourage you to read. You’ll learn how he composited the images together in Photoshop as layers.

The Long Conversation to Pick a Location

Andy has more details including how alcohol played a part in the process. Mostly I, Steven, was the wet blanket explaining why the geometry was all wrong.

  • The Stanford (Hoover) Tower looks like it is shrouded in trees from the needed angle
  • Bank of Italy (formerly BofA) in SJC doesn’t work
  • The main problem with the wind turbines is that the angle to the top of them is something around 12 degrees above the horizon which is 40 moon diameters below the eclipse.
  • Here is why the GG Bridge doesn’t work…
  • This seems to be the best solution I could find: the Coit Tower…
  • Darn. It would appear the coast is out. Forecast calls for Fog from SF to HMB
  • This might make an interesting foreground (see below)… Somebody want to check if they will mind us being on their property in the wee hours?

*Ok, we lied, it was actually a 70-200mm lens with a 1.4 TC on a full frame camera, but the net is the same: 280 effective mm focal length.

Where did you go and what did you get in your planning efforts?  Post a comment and link below… we’d love to see what you came up with!

Trimming away the Excess (Photoshop)

I created a problem for myself twice and with the Total Lunar Eclipse coming in April, 2014 I suspect I’ll be creating the same problem again.  I wanted to record a time-lapse of the May 20, 2012 Annular Solar Eclipse as well as the June 5, 2012 Transit of Venus.  I used a solar filter and an Equatorial Mount to help me track the sun. Unfortunately getting a good polar alignment during daylight is beyond my skill set. Without good alignment I had to manually repoint the telescope rather frequently. It is not necessary to understand any of the gobbledygook you just read except to know that the sun was MOVING from frame to frame – see the image below.  With all that movement, a time-lapse looks like a jitterbug dance.  In fact, this artsy composite shows just how much the sun moved around in my frame – that is, all over!

Solar Art

Annular Solar Eclipse with un-centered and trimmed frames. AKA Solar Art the “dots” on the sun are large sunspots.

My friends suffered from similar problems and each of them undertook automated solutions to the problem using Photoshop or something similar.  My goal was to solve the problem in a generic way and along the way I learned some useful additional Photoshop tricks.

The Solution

I used the trim feature of Photoshop.  You can find Trim under Image -> Trim.

Trim makes note of the current value of the upper left (or lower right) pixel. It then creates a selection that includes all of the rows and columns that have the same value and inverts the selection. Finally it crops off all of the selected area into the smallest possible rectangle.

An easy way to think of this is: imagine a dark photo with a white frame around it.  By using “trim” the entire white frame will be cut away.  The same approach works if the frame border is black, blue, transparent, and so on.

But there is a catch!  There is no tolerance setting for the trim value so whatever needs to be trimmed must be an exact color match. Unfortunately this presents a problem because even in a photo of a black sky, the black areas are not uniformly black.  Some values may be 0,0,0 but others 1,2,1.  And then there is noise!  Even though you may not notice a difference between two adjacent pixels trim only operates on those pixels that have EXACTLY the same value as the upper left or lower right.

To get trim to work in a reasonable fashion, therefore, we must turn all of the almost black pixels into black (or some other color).  I feel a Photoshop trick coming on here. Our trick is to use a duplicate layer and adjust it to cause it to trim the way we want. We will discard the duplicated layer when we are done.

Trim-o-Matic

  1. Open the image.
  2. Duplicate the image as a new layer.
  3. If the duplicate layer is a smart object, convert it to a raster layer. (To convert a smart object to a Rasterized Layer, open the layer palette, right-click on the duplicate layer and select “Rasterize Layer”)
  4. On the duplicate layer use
    “Filter -> Noise -> Dust and Scratches” with Radius = 3 and Threshold = 3.
  5. Make sure your foreground color is black (x is the hot key).
  6. Use the “Fill” tool (paint bucket) with tolerance set to 40, Opacity 100%, Mode = Normal and no options checked.  Click the extreme upper left pixel. Fill will replace all of the outer area with black. You may want to click multiple times.
  7. If you have some areas that are brighter than the object, you may also want to apply a brightness and contrast adjustment.
  8. Use the trim function on the current layer with all boxes checked and “Top Left Pixel Color” selected.
  9. Trimming changes both the working layer and the original layer below it.
  10. Discard the working layer.

Here are the steps in illustrations.

Rasterizing a smart object

Rasterizing a smart object

PS_DustAndScratches

Dust and Scratches settings

gs_2014-03-23_084744

Filling with black

Filling with black (might need to repeat this)

Dust and Scratches + Fill may not be enough. Fortunately the duplicate layer can be severely adjusted if needed since it will be discarded.

 

Trimming Tool

Trimming Tool

Select Areas for Trimming

Select Areas for Trimming

 

After Trimming

After Trimming

Delete the Extra Layer

Delete the layer that was created for the sole purpose of trimming

 

What If It Crops Too Tightly or Inconsistently?

This set of steps written as an action can be used to automate the process of trimming. There are still a few remaining problems to work out. Sometimes after trimming the total horizontal or vertical pixels of the object the resulting image size will differ by one or two pixels. To solve the “dimension” problem, the simplest method is to use Image -> Canvas Size. Set the canvas to about 20 pixels larger in each direction. Select “center” (the dot in the middle next to anchor) and set the fill color to match the background.

Expand the canvas and center the image

Expand the canvas and center the trimmed image

After Trim and Canvas Size

After Trim and Canvas Size

The above procedure will work quite well for animating a sequence of sun or moon shots – except for eclipses.  Eclipses don’t work properly because an edge of the sun or moon disappears leaving no edge to properly orient with the others.

What can we do when we no longer have constant edges to align with?  Divide and conquer! Instead of trying to apply the same action to all of the images, we will can change edge we select when enlarging the canvas size. We can orient sets of images based on which part of the image remains constant.   Which edge or corner should you pick? Pick the edge that stays the same (if there is one!)  For an Annular solar eclipse, at least one of the directions will never be darkened – that’s the one to pick!  The annular eclipse sequence shows that the upper left limb and lower right limbs of the sun remain present in all of the shots.

Field Rotation

There may still be another problem: Field Rotation. If you’re thinking that perhaps this has something to do with improving crop yields on a farm, sorry to disappoint you. The Annular Solar Eclipse and the Transit of Venus were events that took place over a period of from 3 to 5 hours.  During that period the earths rotation causes the sun, moon and stars to move. It also causes them to “turn” as viewed from terra firma.  You can see this for yourself if you watch the full moon from moonrise to moonset. At moonrise make note of the orientation of the “man on the moon” and compare it with the orientation at moonset. Go ahead and watch. I’ll wait for you.

So what do you do if you have this field rotation?  Either live with it and accept that the animation won’t be entirely accurate, or you’ll have to do a much more complicated set of operations by progressively rotating the images.  That’s more than we want to tackle, so you’re on your own for that!

The Results

The Annular solar eclipse sequence. The Abstract Solar Art image at the top of this article was created from the un-centered and trimmed frames. Obviously this wasn’t perfect – in part due to clouds and shimmer in the atmosphere.

Flying Dust Monsters (and Venus, too)

Not seeing the above video? Click here to watch.

Obviously this one had some trimming errors… and nasty dust on the sensor but this is the once in a lifetime Transit of Venus.

Blobulous Revisited – Part 1

It’s pretty amazing what you can accomplish with just a little bit of effort.  Below you’ll see a star trail formed using the Blobulous technique that I described in an earlier column on Advanced Star Trail Tricks.  There are many ways to achieve this effect. The method I described in the prior article – adding the last frame using Screen or Add blending – works especially well if the skies are dark. But here, I used high ISO shots about an hour before moonrise. Because of the high ISO exposures with a soon to rise moon the sky was blue not completely dark.  Adding the last frame to the stack as described earlier will work but it makes the Milky Way blow out and the sky overbright. I wanted the Milky Way to remain noticeable.

C_072887-935+934_AFTER

Selecting Images to Work With

There are few important things to note here. The radio telescope tracks the sky and slews from location to location causing blur. Each 20 second exposure was shot at ISO 3200, f/2.8 using a 15mm fish-eye lens on a Canon 5D Mark II. I carefully picked a range of images where the start of the sequence through to the end of the sequence included only images where the dish did not move “too far”. The next four frames show how dramatically the dish moved in subsequent shots. Had I included them it would have made quite a mess.

JPG

The dish moves far in 80 seconds…

To say it clearly: looking at the individual frames is what allowed me to zero in on the specific images I planned to stack. After selecting the range of images (C_072887 to C_072935),  I stacked them using good ‘ol brightness mode stacking. You can stack using a ton of methods but our favorite, of course, is to use the Advanced Stacker+ from StarCircleAcademy.com though the free TEST Stacker can do the job, as can a variety of free tools that we describe in this article and in our Star Trails Webinar.

To create the shot below on the RIGHT you’ll need Photoshop or some equally featured program that allows layering and masking like GIMP. Even the lowly, stunted Photoshop Elements will do the trick. After doing a normal brighten mode stack, the output looks like what you see on the left.  After some image manipulation magic, we achieve the result on the right.

Before_After

Before (left) and After (right)

From BEFORE to AFTER

It would be tedious to show step by step what I did, so I will start with a “one shot” view. You’ll notice there are 9 layers that contribute to the final image.  The top – SLC-SCA – is obvious, it’s my watermark.

Results with all layers shown.

Results with all layers shown.

However you can also see the brighten mode stack (at the bottom), and a copy of that same stack with a layer mask.  If you look carefully it’s pretty obvious that the black on the mask corresponds to the upper part of the moving dish.  Sharp eyes will notice two additional blacked out parts corresponding to the other radio dishes.  Notice that above the stacked layer is a single frame: C_072934 – the next to last image from the set used in the stack. All the layers above the single frame are adjustments to correct color, white balance, hot pixels (the Heal layer), and to do some sharpening.

BlendModeLighten

The single frame (934) is blended in Lighten mode with the stack. The stack is at 36% opacity.

The essential bit of magic here is that the Brighten layer is only used at 36% opacity. 36% was chosen by eye. I slowly reduced the opacity until the Milky Way became noticeable rather than a blur and yet the star trails remained noticeable.

The image was nearly complete by painting out (excluding) the blurred stack areas using a black brush at 100% opacity with a small amount of feathering – i.e. a brush that was not 100% hard.  It’s easy to paint on the mask and watch how the blurry dish from the stack is replaced by the non-blurry single image from C_072934.  If you’re wondering why I didn’t use the final image, C_072935, it’s because it was a tiny bit blurrier than the preceding image.

The rest of the adjustments are straight forward – they were all meant to fix contrast, darken the overbright areas and then correct for the color saturation increase that occurs when you darken an area with color.

We cover complete details in the PhotoManipulation webinar series.

Here is the image obtained from the next set of exposures after the dramatic dish move. This image used the “Streaks” stacking method available in the Advanced Stacker, but is otherwise identical in creation.

C_072941-67

For yet one more take – using yet another Advanced Stacker Mode (long streaks), there is this.

Long Streak Runnin'

In the next column I’ll show all the steps I took to produce the first image on this page.

 

More Star Stacking Tricks: Use the Bridge

Red Rock Cometary [C_009865-76+79brC]
Perhaps the most popular thing we’ve done at StarCircleAcademy is to provide a stacking action for Photoshop.  What can you do with it? Alas, you can’t use it to end hunger, or create world peace. However, the action allows you to automate the task of creating star trails from individual images. You can create the trails from JPGs, TIFFs, or even RAW files in fact from any file that Photoshop is able to load.

You have to capture the images in the first place, so we humbly suggest you begin with understanding How to expose, how to shoot, what settings to use, and even what to consider to create a more compelling image. Or if this is all new, start at the beginning and learn about night exposures and the kinds of star shots that are possible.

Beacon [C_069244-92]

Curious about the circle? It is formed by shooting north in the Northern latitudes.

If you have already used the Stacking Action as we previously described you are all set to put on your big-boy pants and do more advanced stacking tricks using, of all things, the lowly Adobe Bridge. Bridge is a lighter weight version of Lightroom (sort of) and it comes with Photoshop and other Adobe products for no extra fee.

Why would you want to use Adobe Bridge as the front end?

  1. Bridge allows you to do mass corrections to raw files before they are used by Photoshop. Anything that Adobe Camera Raw can do, Bridge can do to a number of files all at once.
  2. Bridge has an operation called, uhm, “Stacking” which is a way to group images together in a nice memorable way.
  3. Bridge allows you to SEE and select specific files to operate upon – unlike the “folder” method you may have been using previously.
  4. Bridge is relatively lightweight and doesn’t need preloading as Lightroom does.

It is slightly more complicated to use Bridge for stacking, but do not worry. We will make it as simple as possible.

Suppose you have a number of files to stack and they are located in a single directory along with a number of files that you don’t want to stack. Below I’ve navigated to a big directory full of CR2 (Canon Raw Files) and I’ve used the Ctl Key to select the first four images of a star trail sequence.

AdobeBridgeCR2.bmp

As is my customary practice I used a number of colors and lighting methods to begin my star trail and I can tell I don’t like C_066715 or C_066716 (which is too green).  So instead I’ll start with image C_066717.CR2.  Scanning forward, the clouds start to become a problem by image C_066739 so I have picked images 717 through 738.  I won’t be describing how to use it here, but if you look on the lower left side of the Adobe Bridge screen there is a “Filter” window where you can choose images based on ISO, exposure time, keywords, etc.  That may come in handy if you want to only select the 24 second exposures in a sequence.

Getting back to my quest… Though I don’t have to, I will mark the images I’ve selected as a stack.  NOTE: Images can only be in one stack.

AdobeBridgeGroupAsStack.bmp

And then I will select ONE of the images to decide what “develop settings” to apply. That is, what to do with the image before stacking it.

AdobeStackSelect.bmpHere is where I’ll give you a hint to keep you from banging your head on the wall. If you click the “image” of the stack you will only select the first image.  However if you click on the count of images (where the yellow arrow points) it will select the whole stack. Here I’m selecting only the first image by double clicking it. My primary interest is getting the color balance about right.  There are lots of ways to adjust the white balance including using the white balance tool or adjusting the color temperature. This is also a potential departure point because there are two ways I might want to address my set of images:

  • I may want a nice clean star trail with gaps as small as possible, OR
  • I may want to produce individual frames for an animation or timelapse.

ACRSettingsSave.bmp

If my goal is a star trail, then I will set all of the sliders to zero, set noise reduction to zero, and set the curve to “linear”. About the only thing I’m likely to do is vignette correction – leave lens correction for later, it may cause bad things. In fact, I have created an ACR preset to do exactly that I call it “linear”.  If, however, my goal is a timelapse, I’ll try to beautify the image as much as possible including sharpening, noise reduction, and exposure corrections.

For this example, I am taking the beauty route. I made the adjustments I want and saved the settings as a preset called “TronaStack”.  Next I will apply those settings to all of the images in my stack.  What really happens is that Adobe Bridge creates sidecar (XMP) files for each of the images and re-renders the file in Bridge to approximate the changes.

Mass Applying Settings

AdobeBridgeDevelopSettings.bmp

With all the raw settings applied, I want to do the stacking operations exactly as described here – but we will be using “Bridge” as the source.

AdobeBridgeToolsPhotoshopBatch.bmp

NOTE: Your menu might look a little different especially if you haven’t installed Dr. Brown’s Services.  As you might have guessed, using “Photoshop -> Batch” invokes Photoshop.  The next screen you see will look familiar except you’ll notice the Source is Bridge.

PhotoshopBatch.bmp

As the instructions state, you should run the “Do This First” operation. It creates a properly sized black background using the dimensions of the first photo in the stack.  You then re-run it with the operation you want. Here I’m using the comet stacking option of the Advanced Stacker.  It is important to make note of the output options. If you don’t override them, the intermediate result will be written over itself repeatedly.

PhotoshopBatchOverides.bmp

The Advanced StarCircleAcademy Stacking actions will create “Comet_” documents but you’ll need to add a unique number as shown above. If you don’t like the base name, you can substitute whatever you like instead of “Document Name” above. E.g. “MySequence”. I often set the starting serial number to the first image number in the stack since I try to make sure I uniquely number every image I capture.

After stacking the output appears in the “C:\tmp\StackTest” folder like this:

BridgeResults.bmp

What is especially cool is that I’ve directly stacked the RAW files into “comets” for an animated sequence.  I could then create a timelapse out of those images if I wish.  Of course there is one hitch. The huge files are too large to easily create a meaningful timelapse. It would be so much nicer if all the images were straightened, downsized and cropped to a specific format like 1920 x 1080 (HD) or 800 x 600. That is a topic for another column, but Adobe Camera Raw can do the trick. And it’s also possible to do the deed with the Advanced Stacking action.

If you’re wondering how you can get your hands on the Advanced Stacking Action with comets and more see the Store.

Can I Use Mini Bridge?

Well, yes, you can, though Mini Bridge only works if Bridge is open so it’s not really very mini!

MiniBridgeStacking