{"id":2430,"date":"2023-11-08T13:17:54","date_gmt":"2023-11-08T18:17:54","guid":{"rendered":"https:\/\/www.med.unc.edu\/microscopy\/?page_id=2430"},"modified":"2025-02-28T13:32:23","modified_gmt":"2025-02-28T18:32:23","slug":"flatfielding-of-color-images","status":"publish","type":"page","link":"https:\/\/www.med.unc.edu\/microscopy\/image-analysis\/flatfielding-of-color-images\/","title":{"rendered":"Flatfielding of Color Images"},"content":{"rendered":"<h2>What is flatfielding?<\/h2>\n<p>Flatfielding is a procedure that will allow you to correct images for uneven illumination. Even with well-maintained objectives and good samples, illumination over a large field of view will always be uneven.<\/p>\n<h2>Why should you flatfield your color images?<\/h2>\n<p>To compensate for the fact that the edges of the field of view are dimmer than the center, due to uneven illumination. After flatfielding your images will look better (see below).<\/p>\n<h2>What do you need to do this?<\/h2>\n<p>You will need to acquire a blank image, and you will need to use one of MSL\u2019s flatfielding macros (see below).<\/p>\n<h2>What results can you expect?<\/h2>\n<p>Here is an example of an image before flatfielding, the blank image used for the flatfielding procedure, and the flatfielded result:<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" class=\"alignnone wp-image-3040 size-large\" src=\"https:\/\/www.med.unc.edu\/microscopy\/wp-content\/uploads\/sites\/1393\/2023\/11\/flatfielded-image.png\" alt=\"\" width=\"1024\" height=\"403\" \/><\/p>\n<h2>How do you acquire a blank image?<\/h2>\n<ol>\n<li>Select the proper objective you intend to use.<\/li>\n<li>Make sure the TL lens is in the correct position (out for 5X and lower magnification objectives, in for the rest).<\/li>\n<li>Focus on your sample.<\/li>\n<li>Autoexpose<\/li>\n<li>Remove the sample slide, autoexpose again.<\/li>\n<li>Apply white balance.<\/li>\n<li>Make sure the image without the slide is not saturated.<\/li>\n<li>Acquire an image without the slide; this will be your blank image for that objective.<\/li>\n<\/ol>\n<h2>What do you do after acquiring the blank image?<\/h2>\n<ol start=\"9\">\n<li>Put your slide back on.<\/li>\n<li><strong>Take all other images without changing the settings.<\/strong><\/li>\n<\/ol>\n<h2>How should you save your images (in Volocity software)?<\/h2>\n<ol start=\"11\">\n<li>As TIFFs (make sure you click on \u201cOptions\u2026\u201d and ensure \u201cConvert to RGB for publication\u201d is clicked and \u201cScale\u201d is unclicked, <u>every time<\/u> you save a batch of images).<\/li>\n<li>Groups of images taken with different objectives and\/or settings should be placed in different folders.<\/li>\n<\/ol>\n<h2>Important things to keep in mind when acquiring a blank image:<\/h2>\n<ol>\n<li>You will need a different blank image for every objective you use, if you use more than one objective.<\/li>\n<li>You will need a different blank image if you use different settings.<\/li>\n<li>Blank images are best fresh, like sushi (thanks to Jim Sims at Hamamatsu for that analogy); you will need new blank images every time you come to MSL.<\/li>\n<\/ol>\n<h2>How do you flatfield your images with the MSL macro?<\/h2>\n<p>The macro will ask you for the objective you used, the flatfield image, and the directory with the images that needed to be flatfielded. Within that directory, it will create a new folder called Flatfielded_Images, and place the flatfielded images in that folder.<\/p>\n<h2>How do you install the MSL flatfielding macro?<\/h2>\n<ol>\n<li>Download and install <a href=\"https:\/\/fiji.sc\/\">FIJI<\/a>.<\/li>\n<li>Download the <a href=\"https:\/\/www.med.unc.edu\/microscopy\/wp-content\/uploads\/sites\/1393\/2023\/11\/FlatBFv2.zip\">macros<\/a>\u00a0and unzip them.<\/li>\n<li>Make a folder called MSL in the plugins folder in the FIJI folder. (To get inside this folder on a mac, go to wherever FIJI is\u2014typically in Applications\u2014right-click on it and select Show package contents). You will now see the folders inside FIJI, one of which is plugins.<\/li>\n<li>Put the following files inside FIJI\/plugins\/MSL:\n<ol>\n<li>_FlatBF_BX61v2<\/li>\n<li>_FlatBF_IX81v2<\/li>\n<\/ol>\n<\/li>\n<li>Restart FIJI<\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>What is flatfielding? Flatfielding is a procedure that will allow you to correct images for uneven illumination. Even with well-maintained objectives and good samples, illumination over a large field of view will always be uneven. Why should you flatfield your color images? To compensate for the fact that the edges of the field of view &hellip; <a href=\"https:\/\/www.med.unc.edu\/microscopy\/image-analysis\/flatfielding-of-color-images\/\" aria-label=\"Read more about Flatfielding of Color Images\">Read more<\/a><\/p>\n","protected":false},"author":58247,"featured_media":0,"parent":2291,"menu_order":5,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_acf_changed":false,"layout":"","cellInformation":"","apiCallInformation":"","footnotes":"","_links_to":"","_links_to_target":""},"class_list":["post-2430","page","type-page","status-publish","hentry","odd"],"acf":[],"_links_to":[],"_links_to_target":[],"_links":{"self":[{"href":"https:\/\/www.med.unc.edu\/microscopy\/wp-json\/wp\/v2\/pages\/2430","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.med.unc.edu\/microscopy\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.med.unc.edu\/microscopy\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.med.unc.edu\/microscopy\/wp-json\/wp\/v2\/users\/58247"}],"replies":[{"embeddable":true,"href":"https:\/\/www.med.unc.edu\/microscopy\/wp-json\/wp\/v2\/comments?post=2430"}],"version-history":[{"count":0,"href":"https:\/\/www.med.unc.edu\/microscopy\/wp-json\/wp\/v2\/pages\/2430\/revisions"}],"up":[{"embeddable":true,"href":"https:\/\/www.med.unc.edu\/microscopy\/wp-json\/wp\/v2\/pages\/2291"}],"wp:attachment":[{"href":"https:\/\/www.med.unc.edu\/microscopy\/wp-json\/wp\/v2\/media?parent=2430"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}