book collections email follower instructable user

In optical microscopes, there is a fundamental trade-off between field-of-view and resolution: the finer the detail, the smaller the region imaged by the microscope. One way to overcome this limitation is to translate the sample and acquire images over a larger field-of-view. The basic idea is to stitch together many high resolution images to form a large FOV. In these images, you get to see both the full sample, as well as fine detail in any portion of the sample. The result is an image consisting of about a billion pixels, much larger in comparison to the pictures taken by a dSLR or smart phone, which typically have around 10 to 50 million pixels. Check out these gigapixel landscapes for an impressive demonstration of the massive amount of information in these images.

In this instructable, I will go over how to build a microscope capable of imaging a 90mm x 60mm field-of-view with pixels corresponding to 2μm at the sample (although, I think the resolution is probably closer to 15μm). The system uses camera lenses, but the same concept can be applied using microscope objectives to get even finer resolution.

I uploaded the gigapixel images I acquired with the microscope on EasyZoom:

1970 National Geographic magazine image

Crochet tablecloth my wife made

Miscellaneous electronics

Other resources:

Optical microscopy tutorials:

Optical resolution:

In addition to image stitching, recent progress in computational imaging makes gigapixel microscopy possible without even moving the sample!

Step 1: Supply List

Picture of Supply List


1. Nikon dSLR (I used my Nikon D5000)

2. 28mm focal length lens with 52mm threading

3. 80mm focal length lens with 58mm threading

4. 52mm to 58mm reverse coupler

5. Tripod

6. Seven sheets of 3mm thick plywood

7. Arduino Nano

8. Two H-bridge L9110

9. Two IR emitters

10. Two IR receivers

11. Push button

12. Two 2.2kOhm resistors

13. Two 150Ohm resistors

14. One 1kOhm resistor

15. Remote release for Nikon camera

16. Black poster board

17. Hardware kit:

18. Two stepper motors (I used Nema 17 Bipolar step motor 3.5V 1A)

19. Two 2mm lead screws

20. Four pillow blocks

21. Two lead screw nuts

22. Two bearing slide bushing and 200mm linear shafts:

23. 5V power supply:

24. Wire wrap wire


1. Laser cutter

2. 3D printer

3. Allen wrenches

4. Wire cutters

5. Wire wrap tool

