Thursday, May 25, 2017

Scale Bars

I have long wanted to put scale bars on pictures. They just make them seem more scientific. When it comes to more difficult species to ID they can even be pretty important in being able to get an ID from a photo. With a scale bar it is even possible to put the picture in photoshop, set the scale, and measure out lengths of various details such as antenna length in the photos.

Getting them on images with a macro lens is a bit of a pain though. The scale changes as the image focus changes. In theory it should be possible to take the information in the photo about the lens focus at the time of the photo and convert it to a scale, in practice it is difficult though. At a minimum it takes a bit of scripting, and from what I have read the accuracy of the lenses is not good enough to get particularly accurate.

With a microscope objective it is comparatively easy. As I have it set up my Mitutoyo 5X Objective is either at 3X or 5X magnification. So, all I need do is figure out the dimensions of one pixel in each scenario and make Photoshop add a scale bar. To that end I bought a microscope calibration slide and imaged it at 3X and 5X.

After doing this, I realized that I take a majority of my photos of insects with 1X magnification by putting the macro lens at minimum focus. By taking a photo of the calibration slide at 1X magnification, it is possible to add a scale bar to any photo which was taken at minimum focus distance. Technically this would be possible at any magnification, but 1X magnification is the only magnification I can quickly and accurately reproduce since it is the minimum focus distance.

That was the easy part. Even once I figured out the overall idea, turning this into a practical method took some time. First, I needed to measure the scale bar in Photoshop by going to Image > Analysis > Ruler Tool . That gave me the width of the scale bar in pixels. With the length of the 1 mm scale in pixels I was able to calculate the width of a single pixel in microns.

I was then able to set the scale such that I could measure any dimension in correct microns by going to Image > Analysis > Set Measurement Scale > Custom and setting it so one pixel was the correct number of microns. Then by going to Image > Analysis > Place Scale Marker I could make a 1mm scale bar. Unfortunately it gave a scale bar with a ridiculous number of significant digits and units in microns. Luckily with the text edit I was able to set it to 1mm.

Now I had my first scale bar!

After making about ten of these, I realized that this was just way too much work to fit into my workflow. It needed to be automated!

First I read up on Photoshop actions. By making a new action and by pressing record when I made the scale bar I was able to turn the process of making a scale bar into pushing one button. Then I made another action which recorded the process of saving as a jpg. Now I just needed to load the photo into photoshop and hit two buttons and the whole process would just work.

Still too much work.  Then I learned that by going to File > Automate >  Batch I could run the action to add a scale bar to every photo which is open. So now all I do is load all the files to get a scale bar, tell it to put a scale bar on every photo then tell it to save every photo. I will have to turn it all into one action one of these days, but it is finally practical to insert into my workflow.

If you are trying this there are a few traps to watch out for. First, the pixel size must be unchanged since the photo was taken. If the photo was compressed when you exported from Lightroom, or saved in some other software then all your scale bars will be wrong. Also, it is easy to put a photo into Photoshop which was not at 1X magnification. Any of those photos will have a wrong scale bar.

Sunday, April 2, 2017

Attempts at aphid identification

Since getting a focus stacking setup and starting to take on identification of some really obscure species I had some luck and some failure. It really did lower my productivity, as in a typical post is more than an hour work for sample preparation, photography, and stacking in Zerene Stacker.
If you have interest in trying to build a similar focus stacking system, I described it in detail in the amazon review for the Mitutoyo 5X microscope objective:

I was planning to do one big post of everything I learned since taking this on, but it is pretty clear than aphids deserve their own post.

 Aphids are a tough group to identify. In many cases my 5X magnification is not enough, and in extreme cases I was told a 200X phase contrast microscope is absolutely necessary. Still, there are many species which can be identified from a good photo and focus stacking aphids on a slide increases that number substantially.

The first step is collecting some adult aphids, and putting them on a slide. For this I use some combination of the technique described in the USDA video on slide mounting, and the instructions which came with a slide mounting kit I bought to mount the aphids in Euparal
  1. Put the aphids in a ~10% sodium hydroxide solution for 12-24 hours. I am not real scientific here, and just dump some crystals in until it looks like about 10%. Unfortunately this ruined a couple when I got the concentration a bit high but I am getting a good feel for it. For a supply of sodium hydroxide, I found that some drain cleaner works
  2. Squish the aphids as shown in the USDA video
  3. Put the aphids in specimen clearing solution, and heat them to 120-150 degrees F for a few hours until they look clear.
  4. Run them a few minutes each in 70% alcohol, 95% alcohol, and 99% isopropyl alcohol.
  5. Put a drop of Euparal on a slide and place 3-5 aphids on the slide bottom up. After some usually futile attempts to position such that all limbs are visible, put on a cover slip.
It would be best to heat the slides to dry them, but I just let them sit a day or two. It is clear it takes a couple weeks to completely dry them out. If I get really serious about this, I might switch to Canada Balsam, following this procedure. The advantage there is that the slides should last centuries rather than the years to decades Euparal is likely to survive. At the moment that advantage doesn't mean much to me, but if I end up with a big enough collection it might.

After drying the slides I use my microscope setup to photograph with as much magnification as my setup can do.
  1. Full body
  2. Third antenna segment
  1. Full body
  2. Third antenna segment
  3. Head, dorsal and ventral focus
  4. Apex of rostrum
  5.  Hind Tarsus
  6.  Abdomen, including cornicles and cauda, dorsal focus
  7.  Cornicle, especially apical 1/4 or so.
  8. Cauda, especially setae number and placement
Typically with the magnification my 5X objective can produce, I can get all those items into perhaps four to six photos.

