Project

General

Profile

Corrector » History » Version 5

Amber Herold, 06/25/2010 12:42 PM

1 1 Amber Herold
h1. Corrector
2
3 3 Eric Hou
Corrector handles image corrections before it is displayed and saved. It has three functions:
4 1 Amber Herold
5
*  Create the normalization images by acquiring bright/dark reference images.
6
7 3 Eric Hou
*  Upon the request by another node, load the normalization image from the requested channel and perform the flat-field correction.
8 1 Amber Herold
9 3 Eric Hou
*  Perform addition corrections such as despiking, intensity clipping, and specific pixel/column/row intensity correction to the flat-field corrected image above.
10 1 Amber Herold
11
Required bindings: None
12
13
h2.  Normalization Image
14
15 3 Eric Hou
Flat field correction removes the contribution of dark current to the intensity and artifacts on the CCD camera that are reproducible, for example, the patterns of the fiber optic plate and debris fall and remain stationary on the CCD.
16 1 Amber Herold
17 3 Eric Hou
Dark images record the residual intensity recorded by the CCD for the same length of acquisition time as the chosen camera configuration but with no electron beam present. Bright images record the raw image under the same condition except that the camera is flooded with uniform electron beam.
18 1 Amber Herold
19
Let the mean of an image be avg(Image)
20
21 3 Eric Hou
Normalization_Image_Pixel_Value = [avg(Bright_Image-Dark_Image)]/(Bright_Pixel -Dark_Pixel)
22 1 Amber Herold
23 3 Eric Hou
Flat-Field_Corrected Image_Pixel_Value = (Raw_Image_Pixel_Value) * (Normalization_Image_Pixel_Value)
24 1 Amber Herold
25 3 Eric Hou
Some Leginon functions requires more than one image, for example the cross/phase correlation done in drift monitoring of Drift Manager node. When the node acquires a new image that will be used to correlated to an old image, it checks the correction channel that the old image used, and force the new image to use a different correction channel. This process eliminates the origin correlation peak produced by identical noise in the two images when the same correction channel is used.
26 1 Amber Herold
27
h2.  Settings for Creating the Normalization Image
28
29
* Instrument and Camera Configuration
30
31 3 Eric Hou
 Best to use an exposure time/intensity similar to the data acquisition
32 1 Amber Herold
33
* Images to combine
34
35 5 Amber Herold
* Combine method = average|median
36 1 Amber Herold
37 5 Amber Herold
 Both methods are applied per pixel. Average is used normally. Medium is used when x-ray spikes are a common problem and requires a larger number of combining images.
38 1 Amber Herold
39 3 Eric Hou
* Number of Channels = the numbers of separate normalization images that will be saved for the camera configuration.
40 1 Amber Herold
41
h2.  Settings for Image Flat-Field Correction from Another Node
42
43 3 Eric Hou
* No settings are required. If normalization image does not exist for the camera configuration, there will be no correction. Channel selection is also automatic.
44 1 Amber Herold
45
h2.  Correction by the correction plan
46
47 3 Eric Hou
Correction plan is a list of bad columns, rows, and pixels that tend to give non-repeating error readings. A good example is often found at the last columns of the CCD. Because their non-repeating nature, flat-field correction can not remove their contribution.
48 1 Amber Herold
49 3 Eric Hou
The correction plan is associated to individual instrument, camera, and camera configuration.
50 1 Amber Herold
51 3 Eric Hou
*  Edit Plan = Add/Edit/Delete the bad columns/rows/pixels. Separate values by commas and pixel coordinates should be in ( ). For example, a bad pixel list may be entered as (10,20),(11,20),(11,21).
52 1 Amber Herold
53
*  Grab from Image = Grab bad pixels marked in red on the image displayed.
54
55
h2.  Intensity Clipping and Image Despike
56
57 3 Eric Hou
Intensity clipping and image despike are done after flat-field correction. Intensity clipping simply replace pixel values that is outside the min/max range with the limits. Despike defines a hot pixel as a pixel that has intensity higher than the threshold multiples of standard deviation above the mean of a neighborhood box. The intensity of the hot pixel is replaced by the mean of the neighborhood box.
58 1 Amber Herold
59
h2. Related Settings
60
61 3 Eric Hou
The settings related to these two corrections apply to all camera configuration and images passed through Corrector.
62 1 Amber Herold
63
* Clipping Max | Min
64
65 3 Eric Hou
* Despike Neighborhood Size (pixel): An input of 11 gives a box of 11x11 centered at the pixel where spiking is evaluated.
66 1 Amber Herold
67 3 Eric Hou
* Despike Theshold (x standard deviation above the mean of the neighborhood box (For example 11x11=121 pixels))
68 1 Amber Herold
69
h2. Find A Single Bad Pixel
70
71 3 Eric Hou
When a single pixel is defected, it may not be easy to find it on a large image, even if it changes the stats dramatically. A tool is available to help finding these pixels:
72 1 Amber Herold
73 3 Eric Hou
*  Leginon/Correction> Acquire either a corrected image that shows the bad stats.
74 1 Amber Herold
75 5 Amber Herold
*  Leginon/Correction/Toolbar> Left-click on the !http://emg.nysbc.org/software/leginon/images/icons/stagelocations.png! button to "Add extreme points to bad pixel list". There
76 1 Amber Herold
77 3 Eric Hou
*  Leginon/Correction/Tools> Left-click on the "Add Region" tool that looks like "+". This adds the selected bad region to the bad pixel plan.
78 1 Amber Herold
79 5 Amber Herold
*  Leginon/Corrections> Acquire a corrected image in the same configuration to check if the appearance improves.
80 1 Amber Herold
81
h2. Bad Region Correction
82
83 3 Eric Hou
When a large region is covered by a fallen chip, image correction through bright/dark reference may not be sufficient to produce a spike-free image since the bright and dark values in the region are almost identical. To add such a large region into bad pixel plan, do the following:
84 1 Amber Herold
85 3 Eric Hou
*  Leginon/Correction> Acquire either a bright or corrected image that shows the bad region clearly.
86 1 Amber Herold
87 3 Eric Hou
*  Leginon/Correction> Use "Regions" target tool next to the image to enclose the bad region. The corners that the target tool identifies can be larger than the bad region but should be close to its size so that not too much is corrected.
88 1 Amber Herold
89 3 Eric Hou
*  Leginon/Correction/Tools> Left-click on the "Add Region" tool that looks like "+". This adds the selected bad region to the bad pixel plan.
90 1 Amber Herold
91 5 Amber Herold
*  Leginon/Corrections> Acquire a corrected image in the same configuration to check if the appearance improves.
92 2 Amber Herold
93
______
94
95
[[Click Target Finder|< Click Target Finder]] | [[Dose Calibrator|Dose Calibrator >]]
96
97
______