One of the tricky things with microscopy and macro photography is the
depth of field, as you start magnifying a sample you need to collect as much light as possible to generate the image with a sensible exposure time. Unfortunately this requires a large aperture, and this creates a very shallow depth of field...
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgFAiNqJp_AWYKK6mwOdJuukviB_rXLF-pDQ42eg0BNLIYYPzdc4_PEXZizlyEJeHDUtYWkyseZVn-YoF5r_IJi1GxUM4IPUIT7w_6zhY1dU2gDqDR9OUfF4jJW78YdKCA-4vEzHbUQQLc/s400/Slice3.jpg)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi0GSnxHZhzPUFTq3EChjINsdUpvLITEnLLjMxhKidAtyCCNyneHge3RLWt4Lq83-r8wvYCD8ihHUF4a-2OOCiKUwj1iTwoD7q-oed91zHxdWYkIQnoBXMVLjb2UbnmlqbfAX8vERWSg98/s400/Slice2.jpg)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhOMj1GNhY2JpL53Oh9CXrQhbHDxobYEiNjZqmmuTXMqj9uWHScHVcsxnao-GcG67QYRXU5GsD6RrF6fMpyZmWBgsEiriKeNk7_KTAdF4eM245x7MepX22nL6dnTfM2ThFfQtPgvdeeXjg/s400/Slice1.jpg)
This micrograph of a diatom clearly shows the problem, it is impossible to get the whole sample in focus in one image. Fortunately there are ways around it; by analysing the image for sharp edges it is possible to find which image is the most in-focus and the whole image can then be reconstructed only using the in-focus patches. This process is called
focus stacking and generates an extended depth of field. Good free implementations of focus stacking are hard to come across, so I wrote one; you can
download the ImageJ macro here.
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEijf4ha1dpnuM2MKoLmi4aHGzTH02efuxZXO290pUlWvGgnClqyfLl_lW2eIbgeJLuzWl4auVcmoqZdcCJU10Tfgq1z3_hCyoVzfvVeSdaDlvCqUb4U5S-BmWDw6_l08VTsPIcbICPMgYM/s400/Focused_small.jpg)
Using the same technique on macro photography (processing the red, green and blue channels separately) gives a similarly impressive result. The three starting images:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhybfPKfs7GU9meXaFecJvTznPQgFqGQiRzwgectJJgSmGvPsB5bRIPYUBbQVrTFdXWtKkKxUG1VgOQUOCehxp3eC53EpfCM6epf6Ikvq8QeAKThcEIcdmtwQcf5wpGecbxWDEs2XiW9nE/s400/slice1_small.jpg)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpDPS2Dk6RBeBivLvQLCienthbpVFzh5LfWQtmZpNr6TBMCpFJw_jqy-552ehhNk8DQFmabX-c-vxMZEIbPUbgSj2NwDC0M9nTAJOL87hsjA6oCbIXO2vdpYqA9TZjdQYByA4V5WM4TW4/s400/slice2_small.jpg)
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjnIN-f56bP5rO-gOIZ1Iq4PFlGHtlrYHef5fK74PCMYH6RBvQrQoO9NAXiKEP7X70H98TUHaeXKY_SpEilXtvdU09MlXA3-PeAle9LHwqKJUXkgNXQlc0VfHmNMf_nQph1xvx3ZKlZe3Y/s400/slice3_small.jpg)
And the extended depth of field result:
![](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgN9rkYFQF4hqCg30hgwUsnW4lda2S6hfU0zV1BTR1xS4cCA5f7DlEh1npPRCv0b8XqJS1Q5U05HvTHGHWg6H7xpdJZbqDWu_K1o6bytwUcw1qItNnEgbcvRLeeCjZebDPTK8eyAbnZJ-Q/s400/focused_small.jpg)
Software used:
Image processing:
ImageJ
No comments:
Post a Comment
Note: only a member of this blog may post a comment.