Making scale bars with no calculations (OT-->diffraction)

A forum to ask questions, post setups, and generally discuss anything having to do with photomacrography and photomicroscopy.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

rjlittlefield
Site Admin
Posts: 21444
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Making scale bars with no calculations (OT-->diffraction)

Post by rjlittlefield »

Recent discussions about scale bars have finally prompted me to write up how I make mine.

I seldom use exactly the same lens setup twice, so all my scale bars are different. And despite my fondness for math, I avoid calculations whenever possible because it's too easy to mess them up.

Turns out, it's pretty easy to make custom scale bars with only very simple calculations, often none at all. Just make a reference image by shooting a scale using the same optical setup as for your real subject. Use the selection tool in your photo editor to measure how many pixels there are in some convenient scale unit of the reference, then draw a scale bar that many pixels long in your subject image.

If your photo editor supports layers (most do), then it's particularly convenient to combine the reference scale and the subject into a single multi-layer image. That way the reference scale sticks right with the subject as you crop, resize, etc., making it easy to defer the final selection of scale bar thickness and length until you're ready to do final composition.

Here's an example:
- Shoot the subject
- Remove the subject, shoot a scale with the same optics
- Overlay the scale and the subject
- Select and fill a scale bar
- Add text giving the physical length of the bar
- Done!

Image

Image

Most of the jpeg's that I post are saved from a Photoshop file that is layered like this, including a reference scale. It takes some extra space on my disk, but it gives me one less thing to think about. That seems like a good tradeoff. :D

--Rik

Edit: changed title to reflect topic shift.
Last edited by rjlittlefield on Sun Jan 20, 2008 11:30 pm, edited 2 times in total.

microcollector
Posts: 261
Joined: Wed Mar 14, 2007 7:19 pm
Location: Port Orchard, Washington

Post by microcollector »

Rik,

That is very similar to what I do with my microscope. I photographed a metric scale at each of the numbered zoom increments for the zoom objective. I would than draw in a scale bar equal to 1/4 the width of the image. Now, with the live view feature of the D300, it is even easier and allows for shooting between the numbered increments with ease.

Doug
micro minerals - the the unseen beauty of the mineral kingdom
Canon T5i with Canon 70 - 200 mm f4L zoom as tube lens set at 200mm, StacK Shot rail, and Mitutoyo 5X or 10X M plan apo objectives.

My Mindat Mineral Photos
http://www.mindat.org/user-362.html#2

rjlittlefield
Site Admin
Posts: 21444
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Doug, I think I understand about photographing a metric scale at marked positions of the zoom objective. That's sort of like shooting a scale with each of several different objectives on a standard microscope.

But I don't understand how live view makes it easier to shoot between the numbered increments. I have essentially the same situation using the zoom on my SD700 IS point-and-shoot, and I don't get any benefit from the real-time display except for framing and focusing. With that camera, I put in scale bars using a slightly different approach, which I haven't taken time to document yet.

Can you say a few more words about how live view helps out with your situation?

--Rik

microcollector
Posts: 261
Joined: Wed Mar 14, 2007 7:19 pm
Location: Port Orchard, Washington

Post by microcollector »

Rik,

When I started shooting through the scope with a DSLR it was much easier to just use the numbered zoom increments and make a cheat sheet for the field of view seen.

With live view I can set the zoom anywhere and get a dimension off the scale. It saves taking a bunch off photos of the scale at intermediate settings between the numbered zoom increments. I see on my computer monitor what the camera is seeing as the mirror is moved to the locked up position. It also greatly helps in setting the focal point for starting a series of shots for stacking. Much better than looking through the view finder or the LCD monitor on the camera. The 24 inch computer monitor is much better.

When I used a point and shoot camera on the scope with the output going to a TV it did not matter. I would shoot the photo and than move the scale from my X - Y stage into view and determine the field of view.

Doug
micro minerals - the the unseen beauty of the mineral kingdom
Canon T5i with Canon 70 - 200 mm f4L zoom as tube lens set at 200mm, StacK Shot rail, and Mitutoyo 5X or 10X M plan apo objectives.

