{"id":1477,"date":"2024-06-01T16:25:43","date_gmt":"2024-06-01T20:25:43","guid":{"rendered":"http:\/\/wordpress.forensicpath.us\/?p=1477"},"modified":"2024-06-01T16:30:04","modified_gmt":"2024-06-01T20:30:04","slug":"taking-and-processing-photomicrographs-part-3-image-acquisition","status":"publish","type":"post","link":"https:\/\/wordpress.forensicpath.us\/index.php\/2024\/06\/01\/taking-and-processing-photomicrographs-part-3-image-acquisition\/","title":{"rendered":"Taking and processing photomicrographs &#8212; part 3: Image acquisition"},"content":{"rendered":"<p><em><strong>Image acquisition:<\/strong><\/em><\/p>\n<p><em>The slide:<\/em><\/p>\n<p>Clean the slide.\u00a0 Really.\u00a0 When we look through the scope, we unconsciously edit out dust and fingerprints and debris, but it is distracting in a photomicrograph.\u00a0 It will also be a lifesaver when getting the brightfield image discussed below.<\/p>\n<p><em>Kohler illumination:<\/em><\/p>\n<p>It&#8217;s a thing.\u00a0 Do it.\u00a0 You know what it is.\u00a0 If you don&#8217;t know, look it up.\u00a0 Ask your attending physician to show you.\u00a0 You need to have the light path working right.<\/p>\n<p><em>Focus:<\/em><\/p>\n<p>To get the best focus I can, I choose my field and then zoom the camera display to as high a magnification I can.\u00a0 It&#8217;s almost always fairly blurry, so I choose an area of high contrast and focus at this high magnification.\u00a0 Use the computer monitor for focus.\u00a0 \u00a0Then I zoom back to no zoom and check my field.\u00a0 \u00a0Take your photographs at a higher magnification than your plan to use for your presentation.\u00a0 I usually make a panorama image one or two objectives higher in mag, and then shrink it down after I&#8217;ve taken my photo.<\/p>\n<p><em>Exposure:<\/em><\/p>\n<p>I choose my exposure with postprocessing in mind.\u00a0 This is the one place where taking the best looking image is not my goal.\u00a0 Instead, I underexpose a little.\u00a0 The reason is that in my experience, when I make an image as bright as I like it, I max out a lot of the pixels and make them all white, but if I make it a little darker, I *don&#8217;t* tend to make too many pixels black.\u00a0 I don&#8217;t know if it&#8217;s generalizable, but when I stretch the histogram a little (I&#8217;ll talk about that later), it works better for me to lighten a slightly dark image than try to darken a too-bright image.\u00a0 So, for instance, here&#8217;s a typical raw image I take:<\/p>\n<p><a href=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.cut_-scaled.jpg\"><img fetchpriority=\"high\" decoding=\"async\" class=\"alignnone size-large wp-image-1834\" src=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.cut_-1024x694.jpg\" alt=\"\" width=\"688\" height=\"466\" srcset=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.cut_-1024x694.jpg 1024w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.cut_-300x203.jpg 300w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.cut_-768x521.jpg 768w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.cut_-1536x1042.jpg 1536w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.cut_-2048x1389.jpg 2048w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.cut_-1600x1085.jpg 1600w\" sizes=\"(max-width: 688px) 100vw, 688px\" \/><\/a><\/p>\n<p>It looks dark, doesn&#8217;t it?\u00a0 But&#8230; here&#8217;s the histogram.\u00a0 For those of you who don&#8217;t know, the histogram of the image is a graph of the number of pixels at any given brightness level.\u00a0 For a red\/blue\/green color image, the histogram is usually that of a computed luminance or greyscale value.\u00a0 You can, of course, look at the histograms of the individual color components if you need to. In any case, here&#8217;s the histogram of this image, taken from the &#8220;curves&#8221; function in GIMP, my default image manipulation program:<\/p>\n<p><a href=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_160736.png\"><img decoding=\"async\" class=\"alignnone size-full wp-image-1835\" src=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_160736.png\" alt=\"\" width=\"444\" height=\"453\" srcset=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_160736.png 444w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_160736-294x300.png 294w\" sizes=\"(max-width: 444px) 100vw, 444px\" \/><\/a><\/p>\n<p>Note that most of the pixels are just a bit higher than half the maximum intensity.\u00a0 That means that I can now stretch the pixels to make them both brighter and darker without losing information.\u00a0 A simple histogram stretch, for instance, results in this:<\/p>\n<p><a href=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_161110.png\"><img decoding=\"async\" class=\"alignnone size-large wp-image-1836\" src=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_161110-1024x682.png\" alt=\"\" width=\"688\" height=\"458\" srcset=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_161110-1024x682.png 1024w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_161110-300x200.png 300w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_161110-768x512.png 768w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_161110.png 1090w\" sizes=\"(max-width: 688px) 100vw, 688px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_161323.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1837\" src=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_161323.png\" alt=\"\" width=\"435\" height=\"475\" srcset=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_161323.png 435w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_161323-275x300.png 275w\" sizes=\"(max-width: 435px) 100vw, 435px\" \/><\/a><\/p>\n<p>I won&#8217;t do that, of course, because the background illumination is still anisotropic.\u00a0 Instead, I&#8217;ll correct for the anisotropic illumination (in the next installment), and that will *also* take care of the dynamic range issues:<\/p>\n<p><a href=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.divide-scaled.webp\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-large wp-image-1812\" src=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.divide-1024x694.webp\" alt=\"\" width=\"688\" height=\"466\" srcset=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.divide-1024x694.webp 1024w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.divide-300x203.webp 300w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.divide-768x521.webp 768w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.divide-1536x1042.webp 1536w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.divide-2048x1389.webp 2048w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/DSC_6406.divide-1600x1085.webp 1600w\" sizes=\"(max-width: 688px) 100vw, 688px\" \/><\/a><\/p>\n<p><a href=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_161810.png\"><img loading=\"lazy\" decoding=\"async\" class=\"alignnone size-full wp-image-1839\" src=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_161810.png\" alt=\"\" width=\"437\" height=\"487\" srcset=\"https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_161810.png 437w, https:\/\/wordpress.forensicpath.us\/wp-content\/uploads\/2024\/06\/Screenshot_20240601_161810-269x300.png 269w\" sizes=\"(max-width: 437px) 100vw, 437px\" \/><\/a><\/p>\n<p>At this point, how much to stretch the dynamic range is a matter of aesthetics, which I&#8217;ll get into later.\u00a0 The point is that even though the original image is &#8220;underexposed,&#8221; it doesn&#8217;t end up that way.<\/p>\n<p><em>Playing games with the field and condenser diaphragms:<\/em><\/p>\n<p>Make sure the entire field is illuminated.\u00a0 I see a lot of photomicrographs where you can see the edges of the field diaphragm resulting in a circular image or image with the corners blacked out.\u00a0 Not only does it look bad, but it makes some of the postprocessing harder.\u00a0 Playing with the condenser diaphragm can increase refractivity of the image.\u00a0 Sometimes this makes the image aesthetically more pleasing, sometimes not.<\/p>\n<p><em>Take a brightfield image:<\/em><\/p>\n<p>It&#8217;s almost a given that illumination of the field will not be uniform.\u00a0 Traditionally, that means that the center of the field will be brighter than the edges.\u00a0 That might not be true for these new LED scopes, but I think it is.\u00a0 It&#8217;s certainly true for my scope.\u00a0 The human brain is surprisingly good at accommodating this, and it may not be obvious while looking through the eyepieces of the microscope, but it can be obvious in the resulting photomicrograph.\u00a0 You can get rid of this by postprocessing if you have a brightfield image.<\/p>\n<p>To take a brightfield image, you just take a photo of a field where there is nothing but clear glass. Since you will be processing to remove problems with the illumination used for taking the photomicrograph, you need to take the brightfield image without changing the focus or illumination level.<\/p>\n<p>This isn&#8217;t as easy as you might think.\u00a0 Almost all of my slides have copious scratches, dust, etc. so it&#8217;s hard to find a place where it really is nothing but clear glass.\u00a0 The easy near-fix is to just move the slide off the scope and take a picture without anything there at all, but it turns out that the slide and coverslip change the lighting just a little, and this is less of an exact solution.\u00a0 If you take a picture with a speck of dust in the field, you will have to remove it in postprocessing.<\/p>\n<p><em>Maybe take a darkfield image:<\/em><\/p>\n<p>A darkfield image is an image taken with the lights off.\u00a0 Mostly the purpose is to remove &#8220;hot&#8221; pixels in post processing.\u00a0 These are pixels that are not actually black when there&#8217;s no illumination.\u00a0 You can also have unwanted currents running around that provide uneven darkness.\u00a0 In my camera, it&#8217;s not a significant problem, and I often don&#8217;t do this.\u00a0 \u00a0Many photomicrographs are pretty busy, and one slightly off pixel is not really noticeable.\u00a0 But if you&#8217;re a purist, then go for it.<\/p>\n<p><em>Maybe take multiple exposures:<\/em><\/p>\n<p>I&#8217;ll talk a bit later about high dynamic range imaging.\u00a0 I&#8217;ve had mixed results with this, but you might like to play with it.<\/p>\n<p><em>Maybe take multiple focus planes:<\/em><\/p>\n<p>At high magnification, you can focus on multiple levels in the tissue.\u00a0 We pathologists do this as a habit by focusing up and down as we look at the slide. It&#8217;s almost unconscious, but if you watch most pathologists, they are constantly focusing up and down *just a teeny bit*.\u00a0 This allows us to focus up and down through the tissue.\u00a0 \u00a0Another thing you can play with is &#8220;focus stacking&#8221; where you take an image at different focus layers and then combine the in-focus parts of each level to create one image where everything is in focus.\u00a0 \u00a0I&#8217;ve had mixed results with this, too, but it&#8217;s fun to play with it sometimes.<\/p>\n<p>The table:<\/p>\n<p>Put the microscope on a firm foundation.\u00a0 You don&#8217;t want vibration in longer exposures.<\/p>\n<p>The shutter release:<\/p>\n<p>Use a remote shutter release.\u00a0 Pressing the button on the camera will cause vibration.<\/p>\n<p>Monitor:<\/p>\n<p>Use a monitor to display the image that the camera will take rather than trying to see things through the tiny viewport.\u00a0 You can see how good or bad your focus is much better on a big screen.<\/p>\n<p>ISO\/Shutter speed\/aperture issues:<\/p>\n<p>In order to collect light, three things work together.<\/p>\n<ol>\n<li>The efficiency of the sensor.\u00a0 This is set using ISO.\u00a0 A &#8220;slow&#8221; ISO is not as sensitive to light as a &#8220;fast&#8221; ISO.\u00a0 The upside of the fast ISO in the real world is that it is fast, so you can take pictures of moving objects like thrown baseballs, and it will minimize the blur.\u00a0 The downside of a fast ISO is that it builds an image from fewer photons, and that means that there will be more noise in the image, which makes it look grainier.\u00a0 It turns out that for classical noise, the amount of noise decreases with the square root of the number of samples.\u00a0 Thus taking four samples will halve the noise.\u00a0 For microscopy, time is cheap, so use a slower ISO.\u00a0 How slow depends on the camera.<\/li>\n<li>The shutter speed.\u00a0 The shutter speed is how long you collect photons.\u00a0 For a &#8220;slow&#8221; ISO you need a longer shutter speed.\u00a0 For my photography, I set the ISO and adjust my shutter speed to get the exposure I want.<\/li>\n<li>Aperture:\u00a0 This is how big the pinhole is that lets light onto the sensor.\u00a0 Little holes allow fewer photons, bigger holes allow more.\u00a0 This is not an issue with me, since I don&#8217;t have a lens on the camera.\u00a0 Instead, it&#8217;s attached to the microscope optics directly.\u00a0 But if I did have a lens with an aperture on my camera, I would have to adjust it as well.<\/li>\n<\/ol>\n<p>For me, the rule of thumb is slower ISO and longer exposure. YMMV, of course.\u00a0 A longer exposure may not work as well for you if you have a jiggly table and vibration artifact is an issue. The real bottom line, though, is that modern cameras are so fast that it&#8217;s hard to screw it up, and it&#8217;s not much of a consideration any more.\u00a0 If it looks good, it is good.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Image acquisition: The slide: Clean the slide.\u00a0 Really.\u00a0 When we look through the scope, we unconsciously edit out dust and&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[99,60,1],"tags":[56,27,25,28,26],"class_list":["post-1477","post","type-post","status-publish","format-standard","hentry","category-forensic-pathology","category-photomicrographs","category-uncategorized","tag-histology","tag-image-processing","tag-microscopy","tag-pathology","tag-photomicrography"],"_links":{"self":[{"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/posts\/1477","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/comments?post=1477"}],"version-history":[{"count":3,"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/posts\/1477\/revisions"}],"predecessor-version":[{"id":1842,"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/posts\/1477\/revisions\/1842"}],"wp:attachment":[{"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/media?parent=1477"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/categories?post=1477"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/wordpress.forensicpath.us\/index.php\/wp-json\/wp\/v2\/tags?post=1477"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}