Adding scale bars and understanding 100 percent crops

Just bought that first macro lens? Post here to get helpful feedback and answers to any questions you might have.

Moderators: rjlittlefield, ChrisR, Chris S., Pau

Koorosh
Posts: 215
Joined: Fri Jun 20, 2014 3:39 pm
Location: London

Adding scale bars and understanding 100 percent crops

Post by Koorosh »

Hi everyone,

I am really trying to work out how to add a scale that makes any sense, particularly when having cropped an image. I vaguely recall using it before based on actual magnification of the objective (accounting for the Raynox or other tube lens change) and some division of pixels? If so, also, how do I translate that into an actual scale bar? How can I calculate that scale bar and how much it represents?

On to the other part, and that's when you guys do a 100% crop of an image. Firstly, how do you do a 100% crop, and secondly, how do you get the same place on an image when doing corner and centre crops etc?
Apologies if these are slightly moronic questions.

Pau
Site Admin
Posts: 6052
Joined: Wed Jan 20, 2010 8:57 am
Location: Valencia, Spain

Post by Pau »

For the first question, take a look at

-How to directly measure magnification:
http://www.photomacrography.net/forum/v ... 713#135713
-How to draw scale bars:
http://www.photomacrography.net/forum/v ... 3506#23506

About 100% crops it's easily done in an image processing software. In Photoshop, just set the view at 100% and crop the zone you want (better copy it and paste it in a new image file). I you want an exact output size, use the image menu and set the desired canvas size in pixels (avoid cm...) it allows directly to choose the center, upper center, upper left corner..and so. You can also combine both approaches for a more custom crop.
With other software you may have similar options.
Pau

Charles Krebs
Posts: 5865
Joined: Tue Aug 01, 2006 8:02 pm
Location: Issaquah, WA USA
Contact:

Post by Charles Krebs »

There is more discussion here:

http://www.photomacrography.net/forum/v ... .php?t=879
http://www.photomacrography.net/forum/v ... .php?t=906
The above links may are intended for a microscope user, but might still be helpful.

If you are using a consistent set-up with the same camera it is quite easy. A one time calibration.

First you need to know the actual physical size of the camera sensor (x-axis is usually used) and the number of pixels along that axis. Next, by photographing a "rule", you determine the the actual magnification (on camera senor) that you are recording.

Once you have done this you then have a relationship of "length/pixel". As long as you place your scale bar before you resize the image, this relationship holds true. (Cropping doesn't change it... re-sizing does).

Quick example...

A camera has a sensor that is 22.2mm wide and has 3456 pixels across that dimension. When I shoot a test shot (of rule) I record 2.2mm (of subject) across that sensor width. My magnification on sensor is 22.2/2.2 = 10X

For a "length/pixel" relationship we have 2.2mm/3456 = 0.00063657 (mm/pixel). At these magnifications it is best to think in terms of microns rather than mm, so multiply it by 1000. For this set-up you have a relationship of:

0.64 micron per pixel

As long as you don't change camera or optics this remains a constant relationship for the set-up. You only need to run through this procedure one time. It is then a simple matter to use this value to determine the length of the desired scale bar. (And you can also use it to measure the size of objects in your picture).

Example:
A scale bar that designate 500 microns (0.5mm) would be 500 x 0.64 = 320 pixels long


BTW... a MM scale might be a bit too crude if you really want high accuracy at magnifications over about 5X. High end "certified" calibration slides are frightfully expensive, but fortunately you can get one that is more than adequate for most purposes here for about $10 if you search Ebay for "microscope stage micrometer" or "microscope calibration slide".

Koorosh
Posts: 215
Joined: Fri Jun 20, 2014 3:39 pm
Location: London

Post by Koorosh »

I have just read those posts- thank you very much!

As for the 100% crops, I am still a little hazy as to normalising the exact spots of an image when comparing objectives for example. I have photoshop if that helps.

So what is relay magnification? And so that is why calibrating is necessary for proper magnification?

Chris S.
Site Admin
Posts: 4042
Joined: Sun Apr 05, 2009 9:55 pm
Location: Ohio, USA

Post by Chris S. »

Koorosh wrote:As for the 100% crops, I am still a little hazy as to normalising the exact spots of an image when comparing objectives for example. I have photoshop if that helps.
I compare objectives rather frequently. The approach I use is to place images from the different objectives as individual layers within a single Photoshop file. It's usually necessary to move some of the layers slightly for perfect alignment. (To facilitate this, I may temporarily drop a layer's opacity to 50 percent, or change its blending mode to "difference.")

Once these layers are aligned, it's easy to flash between images for comparison, which permits very sensitive comparison (my main reason for assembling such files). But it also permits 100 percent (or other) crops to be made from precisely the same place for the individual layers.

--Chris

Koorosh
Posts: 215
Joined: Fri Jun 20, 2014 3:39 pm
Location: London

Post by Koorosh »

Ah that's a brilliant method for comparison! Thank you Chris, now I know :)

