Skip to content, Skip to search

Changes

Image Intensity Processing

4,321 bytes removed, 11:14, 22 March 2017
Name menu sidebars as such
= Intensity vs Time analysis =__FORCETOC__ {{CookbookMenu}} 
== Brightness and Contrast ==
 
[[File:brightness_contrast_pic.png|thumb|right]]
Brightness is the visual perception of reflected light. Increased brightness refers to an image's increased luminance.
Contrast is the separation of the lightest and darkest parts of an image. An increase in contrast will darken shadows and lighten highlights. Increasing contrast is generally used to make objects in an image more distinguishable.
To improve the visualization of the image, Adjust the displayed brightness and contrast can be adjusted with “''{{bc | Image/| Adjust/| Brightness/Contrast...''”}} to make visualization of the image easier.
The “Press the ''Auto”Auto''  button applies to apply an intelligent contrast stretch to the ''way in which the image is displayeddisplay''. The brightness Brightness and contrast is adjusted based on an analysis of by taking into account the image's (or selection’s) histogram. If pressed repeatedly, it allows an increasing the button increases the percentage of saturated pixels to become saturated.
The ''Reset'' changes button makes the “maximum” and “minimum” back to "maximum" 0 and the "minimum" 255 for in 8-bit images and back to the "maximum " and "minimum of " equal to the smallest and largest pixel values in the image’s histogram for 16-bit images.
If the ''Auto''  button does not produce a desirable result, select a region of use the cell plus some background with a region-of-interest (ROI) toolto select part of the cell and some background, then hit the ''Auto''button again. It The stretch will then do a stretch be based on the intensities within of the ROI.
'''Pressing the ''Apply'' button permanently changes the ''actual ''grey values of the image. Don’t If just analyzing image intensity do not press this button while analyzing image intensity!'''.
If you prefer the image to be displayed as “black "black on white” white" rather than “white "white on black”black", then use the image display can be “inverted” by the "inverted" command “'': {{bc | Image/| Lookup Tables/| Invert LUT''”}}. The command “''{{bc | Edit/| Invert''” }} inverts the pixel ''valuesthemselves'' not just the way the image is displayedpermanently.
== Getting intensity values from single ROI ==
If working with a stack, the ROI selected can be analyzed with the command: “''{{bc | Image/| Stacks/| Plot Z Axis Profile''”}}. This generates a single column of numbers - one slice intensity per row.
The top 6 rows of the column are details of the ROI. This is useful to ensure makes sure the same ROI isn’t is not analyzed twice and allows relocation of you to save any interesting ROIs. The details are comprised of area, x-coordinate, y-coordinate, AR, roundness, and solidity of the ROI. If the ROI is a polyline/>freehand ROI rather than a square/>oval, the details are given it acts as if the ROI was is an oval/>square. The (oval) ROI can be restored by entering the details prompted by the “''{{bc | Edit/| Selection/| Restore Selection''” }} (hotkey: “Ctrl {{key|Ctrl}}+ {{key|Shift }}+ E”{{key|E}}) command.
The results are displayed in a plot-window with the ROI details in the plot window title. The plot contains the buttons ''List, Save, Copy. ''The ''Copy'' button copies puts the data to in the clipboard where so it can be pasted into a waiting an Excel sheet. The settings for the copy button can be found under “''{{bc | Edit/| Options/| Profile Plot Options''”}}. Recommended settings include: ''Do not save x-values ''(prevents slice number data being pasted into Excel) and ''Autoclose'' (prevents so that you having don't have to close the analyzed plot each time.
== Dynamic intensity vs Time analysis ==
The plugin “''Plot Z Axis Profile" ''(this is the ''Z Profiler'' from Kevin (Gali) Baler (gliblr at yahoo.com) and Wayne Rasband simply renamed)  will monitor the intensity of a moving ROI using a particle tracking tool. This tool can be either manual or automatic. Use the “''Image/Stacks/Plot Z Axis Profile''”  command.
==  Getting intensity values from multiple ROIs ==Multiple ROIs can be analyzed at once using Bob Dougherty’s “The plugin ''Multi MeasurePlot Z Axis Profile''” plugin. There (this is a native “ROI manager” function that does a similar job except the results generated are not sorted into columns. Check Bob’s website for updates: [http://www.optinav''Z Profiler'' from Kevin (Gali) Baler (gliblr at yahoo.com/imagej) and {{Person|Rasband}} simply renamed) will monitor the intensity of a moving ROI using a particle tracking tool.html http://wwwThis tool can be either manual or automatic.optinav.com/imagejUse the {{bc | Image | Stacks | Plot Z Axis Profile}} command.html]
The Multi Measure plugin that comes with the installation is v3.2.== Getting intensity values from multiple ROIs ==
1You can analyze multiple ROIs at once with Bob Dougherty’s ''Multi Measure'' plugin. Open confocal-seriesThe native "ROI manager" function does a similar job except doesn't generate the results in sorted columns. Check [http://www.optinav.com/imagej.html Bob’s website] for updates. Remove background (See Background correction)
2. It’s worthwhile generating a reference stack to add the ROIs to. Use the “''Image/Stacks/Z-project''” function. Select the “Average” option. 3. Rename this image “Ref ''expt name''” or something memorable. 4. Open “''ROI Manager''” plugin (“''Analyze/Tools/Roi Manager'' ” or toolbar icon ). 5. Select ROIs and "''Add''" to ROI manager. Clicking "''Show All''" helps avoid analysing the same cell twice. 6. Once finished selecting ROIs to be analysed in the reference image, you can draw them to the reference image by clicking the "''More>>''" button and selecting ''Draw''. Save the reference image to the experiment’s data folder and then select the stack to be analysed by clicking on it. 7. Click "''More>>''" button in the ROI manager and select “''The Multi Measure''” button to measure all plugin that comes with the ROIsinstallation is v3. Click “Ok”. This will put values from each slice in to a single row (multiple columns per slice). Clicking on "''Measure all 50 slices''" will put all values from all slices and each ROI in a  single column. 8. Go to “Results” window. Select menu item “''Edit/Select All…''”. Then “''Edit/Copy''”2.
9# Open confocal-series and remove the background (See Background correction)# Generate a reference stack for the addition of ROIs. Go to Excel Use the {{bc | Image | Stacks | Z-project}} function and paste dataselect the ''Average''. With large data sets # Rename this image something memorable.# Open the ''ROI Manager'' plugin ({{bc | Analyze | Tools | Roi Manager}} or toolbar icon).# Select ROIs and "''Add''" to the ROI manager. Click the "''Show All''" button to help avoid analyzing the same cell twice.# After selecting ROIs to be analyzed in the reference image, you can take some time so check you’re pasting new draw them to the reference image by clicking the "''More>>''" button and selecting ''Draw''. Save the reference image to the experiment’s data folder and then click on the stack to be analyzed.# Click the "''More>>''" button in the ROI manager and not select the last dataset copied ''Multi Measure'' button to measure all the ROIs. Click ''Ok''. This will put values from Multi each slice in to a single row with multiple columns per slice. Clicking on "''Measureall 50 slices''" will put all values from all slices and each ROI in a single column.# Go to the ''Results'' window and select the menu item {{bc | Edit | Select All...}}. Then ''Edit/Copy''.# Go to Excel and paste in the data.Check that everything was pasted in correctly
[[File: roi_select_all.jpg]]
10. To copy ROI co-ordinates in to coordinates into the Excel spreadsheet, ensure there is needs to be an empty row above the intensity data. Got to Use the Multi Measure dialog and click “Copy list” the ''Copy list'' button.
14. Go to In Excel, select click the empty cell above the first data column and then paste in the ROI co-ordinatescoordinates.Save the ROIs with the Multi Measure button ''Save''. Put them in the experimental data folder. The ROIs can be opened later either individually with the button ''Open'' or all at once with the button ''Open All''.
The Oval and rectangular ROIs can be stored and re-opened later using restored individually from x, y, l, h values with the Multi Measure dialog button “''Save''”{{bc | Plugins | ROI | Specify ROI.. Save them in the experimental data folder. The ROIs can be opened later either individually (Multi Measure dialog button “''Open''”) or all at once (Multi Measure dialog button “''Open All''”) which opens all the ROIs in a folder}} command.
Oval and rectangular ROIs can also be restored individually from x, y, l, h values using “''Plugins/ROI/SpecifyROI…''”.== Ratio Analysis ==
== Ratio Analysis ==
[[File:intensity_ratio_analysis.jpg|right]]
Ratiometric imaging compares the recordings of two different signals to see if there are any similarities between them. It is done by dividing one channel by another channel to produce a third ratiometric channel. This technique is useful because it corrects for dye leakage, unequal dye loading, and photo-bleaching. An example application would be measuring intracellular ion, pH, and voltage dynamics in real time.
Analysis Background subtraction is needed before analysis of dual-channel ratio images requires careful background subtraction prior to analysis. See also the [[#Background_correction|background correction]] section  '''1.11 Background correction. '''The ''Ratio_Profiler'' plugin will perform ratiometric analysis of a single ROI on a dual-channel interleaved stack, i.e. the The odd-slices are channel 1 images, and the even slices are channel 2. Perkin Elmer ''Ultraview'' and Leica SP dual channel experiments can be directly imported as an interleaved stack using the menu command "''File/Import/Image Sequence''"images. If your two channels are opened as separate stacks, e.g. such as Zeiss, the two channels can be interleaved (mixed together by alternating between them) with the menu command "''{{bc | Plugins/| Stacks - Shuffling/| Stack Interleaver''". The plugin will generate a green-plot of the ratio values (Ch1÷Ch2 by default; Ch2÷Ch1 if the plugin is run with the Alt-key down); a second plot of the intensities of the individual channels (Ch1 and Ch2); and a results table}}.
The first row plugin will generate a green-plot of the results table ratio values. Ch1÷Ch2 is the x, y, width default and height you can get Ch2÷Ch1 if the plugin is run with the {{key|Alt}} key down. It will also generate a second plot of the intensities of the ROIindividual channels, Ch1 and Ch2, as well as a results table.
From the second The first row downward, of the first column is results table contains values for the time or slice number; the second column the Ch1 mean intensityx, y, Ch2 mean intensity width and height of the ratio value. If the stack has its frame interval calibrated, the "Time" value will be in seconds otherwise it is "Slices". The frame interval can be set for the stack via the menu command ''"Image/Properties"'' dialogROI.
This table can be copied to From the second row downward, the first column is the time (slice number), the second column is the Ch1 mean intensity, and the third channel is the Ch2 mean intensity and the clipboard ratio value. The stack must have its frame interval calibrated in order for pasting the "Time" value to another program by using the be in seconds. Otherwise, it is "''Edit/Copy All''Slices" . The frame interval can be set for the stack via the menu command''{{bc | Image | Properties}}.
 This table can be copied to the clipboard and pasted elsewhere with the "{{bc | Edit | Copy All}}" menu command.
''''' Ratio Analysis Using ROI manager'''''
1. BG subtract Subtract the background from the image.
2. Open ''ROI manager'' (''{{bc | Analyze/| Tools/| ROI manager...''}}) and click the "Show All" button.
3. Select the cells to be analyzed and add them to the ROI manager ("Add" button or keyboard 't' {{key|T}} key).
4. Run the plugin.
The results window contains the mean  of ch1 and ch2 and their ratio. Each row is a timepoint (slice). The first row contains the ROI details.
To generate a reference image:
1. flatten # Flatten the stack with the menu command (''{{bc | Image/| Stacks/Zproject" | Z-project}} with "Projection type: MaximimumMaximum"''), 2. # Adjust the brightness and contrast if requirednecessary3. Ensure # Select the new image is selected and click the "More" button in the ROI manager then . After that select "Label".    
== Obtaining timestamp data ==
=== Zeiss LSM ===
The LSM_Toolbox is a project aiming at the integration of common useful functions around the Zeiss LSM file format, that should enhance usability of confocal LSM files kept in their native format, thus preserving all available metadata.
In FijiThe [[LSM Toolbox]] is a project aiming at the integration of common useful functions around the Zeiss LSM file format, corresponding commands are: "''File/Import/Show LSMToolbox''" which displays the toolboxthat should enhance usability of confocal LSM files kept in their native format, from which thus preserving all commands can be called and "''Help/About Plugins/LSMToolbox...''" which displays information about the pluginavailable metadata.
=== Noran ===Noran movies can be opened in several waysIn Fiji, corresponding commands are: "{{bc | File>| Import>Noran movie opens entire movie as an image stack. File>Import>Noran Selection… allows you to specify a range of frames to be opened as a stack. The Noran SGI plugins are not bundled with | Show LSMToolbox}}" which displays the Fiji package. To receive them, please contact tonyc@uhnresearch.ca or their authortoolbox, Greg Joss, so he from which all commands can keep track of usersbe called and "{{bc | Help | About Plugins | LSMToolbox. Greg Joss gjoss@bio.mq.edu.au is in }}" which displays information about the Dept. of Biology, Macquarie University, Sydney, Australiaplugin.
=== Biorad ===
 This reading can be accessed via found by using the menu command “''{{bc | Image/| Show Info…''”Info...}}. Scroll down and it should give to get the time at which each slice was acquired. This can be selectedSelect this time, copied in to copy it into Excel , and find the time number obtained by searching and replacing (using the Excel menu command “''{{bc | Edit/| Replace''”) the text, leaving }}. This will leave only the time data. The “elapsed” "elapsed" time can then be calculated by subtracting row 1 from all subsequent rows.
== Pseudo-linescan ==
“Linescanning” is a mode of acquisition common to many confocal microscopes where a single pixel wide line is acquired over a period of time instead of the norma1 2-D, x-y image. Usually this allows faster acquisition. The single pixel wide images over the time course are stacked from left to right to generate a 2-D image (i,e, ''x''-''t'').
A “pseudo-linescan” is the generation Linescanning involves acquiring a single line, one pixel in width, from a common confocal microscope instead of a linescan-type x-t plot from standard 2D image. This is usually a 3faster way to take an image. All the single pixel-D (''x, y, t'') timecourse and can be useful in displaying 3-D data (x, y, t) in 2 dimensionswide images are then stacked to recreate the 2D image.
A line of interest must be drawn followed by the command: “''Image/Stacks/Reslice”'' or keyboard “/”. It will prompt for the line width. Enter the width of line you wish to be averaged. A pseudo-linescan “stack” will be generated, each slice representing the pseudo-linescan generation of a single-pixel wide line along the line of interest. To average the pseudo3-linescan “stack”, select “D (''Image/Stacks/Z-Project…''” and select the ''Averagex, y, t'' command) image. A polyline can be used although this will only allow a single pixel slice to be madeIt is useful for displaying 3-D data in 2 dimensions.
This example shows A line of interest is drawn followed by the elementary calcium events preceding command: {{bc | Image | Stacks | Reslice}} or with the keyboard button {{key|/}}. It will ask you for the line width that you wish to be averaged. It will generate a calcium wave. HeLa cell loaded pseudo-linescan "stack" with each slice representing the calciumpseudo-sensitive fluorophore, Fluo-3 and imaged whilst responding to application linescan of histamine. ('''A'''). Frame taken from timea single-course at pixel wide line along the peak line of interest. Average the calciumpseudo-release responselinescan "stack" by selecting {{bc | Image | Stacks | Z-Project... (}} and use the ''Average'B''') The command. A poly-line of pixels along X-Y was taken and stacked side by side from right-to left to can be utilized, but this will only generate a "pseudo-line scan". This allows visualisation of the progression of the wave from its initiation sitesingle pixel slice.
Fiji's default settings assume that stacks are ''z''-series rather than ''t''-series. This means that many functions related to the third-dimension of an image stack are referred to with a ''z-''. Just keep this in mind.
 Fiji assumes stacks to be ''z''-series rather than ''t''-series so many functions related to the third-dimension of an image stack are called “''z-”'' something – e.g. “z-axis profile” is intensity over time plot.== FRAP (Fluorescence Recovery After Photobleaching) Analysis ==
== FRAP Analysis ==The FRAP profiler plugin will analyse analyze the intensity of a beached bleached ROI over time and normalise this normalize it against the intensity of the whole cell. It After that it will then find the minimum intensity in the bleach bleached ROI and fit the recovery  from with this pointin mind.
To use:
1# Open the ROI manager.# Draw around the bleached ROI and add it to the ROI manager.# Draw around the whole cell and add that to the ROI manager. The normalization corrects for the bleaching that occurs during image acquisition and assumes the whole cell is in the field of view. Open '''The plugin assumes the larger of the two ROIs in the ROI manageris the whole cell ROI and that the smaller ROI is the bleached part.'''# Run the FRAP profiler plugin.# The plugin will return the intensity vs time plot, the normalized intensity vs time plot of the bleached area, and the curve fit.
2. Draw around the bleached ROI and Add to the ROI manager. 3. Draw around the whole cell and add to ROI manager. The normalisation corrects for the bleaching dues to image acquisition and assumes the whole cell is in the field of view. '''The plugin assumes the larger of the last two ROIs in the ROI manager is the whole cell ROI and the smaller the bleached ROI.''' 4. Run the FRAP profiler plugin. 5. The plugin will return the intensity vs time plot; the normalised intensity vs time plot of the bleached area and the curve fit. The normalisation corrects for the bleaching dues to image acquisition and assumes the whole cell is in the field of view. '''normalised intensity at time t = It&nbsp;<nowiki>= (Ib</nowiki>t&nbsp;÷ Ibmax)&nbsp; ÷ (Ict&nbsp;÷ Icmax)''' '''Ibt<nowiki>Non-linear contrast stretching = intensity of bleached ROI at time t.</nowiki>''' '''Ict<nowiki>= intensity of whole cell at time t.</nowiki>'''
== Non-linear contrast stretching ==
=== Equalization ===
{| style="border-spacing:0;"
| style="border:none;padding:0in;"| More You can have more control of the over brightness and contrast adjustment can be achieved adjustments with the“''the {{bc | Process/| Enhance contrast”''&nbsp;contrast}} menu command. Here, when applied to With a stack, it applies analyzes the adjustment based on each slice’s histogram, not just to make the one currently displayed as is done with the&nbsp;''Brightness and Contrast&nbsp;''windowadjustment.
“Equalize contrast” The ''Equalize contrast'' command applies a non-linear stretch of the histogram based on the square root of the its intensity (see online guide to image processing: [http://www.dai.ed.ac.uk/HIPR2/histeq.htm http://www.dai.ed.ac.uk/HIPR2/histeq.htm]).
|}
=== Gamma ===
<nowiki>This can be though of as a non-linear histogram adjustment. Faint objects can be made more intense without saturating bright objects (gamma <1). Similarly, medium-intensity objects can be made fainter without dimming the bright objects (gamma > 1). The intensity of each pixel is “raised to the power” of the gamma value and then scaled to 8-bits or the min and max of 16-bit images.</nowiki>
<nowiki>Gamma performs a non-linear histogram adjustment. Faint objects become more intense while bright objects do not (gamma <1). Also, medium-intensity objects become fainter while bright objects do not (gamma > 1). The intensity of each pixel is "raised to the power" of the gamma value and then scaled to 8-bits or the min and max of 16-bit images.</nowiki> For 8 bit images; New intensity = 255 ×&nbsp;''<nowiki>[(old intensity÷255)</nowiki>&nbsp;gamma'']
Gamma can be adjusted via the “''{{bc | Process/| Math/Gamma”''&nbsp;| Gamma}} command. It will allow you to adjust the gamma with the scroll bar. Click on ''Ok”Ok''&nbsp;when you are finished. You can use the Scroll-bar to determine the desired gamma value on one slice of your stack &nbsp;. There is also an option to preview the results&nbsp;.
[[File:gamma_pic.jpg]]
== Filtering ==
See the online reference:&nbsp;[http://www.dai.ed.ac.uk/HIPR2/filtops.htm http://www.dai.ed.ac.uk/HIPR2/filtops.htm]&nbsp;for a simple explanation of digital filtering.
See the [http://homepages.inf.ed.ac.uk/rbf/HIPR2/filtops.htm online reference] for an explanation of digital filters and how they work. Filters can be found under using the menu item “''command {{bc | Process/| Filters...''”''.''&nbsp;Typically use a “''Radius (pixels)''” of 1 which equates to a 3×3 “kernel” – see online reference}}.
''Mean filter'': the pixel is replaced with the average of it itself and its neighbours neighbors within the specified radius. The menu item “''{{bc | Process/| Smooth''” }} is a 3×3 mean filter.
''Gaussian filter'': The This is similar to a smoothing filter but instead replaces the pixel value with a pixel of value proportional to a normal distribution of it’s neighbours – not explained well, I know, but you’ve probably skipped the online reference and you need to read that to understand the way the filter works properlyits neighbors.
''Median filter'': The pixel value is replaced with the median of it itself and its adjacent neighboursneighbors. This removes noise and&nbsp;''preserves boundaries''&nbsp;better than simple mean average filtering, but can look odd. (The menu item “''{{bc | Process/| Noise/| Despeckle''” }} is a 3×3 median filter).
"Convolve filter": This allows two arrays of numbers to be multiplied together. The arrays can be different sizes but must be of the same dimension. In image analysis this process is generally used to produce an output image where the pixel values are linear combinations of certain input values.
"Maximum": This filter, also known as a dilation filter, is a morphological filter that considers the neighborhood around each pixel and, from this list of neighbors, determines the maximum value. Each pixel in the image is then replaced with the resulting value generated by each neighborhood.
''Sigma Kalman filter'': A modification on the standard mean This filter but preserves edges better – can be though of , also known as a “gentle smooth”. This filter will have to be downloaded. The user specifies the kernel sizeLinear Quadratic Estimation, the Sigma width and the minimum number of pixels to include. A&nbsp;''Sigma''&nbsp;value for the kernel is calculated (based recursively operates on the variance and mean of the intensities) and only pixels within this&nbsp;''Sigma range''&nbsp;(=&nbsp;''Sigma''&nbsp;× the user defined&nbsp;''Sigma Width&nbsp;''scaling factor) are used noisy inputs to calculate the mean. If there are too few pixels (exact number set in the user dialog:''Minimum number compute a statistically optimal estimate of pixels'') in the kernel that are within the Sigma range then the central pixel which is assumed to be spuriously low or high and the mean of the rest of the kernel is taken. Increasing the''Sigma width''&nbsp;and the&nbsp;''minimum number of pixels''&nbsp;results in increased smoothing and loss of edgesunderlying system state.
''Anisotropic Diffusion.''&nbsp;This is an edge preserving smoothing filter. It will have to be downloaded.== Background correction ==
[[File:anisotropic_diffusion_filterBackground correction can be done in multiple ways. A simple method is to use the {{bc | Image | Lookup Tables | HiLo}} LUT to display zero values as blue and white values (pixel value 255) as red.jpg]]&nbsp;
== Background correction ==Background correction can be done in several ways and is facilitated if the grey image has the “''Image/Lookup Tables/HiLo''” LUT loaded. This displays the zero values blue and the 255 white values red. If the With a background that is relatively even across the image, remove it is most simply remove with the ''Brightness/Contrast''&nbsp;command by slowly raise raising the&nbsp;''Minimum''&nbsp;value until most of the background is displayed blue. The press Press the&nbsp;''Apply&nbsp;''button to make a permanent change the grey-values and remove the background.
=== Rolling-Ball background correction ===
For uneven background the menu command “''Process/Subtract background''” can be used. This menu command removes uneven background from images using a “rolling ball” algorithm. The radius should be set to at least the size of the largest object that is&nbsp;''not''&nbsp;part of the background. It can also be used to remove background from gels where the background is white. Running the command several times may produce better results. The user can choose whether or not to have a light background, create a background (no subtraction), have a sliding paraboloid, disable smoothing, or preview the results. The default value for the rolling ball radius is 50 pixels.
 
To fix an uneven background use the menu command {{bc | Process | Subtract background}}. This will use a ''rolling ball'' algorithm on the uneven background. The radius should be set to at least the size of the largest object that is ''not'' part of the background. It can also be used to remove background from gels where the background is white. Running the command several times may produce better results. The user can choose whether or not to have a light background, create a background with no subtraction, have a sliding paraboloid, disable smoothing, or preview the results. The default value for the rolling ball radius is 50 pixels.
{| style="border-spacing:0;"
| style="border:none;padding:0.0194in;"| &nbsp;'''RAW'''| style="border:none;padding:0.0194in;"| &nbsp;| style="border:none;padding:0.0194in;"| “'''''{{bc | Process/| Subtract Background…”'''''Background...}}
|-
| style="border:none;padding:0.0194in;"| [[File:raw_rolling_ball_back_corr.jpg]]
|}
&nbsp;
 
Once the background has been evened, final adjustments can be made with the&nbsp;''Brightness/Contrast''control.
 
&nbsp;
 
Once the background has been evened, final adjustments can be made with the ''Brightness/Contrast'' control.
{| style="border-spacing:0;"
| style="border:none;padding:0.0194in;"| [[File:bright_contr_roll_ball.jpg]]
| style="border:none;padding:0.0194in;"| [[File:histogram_roll_ball.jpg]]
| style="border:none;padding:0.0194in;"| [[File:bright_contr_control_roll_ball.jpg]] 
|}
=== ROI background correction ===
The rolling-ball algorithm is time consuming. If the background is even across the field of view it is possible to select a background region of interest and subtract the mean value of this area for each slice from each slice. Use the selection tools to select an area of background and run the menu command “''Process/Subtract Background”''. This macro will subtract the mean of the ROI from the image plus an additional value equal to the standard deviation of the ROI multiplied by the scaling factor you enter (3 by default).
 
<nowiki>i.e. it subtracts [mean + (sd×scalingfactor)]</nowiki>
 
This macro also works with stacks and so can be used with time-courses with varying background.
 
&nbsp;
The rolling-ball algorithm takes a lot of time. To speed up the process with an image that has a more even background, select a region of interest from the background and subtract the mean value of this area for each slice from each slice. Use the selection tools to select an area of background and run the menu command {{bc | Process | Subtract Background}}. This macro will subtract the mean of the ROI from the image plus an additional value equal to the standard deviation of the ROI multiplied by the scaling factor you enter. The default for this is 3.
This macro, because it also works with stacks, can be used on time-courses with varying backgrounds.
{| style="border-spacing:0;"
| style="border:none;padding:0in;"| <center>'''Before correction'''</center>| style="border:none;padding:0in;"| <center>&nbsp;'''Background intensity over time'''</center>| style="border:none;padding:0in;"| <center>'''After ''ROI_BG_Correction''”'''</center> 
|-
| style="border:none;padding:0in;"| [[File:roi_back_corr_before.gif]]
| style="border:none;padding:0in;"| [[File:roi_back_corr_during.gif]]
| style="border:none;padding:0in;"| [[File:roi_back_corr_after.gif]]
 
|}
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
== Flat-field correction ==
 
=== Proper correction ===
This technique is applied to brightfield images. Uneven illumination, dirt/dust on lenses can result in a poor quality image. This can be corrected by acquiring a “flat-field” reference image&nbsp;''with the same intensity illumination as the experiment''. The flat field image should, ideally, be a field of view of the coverslip without any cells/debris. This is often not possible with the experimental coverslip, so a fresh coverslip may be used with approximately the same amount of buffer as the experiment. With fixed-specimens try removing the slide completely
 
Use this technique on brightfield images. You can correct uneven illumination or dirt/dust on lenses by acquiring a "flat-field" reference image ''with the same intensity illumination as the experiment''. The flat field image should be as close as possible to a field of view of the cover slip without any cells/debris. This is often not possible with the experimental cover slip, so a fresh cover slip may be used with approximately the same amount of buffer as the experiment.
{| style="border-spacing:0;"
| colspan="3" | [[File:flat_field_correction.gif]]
 
|-
|| <center>'''RAW'''</center>
|| <center>'''Flat-field'''</center>
|| <center>&nbsp;'''Processed'''</center> 
|}
{| style="border-spacing:0;"|| [[File:calculator_plus_flat_field.jpg]]|| 1.&nbsp;# Open both the experimental image and the flat-field image. 2.&nbsp;“# Click the ''Select all''” of button on the flat-field image (hotkey: A) and measure the average intensity (hotkey: M). This value , the k1 value, will appear in the results window and represents your k1 value below3.&nbsp;# Use the ''Image Calculator plus''plugin (“''Analyse''/''{{bc | Analyze | Tools/| Calculator plus''”&nbsp;}}). 4.&nbsp;# i1 = experimental image; i2 = flat-field image; k1 = mean flat-field intensity; k2 = 0. Select the "''Divide"&nbsp;''operation. This can also be done using the “''Process/Image Calculator”''function and ensuring the “32-bit Result” option is checked. You will then need to adjust the brightness and contrast and change the image to 8-bit.
&nbsp;This can also be done using the {{bc | Process | Image Calculator}}function with the ''32-bit Result'' option checked. Then adjust the brightness and contrast and convert the image to 8-bit.
|}[[File:calculator_plus_flat_field.jpg]]
=== Pseudo-correction ===
{| style="border-spacing:0;"
| colspan="2" style="border:none;padding:0in;"| [[File:pseudoCorrectionImage.gif]]Often  Sometimes it is not possible to obtain a flat-field reference image. However, it It is still possible to correct for illumination intensity (although , though not small defects such as like dust) , by making a “pseudo"pseudo-flat field” field" image by performing a large-kernel filter on the image to be corrected. This For those working with DIC images, this is particularly useful for DIC images where there is because they generally have an intrinsic, and distracting, gradient in illumination.
This can be accomplished simply by subtracting the Gaussian-blurred image version of the image.
This can also be used with stacks for brightfield time-courses that vary in intensity with time. This is Doing this with stacks can be time consuming though.
|-
| style="border:none;padding:0in;"| [[File:pseudoCorrRawCorrected.gif]]
| style="border:none;padding:0in;"| The first RAW image (top) is pseudo-flat field corrected. Here the pseudo-flat field corrects for the uneven illumination , but does not correct for the dust specks. Compare Look at this with compared to the result of a proper flat-field correction above.
|}
&nbsp;
=== FFT background correction ===
We sometimes see uneven illumination and also horizontal "scan lines" in transmitted light images acquired with confocal microscopes. This background can be corrected using the native FFT bandpass function (''Process/FFT/Bandpass Filter...).''
Experiment You can correct for uneven illumination and horizontal "scan lines" in transmitted light images acquired using confocal microscopes by using the native FFT bandpass function ({{bc | Process | FFT | Bandpass Filter...).}} You can experiment with the settings to optimize the filtering. The user can and also choose to filter structures down to a certain number of pixels. The default value is 40 pixels. He or she You can filter small structures up to a certain value. The default value is 3 pixels. The user can choose from a drop down menu whether to suppress stripes with None, Horizontal, or Vertical. The tolerance of direction can be chosen. The default is 5%. Finally, the user can choose whether to allow autoscale after filtering, saturation of the image when autoscaling, whether or not to display the filter, and whether or not to process an entire stack.
[[File:newFftBandFilter.jpg]]
&nbsp;
== Masking unwanted regions ==
 
=== Simple masking ===
Draw around the area you want with one of the ROI tools then use: “''Edit/Clear outside''”''.&nbsp;''This will change area outside the selected region to the background value.
&nbsp;Use one of the ROI tools to draw around the area of interest and then select: {{bc | Edit | Clear outside}}. This will change the area outside the selected region to the background value.
=== Complex masking ===
A more sophisticated masking can be done by “thresholding” the image and subtracting this new binary image from the original.
 
1.&nbsp;Duplicate the image (if it’s a stack it’s worthwhile generating a “average projection” of a few frames).
 
2.&nbsp;Threshold this image using the menu command “''Image/Adjust/Threshold''”.
 
3.&nbsp;Hit the Auto button and then adjust the sliders until cells are all highlighted red.
 
4.&nbsp;Then click “''Apply''”. Check the tick box: “black foreground, white background”. You should now have a white and black image with your cells black and background white. If you have white cells and black background, invert the image with “''Edit/Invert''”.
 
5.&nbsp;This can be smoothed (“''Process/Smooth''”) and the black area enlarged slightly with “''Process/Binary/Dilate''” to give a better mask
 
6.&nbsp;Using the regular Image calculator “''Process/Image calculator''” subtract this black and white “mask” image from your original image/stack.
&nbsp;More sophisticated masking can be done by ''thresholding'' the image and subtracting the new binary image from the original image.
&nbsp;# Duplicate the image, or, if it’s a stack, generate an ''average projection'' of a few frames.# Threshold this image with the menu command {{bc | Image | Adjust | Threshold}}.# Hit the Auto button and adjust the sliders until all the cells are highlighted red.# Click ''Apply''. Check the following box: ''black foreground, white background''. You should now have a white and black image with your cells black and background white. If you have white cells and black background, invert the image with {{bc | Edit | Invert}}.# This can be smoothed with the command {{bc | Process | Smooth}} and the black area enlarged slightly with {{bc | Process | Binary | Dilate}} to give a better mask.# Using the regular Image calculator {{bc | Process | Image calculator}} subtract this black and white "mask" image from your original image or stack.
[[Category:Cookbook]]
[[Category:Tutorials]]
Bureaucrat, emailconfirmed, incoming, administrator, uploaders
12,247
edits