My Mindat Mineral Photos
http://www.mindat.org/user-362.html#2

rjlittlefield
Site Admin
Posts: 21444
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Doug,

I've read your posting about a dozen times now, and I'm still not sure I understand.

Let me try feeding back to you what I think I'm hearing.

With your point-and-shoot, you used to photograph the subject, then immediately photograph a scale at the same zoom, no matter what that happened to be. Direct overlay of the two images, shot at (almost) the same time with no changes to the optics, gave you a scale bar.

But when you got your old DSLR, it became more difficult to shoot photographs at all. So instead of shooting a new scale image every time, you made a library of photographs of the scale at marked zoom settings. Then for real subjects, you carefully adjusted the zoom to a setting where you had a scale image in your library. You shot the subject at that setting, then overlayed the new subject image with a scale image from your library, being careful to grab the correct scale image to match the zoom setting that you used for the subject.

Now that your new DSLR has live view, it is again easy to shoot photographs, so you have gone back to shooting both subject and scale at (almost) the same time, with exactly the same optics settings no matter what they happen to be.

Do I have that correct? If not, what have I heard wrong?

--Rik

microcollector
Posts: 261
Joined: Wed Mar 14, 2007 7:19 pm
Location: Port Orchard, Washington

Post by microcollector »

Rik,

You have pretty much figured it out. The only thing I have not done is to make image overlays in Photo Shop. I just draw in the scale bar based on the field of view and use 1/4 of that for the scale bar. I should make the overlays as it would be easier.

As an example, if the field of view is 4 mm and the image width is 2000 pixels, than the scale bar would be 500 pixels long and represent 1 mm.

The smallest field of view I get with the D300 or the D50 is 2 mm so I use the appropriate number of pixels to get a .5 mm scale bar.

The scale bars are added prior to any cropping of the image.

Doug
micro minerals - the the unseen beauty of the mineral kingdom
Canon T5i with Canon 70 - 200 mm f4L zoom as tube lens set at 200mm, StacK Shot rail, and Mitutoyo 5X or 10X M plan apo objectives.

My Mindat Mineral Photos
http://www.mindat.org/user-362.html#2

rjlittlefield
Site Admin
Posts: 21444
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Doug, thanks for the clarification.

Let me be clear that I do not make a library of "overlays". When I say "overlay", all I mean is to put the scale bar into a separate layer.

The reason that I use a separate layer for the scale bar is that it simplifies final composition. It's hard for me to predict exactly where the scale bar should go, in order to look best. I have to try it in various places and see how it looks. When the scale bar is drawn into a separate layer, I can move it around easily without affecting the underlying image.

Usually what I do is to fly around the copyright text, the scale bar, and the scale text, until they all look good with respect to each other and to the underlying image. Then often there is some sharp detail in the underlying image that interferes with reading the text. In that case I will make a copy of the image layer, select a feathered region around the text & scale bar, and Filter | Blur | Gaussian Blur the image in that region so that it does not interfere with the text. This is a last-minute operation, and again, doing it on a separate copy of the image data makes it easy to revise if I change my mind, which happens just often enough to make it worth the disk space to do it this way.

--Rik

microcollector
Posts: 261
Joined: Wed Mar 14, 2007 7:19 pm
Location: Port Orchard, Washington

Post by microcollector »

Rik,

An old friend of mine had unique scale bars for his photos. Back in the days of film only, he would make copper bars ranging in length down to .1 mm. He was a very accomplished machinist and had the tools to do this at home. These were positioned in the field of view close to the crystals he was photographing.

He and his son also built a 9 foot extension tube for close up mineral photography. His illumination was a couple of old 35 mm slide projectors.

Doug
micro minerals - the the unseen beauty of the mineral kingdom
Canon T5i with Canon 70 - 200 mm f4L zoom as tube lens set at 200mm, StacK Shot rail, and Mitutoyo 5X or 10X M plan apo objectives.