One final question: so I borrowed a micrometer earlier, which has measures in tenths of a millimetre. It didn't fit across the screen, so I took care to align it as straight as possible for each shot at each magnification, then aligned and cloned the measure across the entire x axis. I now have what I think are the proper calculations based on Charle's excellent work-through, and now I am stuck at the final hurdle. How do I draw a line of a specific pixel number? I can work out ways of doing it based on some inorganic method of creating a new file size of desired pixel width, drawing a line, then copying and pasting to the original image, but is there a different, less obscure method?

ChrisR
Site Admin
Posts: 8668
Joined: Sat Mar 14, 2009 3:58 am
Location: Near London, UK

Post by ChrisR »

Several photoshop tools help.

Use the X-Y pixels borders (rulers).
You can drag the origin to a start point.
You can set a Grid
You can Edit>View>Snap to help
Go to Edit> Preferences and see Guides, and Grid
Click and Drag new reference lines off the rulers, drawing between them, the line ends will "snap".

The Info panel will tell you how long your line is on each axis.

Best to have a play.

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

Post by rjlittlefield »

Using Photoshop, I would just open the Info window, set it to show pixel counts, then select a thin rectangle of the proper length, and fill.

See http://www.photomacrography.net/forum/v ... php?t=4030, second image, for screen appearance.

The overall method shown there is different (no numbers used), but the drawing of the scale bar would be the same.

--Rik

Koorosh
Posts: 215
Joined: Fri Jun 20, 2014 3:39 pm
Location: London

Post by Koorosh »

Excellent, thank you! Next step: high level editing expertise. I'll start another thread on that though. Apologies :)

Chris S.
Site Admin
Posts: 4042
Joined: Sun Apr 05, 2009 9:55 pm
Location: Ohio, USA

Post by Chris S. »

Koorosh wrote:Next step: high level editing expertise. I'll start another thread on that though. Apologies :)
Koorosh, no need to apologize! What you are looking to do is central to what our community is all about. :D

In addition to your pending thread, you might want to check out the Photoshop training videos by various teachers at Lynda.com, many of which are excellent. (Membership there has a price, but you may find it worth the fee, at least for a few months of concentrated study. And when last I looked, it was possible to sample the service, without cost, before becoming a paying member.) Or you might check your local library for a set of Photoshop training DVDs (which also exist from a variety of teachers). Quite a few years ago, a friend lent me his set. I was already a comfortable Photoshop user, but the DVD lessons left me wide-eyed at the number of useful tricks I didn't know, even for tools I was using daily.

Conveniently, these forms of instruction are divided into short segments of a few minutes each, so it's easy to digest one or two segments per day, with no obligation to study areas of Photoshop that don't have immediate value to you.

This said, such training materials take on a form I think of as "capability push" ("Here are things that Photoshop can do for you!") But what many photographers want more urgently is what I think of as "need pull" ("How do I make the image I just shot look great?") While a broad, thorough grounding in Photoshop post-processing would answer this question, the typical photographer needs to have an answer quickly--not after months of training.) So perusal of "need pull" sources is also important and useful.

For "need pull" learning, your proposed thread will probably work well. Additionally, I've also found it helpful to watch over the shoulders of other photographers as they do post processing--either in person, or by watching video recordings made as they work (many such are on Youtube). It's notable how many different ways exist to accomplish common tasks in Photoshop. Sharpening is a good example--ask four people how to sharpen in Photoshop, and you'll get five opinions.

When I look over someone else's shoulder, I often see this person doing things differently from the way I do them. Sometimes, the other person's way strikes me as better, and I adopt it; other times, I think it worse, and leave it alone. Often it's just different, neither better nor worse.

Solid training is probably a mixture of both approaches--need pull for the immediate questions, and capability push for general knowledge that may be applicable later.

Cheers,

--Chris S.

Koorosh
Posts: 215
Joined: Fri Jun 20, 2014 3:39 pm
Location: London

Post by Koorosh »

Yes absolutely- I stumbled across another method of sharpening the other day when watching a guy do a video talk through. The number of layers opened to perform subtle changes was also quite overwhelming.

Ultimately learning the program to a better standard is going to be on my aims list, and it is astonishing how much you can do with it!

I think my current concerns are of cleaning up chromatic aberrations in Jpeg files, and the other significant issue I have, probably more than anything, is making backgrounds look OK.

I had a wasp image that I was compiling for a future book, and my friend who it's for is very particular, so the wings were removed to allow a decent stack of body and wings. Unfortunately, because of the size and because I wanted to get the best resolution I could with my kit, it took something like 4 or 5 separate stacks because lighting for one region was bad for another/ rotation of the gaster needed straightening etc. Not including the imaging, it took me 18 hours +, because I found no quick method to mask the relevant parts and delete the undesirable background. The only good method for a nice edge was manually rubbing out around hairs etc.

I am sure a method must exist which is very precise and time saving, but I have yet to find it!

My backgrounds are also often a nuisance, and would often like to change it entirely, but I don't know a good method for the same reason as the above.

I'm comfortable with cloning at least :)

Post Reply Previous topicNext topic