If you’ve spent much time looking through a microscope, you know that their narrow depth of field can be a bit challenging to deal with. Most microscopes are designed to only have a very thin slice of the specimen in focus, so looking at anything above or below that plane requires a focus adjustment. It’s tedious and fussy, and that makes it a perfect target for automation.
The goal behind [ItMightBeWorse]’s microscope mods is “focus stacking,” a technique where multiple images of the same sample taken at different focal planes can be stitched together so that everything appears to be in focus. Rather than twist knobs and take pictures manually, he built a simpler Arduino-based rig to do the job for him. Focus control is through a small stepper motor connected to the fine focus knob of the scope, while the DSLR camera shutter is triggered through a simple relay board. There’s also lighting control, with an RGB LED ring light that can change both the light level on the sample as well as the tint.
The code is very simple, and the setup is quite temporary looking, but the results are pretty impressive. We could do without the extreme closeup of that tick — nasty little arachnids — but the ant at the end of the video below has some interesting details. [ItMightBeWorse] doesn’t mention how the actual stacking is being done, but this CNC-based focus stacking project mentions a few utilities that take help with the post-processing.
Continue reading “Quick And Dirty Microscope Motion Control For Focus Stacking”
If you’ve ever played around with macro photography, you’ve likely noticed that the higher the lens magnification, the less the depth of field. One way around this issue is to take several slices at different focus points, and then stitch the photos together digitally. As [Curious Scientist] demonstrates, this is a relatively simple motion control project and well within the reach of a garden-variety Arduino.
You can move the camera or move the subject. Either way, you really only need one axis of motion, which makes it quite simple. This build relies on a solid-looking lead screw to move a carriage up or down. An Arduino Nano acts as the brains, a stepper motor drives the lead screw, and a small display shows stats such as current progress and total distance to move.
The stepper motor uses a conventional stepper driver “stick” as you find in many 3D printers. In fact, we wondered if you couldn’t just grab a 3D printer board and modify it for this service without spinning a custom PCB. Fittingly, the example subject is another Arduino Nano. Skip ahead to 32:22 in the video below to see the final result.
We’ve seen similar projects, of course. You can build for tiny subjects. You can also adapt an existing motion control device like a CNC machine.
Continue reading “Better Macro Images With Arduino Focus Stacking”
Macro photography is the art of taking photos of things very close up, and ideally at great detail. Unfortunately cameras have poor depth of field at close ranges, so to get around this, many use focus stacking techniques. This involves taking many photos at different focal lengths and digitally compositing them together. To help achieve this, [gtoal] realized that garden variety CNC machines would be perfect for the job.
To focus stack effectively, it’s desirable to move the camera in very small increments of sub-mm precision, in order to get different parts of the subject in focus. For this, a CNC machine excels, as it’s designed to move tool heads in very tiny, precise movements.
To achieve a bargain focus stacking rig, [gtoal] used a Dremel tool mount for cutting discs. It’s repurposed here, used as an easy way to fit a Raspberry Pi camera to a CNC tool head through its mounting holes. From there, it’s a simple manner of stepping the CNC a tiny amount at a time on the Z-axis, while taking photos with the Raspberry Pi along the way. [gtoal] notes that it would be simple for an experienced CNC user to whip up a program to automate the entire process.
We’ve seen other budget focus stacking rigs before, and even a busted 3D printer that was turned into an automated scanning microscope. If you’ve got your own tricks for top notch macro photography, drop us a note in the tipline!
Focus stacking is a photographic technique in which multiple exposures are taken of a subject, with the focus distance set to different lengths. These images are then composited together to create a final image with a greater depth of field than is possible with a single exposure. [Peter Lin] built a rig for accurate focus stacking with very small subjects.
The heart of the rig is a motion platform consisting of a tiny stepper motor fitted with a linear slide screw. This is connected to an Arduino or PIC with a basic stepper driver board. While the motor does not respond well to microstepping or other advanced techniques, simply driving it properly can give a resolution of 15 μm per step.
The motor/slide combination is not particularly powerful, and thus cannot readily be used to move the camera or optics. Instead, the rig is designed for photography of very small objects, in which the rail will move the subject itself.
It’s a tidy build that would serve well for anyone regularly doing macro focus stack photography. If you’ve been trying to better photograph your insect collection, this one is for you. It’s a valuable technique and one that applies to microscopy too. Video after the break.
Continue reading “Focus Stacking For Tiny Subjects”
Sometimes, less is more. Sometimes, more is more. There is a type of person who believes that if enough photos of the same subject are taken, one of them will shine above the rest as a gleaming example of what is possible with a phone camera and a steady hand. Other people know how to frame a picture before hitting the shutter button. In some cases, the best method may be snapping a handful of photos to get one good one, not by chance, but by design.
[The Thought Emporium]’s video, also below the break, is about getting crisp pictures from a DSLR camera and a microscope using focus stacking, sometimes called image stacking. The premise is to take a series of photos that each have a different part of the subject in focus. In a microscope, this range will be microscopic but in a park, that could be several meters. When the images are combined, he uses Adobe products, the areas in focus are saved while the out-of-focus areas are discarded and the result is a single photo with an impossible depth of focus. We can’t help but remember those light-field cameras which didn’t rely on moving lenses to focus but took many photos, each at a different focal range.
[The Thought Emporium] has shown us his photography passion before, as well as his affinity for taking the cells out of plants and unusual cuts from the butcher and even taking a noble stab at beating lactose intolerance.
Continue reading “Impossibly Huge Depth Of Focus In Microscope Photographs”
Focus stacking makes for fantastic macro images, but the process can be tedious without the right tools. While some focus stacking rigs require the camera to be moved away from the subject in small increments, others choose to keep the camera stationary while focusing the lens before each shot.
Both methods produce great results, but you need a steady hand and a lot of patience to get the job done. [Oleg] uses the focus stacking technique relatively frequently, so he decided to automate the process in order to save himself some time. Using an Arduino and a USB host shield from Adafruit, he put together a focus stacking assistant for his Canon EOS camera.
The assistant allows him to set two focal points, leaving the Arduino and his camera with the task of taking pictures. The Arduino commands the camera to tweak the focal point ever so slightly between each image, resulting in an array of images ready for stacking.
He says that the process is a bit slow at the moment, but he’ll be cleaning up the code and building a Nikon-compatible unit in the weeks to come.