My Mindat Mineral Photos
http://www.mindat.org/user-362.html#2

rjlittlefield
Site Admin
Posts: 21444
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

microcollector wrote:He and his son also built a 9 foot extension tube for close up mineral photography. His illumination was a couple of old 35 mm slide projectors.
9 feet?! What size images were they projecting onto, and using what lenses?

--Rik

microcollector
Posts: 261
Joined: Wed Mar 14, 2007 7:19 pm
Location: Port Orchard, Washington

Post by microcollector »

Rik,

They were trying for sub millimeter crystals and were using old movie camera lenses. It was mostly an experiment as it was very difficult to get a good image.

Doug
micro minerals - the the unseen beauty of the mineral kingdom
Canon T5i with Canon 70 - 200 mm f4L zoom as tube lens set at 200mm, StacK Shot rail, and Mitutoyo 5X or 10X M plan apo objectives.

My Mindat Mineral Photos
http://www.mindat.org/user-362.html#2

rjlittlefield
Site Admin
Posts: 21444
Joined: Tue Aug 01, 2006 8:34 am
Location: Richland, Washington State, USA
Contact:

Post by rjlittlefield »

Yeah, sub-millimeter is tough, no matter how you cut it. Confusing, too. For my personal anecdote, take a look at the fourth posting in this topic, or this link will take you right to it.

--Rik

Graham Stabler
Posts: 209
Joined: Thu Dec 20, 2007 11:22 am
Location: Swindon, UK

Post by Graham Stabler »

I've done similar things in other fields, you give up on something only to return to it when you are older and wiser and find that you can make it work, a bitter-sweet feeling. As a kid I had all the time in the world and no know how, now it is the other way around (well not quite all the know how in the world but more.)

But isn't the loss of resolution when you stop down more to do with spatial filtering than diffraction? The aperture removes the plane waves at high angles from the images formed and thus high spatial frequencies cannot be represented, the result being a blurred image.

Graham

Epidic
Posts: 137
Joined: Fri Aug 04, 2006 10:06 pm
Location: Maine

Post by Epidic »

Graham Stabler wrote:But isn't the loss of resolution when you stop down more to do with spatial filtering than diffraction? The aperture removes the plane waves at high angles from the images formed and thus high spatial frequencies cannot be represented, the result being a blurred image.

Graham
No, it is diffraction. There is no spatial filtering going on. It is simply the interaction of the aperture with light.
Will

Graham Stabler
Posts: 209
Joined: Thu Dec 20, 2007 11:22 am
Location: Swindon, UK

Post by Graham Stabler »

I might of got the wrong end of the stick when it comes to where diffraction is considered the main issue but as far as I know the spot size in an image is proportional the the NA of the imaging system (1/f), if you stop down then you reduce the NA and the resolution but this is just the manifestation of the reduction in the angular frequency spectrum incident on the imaging plane.

When the aperture is really small then perhaps diffraction is an issue but the general loss in resolution with reducing aperture is due to loss of information or filtering, if you loose light so you loose information and that is a form of filtering.

Graham

gpmatthews
Posts: 1040
Joined: Thu Aug 03, 2006 10:54 am
Location: Horsham, W. Sussex, UK
Contact:

Post by gpmatthews »

Let's try a crude plain language explanation of resolution and the effect of aperture:

All the rays of light scattered (diffracted) by an object contain information about the object. The more information you collect, the better the resolution (in this sense, resolution is information). It follows that the wider the aperture, the better the resolution because you collect more of the oblique rays and hence more information. The closer you can get, the better the resolution because you stand to collect a wider cone of light. This is why microscopists use NA for lenses, because it takes account of the angle of the cone of light that the lens can collect and this relates directly to resolution.

If you make the aperture very small indeed, then you will collect very little of the information in the rays diffracted by the object, hence the resolution will be poor. You may also introduce diffraction effects from the very small aperture and these will further degrade the image.
Graham

Though we lean upon the same balustrade, the colours of the mountain are different.

Post Reply Previous topicNext topic