Some examples of aphids rarely reported on iNaturalist I have been able to identify since taking this on:
Metopolophium dirhodum
Myzus persicae
Macrosiphum euphorbiae
Hysteroneura setariae
Neotoxoptera formosana
Aphis craccivora
Wahlgreniella nervata
Sitobion fragariae
Eulachnus rileyi

A couple of those are likely to get pushed back to genus when someone points out a look-alike, but most of them are correct.

Saturday, December 31, 2016

Stacking Photos

Got a Stackshot and have been trying to focus stack more seriously. Even with the Stackshot it is extremely tedious but I am starting to get it down.

First I take a stack of photos every 0.1mm. Right now I am using my FE 90 mm macro lens and a  Raynox 250 diopter. However it is not quite enough magnification so I will probably figure out a way to get to at least 4X, any maybe go all the way to 10X with a microscope objective.

The photos all look like this photo of the head of a fruit fly with just a tiny depth of field:

With a bunch of photos, 34 in this case, I can use Zerene stacker to make a composite image. It takes a bit of retouching, but so far it seems a lot more user friendly than Photoshop for stacking.

That gives me an image like this:

When I get a reasonable photo, I sometimes take a few more minutes to remove the point in Photoshop. This is enough trouble I usually don't bother but it is necessary for a photo that is not ugly:

The largest disadvantage I have found of this method is the time involved. Even with the Stackshot automating the photography process it takes quite a while to stack and retouch. Also, it is very difficult on living insects. That adds a lot of prep time for trying to put the insect on a pin or point. That is not something I have experience with so I have turned more than a few into a mess.

Sometimes I have got it to work with live insects. It requires a lot of patience though as you must wait until it stays still for 20 seconds or so to get a decent stack. The results are usually much more interesting with living insects though:

Here is a ~2mm minute pirate bug. It is a shot that I really would have not been able to get with any other method:

Saturday, November 26, 2016

Next Three Years of Photography Gear

Now that I have a Sony a6300, Sony FE 90mm Macro Lens, and Sony Twin Flash I have about the best walk-around setup available to take photos of insects. Unfortunately hobbies never stop finding ways to keep me poor. Here is a list of what I expect to piece together over the next couple years:

A setup to take microscopic images. The macro setup I have is really intended for dandelions not leafhoppers. To get identifiable images of small insects often takes something more. At first I thought a microscope was the way to go, but it seems like a 10X microscope objective can simply be mounted on the camera. To make this a reasonable option it is best to get a macro tray like the StackShot automated macro rail.

An underwater setup. It seems like the Ikelite system is the best compromise of price and applicability. This would consist of a Ikelite housing for an A6300, a flat port, a pair of flashes. I will probably get a FE 50mm macro lens rather than my 90mm to reduce the value of equipment at risk in the water.

A telephoto lens. Probably the Sony FE 70-300 since it has image stabilization and is native to Sony E mount. If by some miracle they come out with a FE version of the A Mount 70-400 that might be better. This was high on the list when I first got the camera, but as I have learned to use the macro lens bird photography has started to seem less interesting compared to macro and underwater.

Sunday, October 9, 2016

Houston Parks

Got to spend a little time in parks near Houston. The most memorable part of it was the reptiles. When I went to Big Bend State Park I thought I might see an Alligator. I didn't expect the hard thing to not be finding them, but avoiding them. Was walking along the trail, when all of a sudden one appeared about twenty feet in front of me.

It was quite a shock to me that I didn't notice him until I was so close despite his being in an obvious location. Decided not to try and sneak past him since it was water on each side of the trail. So I took another trail for a half hour or so and came back.

When I got back, I didn't see him. Since he wasn't there I proceeded to continue on the trail This time I was paying attention though since he snuck up on me before. All of a sudden, I realized that he was right next to the trail only about six feet away from me:

He never moved, but I sure jumped!

Went on to see a total of around ten alligators. None were larger than perhaps six feet, but they were still pretty intimidating.

Other than that I ran into two species of water snake and managed to get really close to a green anole:

Sunday, September 25, 2016

Parks North of Pittsburgh

Managed to get some time to explore parks north of Pittsburgh. This area seemed to be only lightly explored by iNaturalist users so I got a bit carried away and ended up with 332 iNaturalist observations. While I haven't added it up, when all is said and done it should work out to at least fifty species I had never seen.

Right before the trip, I found a good deal for a Sony Macro Twin Flash. This made a big difference for taking photos of insects, although for plants the results were more mixed. The diffuser it comes with will need to be replaced since it still leaves lots of bright spots on reflective insects but other than that it seems to greatly improve images over the Sigma Ring Flash I was using before.

The lady beetle in the web particularly surprised me. Apparently that is not a lady beetle, but a handsome fungus beetle which tries to look like a lady beetle as a way to make predators believe it is poisonous.

Sunday, July 10, 2016

Interesting Insects

 Had good luck finding interesting insects this weekend. The first one made observation of the day on iNaturalist. It is a robberfly eating a bee which I found about six feet from my back door:

 The second observation is even more interesting if it is what I think it is. As far as I can tell, this is a party of slave raiding ants stealing larva from a neighboring ant colony! These are odd species of ants which steal larva from a different species of ant, then make them act as workers for the colony.

According to AntWiki:
Only a few raids have been observed, but from unpublished observations by Les Greenberg (U. C. Riverside, pers. comm.) and Geoff Trager (then a student at UC Santa Barbara, pers. comm.), we know that the raids take place in early to mid summer, in the latter half of the afternoon.
 Which exactly matches the timing I found these.