DeadlyDad1 month ago
Hey! First off, congrats on getting famous ( - you'll definitely want to hit the comments section there for some great ideas)

Secondly, some thoughts:
- I think that a common bed scanner would make for a good platform for X/Y movement, as it is already set up for one and you would only need to add the other.
- To decrease noise by a factor of 2/3/4, for each final shot, take 4/9/16 shots, then average them before using them for any other operation.
- Using a Super Resolution technique ( will drastically enhance the quality of the final image. I would follow that procedure right up to the reduction step for each separate image, align the large images, then reduce to final size. (I'm honestly puzzled by why they would use 'Nearest Neighbour' for scaling up, as 'Linear' would seem to me to be the better option.)
- For better alignment, more overlap is better. Most apps seem to like 60-80%. That would also help with SR.
- If a Canon camera running CHDK ( was used, it would be trivial to create multi-shot-averaged, focus-stacked, exposure-bracketed image sets. (Your camera can then be remotely accessed from your PC: The script I used to take perfectly focussed photos of miniatures--photo attached--used 21 shots for a distance of 30mm in 'Super Macro' mode.) The nicest part about using CHDK would be the Arduino itself being able to trigger the camera after moving it to the each location; very important if you are taking--for example--16 * 21 * 3 MSA/FS/EB shots (with a very shallow depth of field) per position.
- Here are some software packages that should be of use to you help stitch your photos together:

Hope this helps!
jbumstead (author)  DeadlyDad26 days ago
Thanks for your thoughtful note and letting me know about the Hackaday article! Lots to read over at that link.

The image averaging idea would work very well for this application because long exposures aren't ideal for my shaky tripod setup. It is a great tip in general for imaging projects.

Given the optical resolution of the microscope (15 microns), I am oversampling by a factor of about five (3 microns pixels). The super-resolution technique you shared will improve the sampling even more to make the images sharper. I am unsure how much oversampling can push the quality of the image given the resolution of the optical system. From Nyquist theory, the minimum sampling required to avoid aliasing is at least twice as high as the optical resolution. I wonder how the pixel size of the cameras you mentioned compares to the optical resolution.

I haven't heard of this focus stacking technique and I am really interested to try it out. Your results look great!

Wow, I'm so surprised to find your project!

I have been working for several months now to develop the design to implement this focus stacking and stitching technique with a CNC Gantry. I thrilled to find others pursuing this implementation at the exact same time. It is quite the moment of convergent thought and discovery. Your tutorial is excellent and well explained thank you for sharing your experience. I look forward to sharing and hearing about any further updates at they come along.

ayjaym3 months ago
This is an extraordinarily clever idea. I wondered if perhaps a low-cost 3D printer might work as a positioner as you already have the XYZ axis and with a suitably lightweight camera and an appropriate bracket, something like the Creality Ender 3 (which I own) should be able to position to approx. 0.05mm accuracy with minimal backlash. After all, that's what it's gotta do as a good 3D printer. Then just use gcode files to control the translation sequence. Camera weight could be offset with a spring assembly mounted to the top of the printer frame, I would think, so that the gantry doesn't have to carry the camera weight, you could virtually 'zero out' the weight and the inertia isn't an issue as you will be moving at very low velocity.
I would reverse things, and have the X/Y axes move the item and have the camera itself be locked in place, as whatever you would be photographing would be much lighter than any camera.
jbumstead (author)  ayjaym3 months ago
I think modifying a cheap 3D printer would definitely work for this project. Good idea to use a spring assembly for the camera mounting. I think this would be the toughest part. Another advantage to using the 3D printer hardware is easy control in the z-direction for adjust the focus, which was a pain to do manually with the tripod.
The XY stage would be more stable if you used three bearing blocks instead of two on each axis, and before someone else comments, no, using four would not be even better.

If you had fine enough position control, and a rigid enough set-up, you could bump the object by fractions of the image sensor's pixel width and maybe get increased resolution in a small area.
jbumstead (author)  Mark Rehorst1 month ago
Thanks for the feedback on providing stability to the XY stage.

Your idea for improved resolution using sensor or fine XY stage movement is a really good one. Optotune has a camera sensor that does something similar by tilting the beam using a beamsplitter. I wonder if some of the newer SLRs or mirrorless cameras could achieve this with sensor tilting.
Years ago, when high resolution sensors were rare and expensive, I read about a digital camera that shifted the image sensor laterally by 1/2 pixel horizontally and vertically to quadruple the resolution of the image. I don't know if it became a real product. Digital cameras that have image stabilization in the body use small piezo actuators to move the image sensor to keep it in sync with the moving image from the lens.
АхмедА3 months ago
Thanks I personally use a camera lens with my phone
wahmah3 months ago
For stiching images you can also use Microsoft Image Composite Editor, it's free.
jbumstead (author)  wahmah3 months ago
Just tried out Microsoft ICE. It is incredible! Thanks for the suggestion.
jbumstead (author)  wahmah3 months ago
Awesome, thanks for the tip. I will try it out.
doowoppie3 months ago
I use Microsoft ICE for stitching images.
It is one of the better programs and is free last time I checked
jbumstead (author)  doowoppie3 months ago
Just tried out Microsoft ICE. It is incredible! Thanks for the suggestion.
Razanur3 months ago
Hmmm, now I want to mod my ultimaker for this :D
jbumstead (author)  Razanur3 months ago
Haha, not the ultimaker!
Razanur jbumstead3 months ago
Why not? "Free" xyz stage...
grahambb3 months ago
There is a freely available (registration/login required) viewer for storing and sharing your gigapixel images via a web browser at

jbumstead (author)  grahambb3 months ago
Thanks for sharing this source!
MechZaari3 months ago
There are a number of way using software algorithms to improve on the image resolution. Would be great to collaborate with someone who is more familiar with these techniques to really push the boundaries of the resolution!
jbumstead (author)  MechZaari3 months ago
Good idea, I had one link in the intro for a gigapixel microscope that required no moving of the sample. But there are many more ideas out there!
arpruss3 months ago
Cool! I wonder if one could do this by mounting a camera on a CNC router? I am guessing camera weight would be a problem.
jbumstead (author)  arpruss3 months ago
Definitely seems possible. A smaller camera with the right optics would solve the weight problem.
billbillt3 months ago
painfull3 months ago
Getting 404's on those image links.
jbumstead (author)  painfull3 months ago
Thanks for letting me know. They should be working now.