Corrector » History » Version 1
Amber Herold, 04/23/2010 09:54 AM
| 1 | 1 | Amber Herold | h1. Corrector |
|---|---|---|---|
| 2 | |||
| 3 | |||
| 4 | Corrector handles image corrections before it is displayed and saved. It has three |
||
| 5 | functions: |
||
| 6 | |||
| 7 | |||
| 8 | |||
| 9 | |||
| 10 | * Create the normalization images by acquiring bright/dark reference images. |
||
| 11 | |||
| 12 | |||
| 13 | * Upon the request by another node, load the normalization image from the requested |
||
| 14 | channel and perform the flat-field correction. |
||
| 15 | |||
| 16 | |||
| 17 | * Perform addition corrections such as despiking, intensity clipping, and specific |
||
| 18 | pixel/column/row intensity correction to the flat-field corrected image above. |
||
| 19 | |||
| 20 | |||
| 21 | |||
| 22 | |||
| 23 | |||
| 24 | <highlights> |
||
| 25 | |||
| 26 | Required bindings: None |
||
| 27 | |||
| 28 | </highlights> |
||
| 29 | |||
| 30 | |||
| 31 | h2. Normalization Image |
||
| 32 | |||
| 33 | |||
| 34 | |||
| 35 | Flat field correction removes the contribution of dark current to the intensity and |
||
| 36 | artifacts on the CCD camera that are reproducible, for example, the patterns of the fiber |
||
| 37 | optic plate and debris fall and remain stationary on the CCD. |
||
| 38 | |||
| 39 | |||
| 40 | Dark images record the residual intensity recorded by the CCD for the same length of |
||
| 41 | acquisition time as the chosen camera configuration but with no electron beam present. |
||
| 42 | Bright images record the raw image under the same condition except that the camera is |
||
| 43 | flooded with uniform electron beam. |
||
| 44 | |||
| 45 | |||
| 46 | Let the mean of an image be avg(Image) |
||
| 47 | |||
| 48 | |||
| 49 | Normalization_Image_Pixel_Value = [avg(Bright_Image-Dark_Image)]/(Bright_Pixel |
||
| 50 | -Dark_Pixel) |
||
| 51 | |||
| 52 | |||
| 53 | Flat-Field_Corrected Image_Pixel_Value = (Raw_Image_Pixel_Value) * |
||
| 54 | (Normalization_Image_Pixel_Value) |
||
| 55 | |||
| 56 | |||
| 57 | Some Leginon functions requires more than one image, for example the cross/phase |
||
| 58 | correlation done in drift monitoring of Drift Manager node. When the node acquires a new |
||
| 59 | image that will be used to correlated to an old image, it checks the correction channel that |
||
| 60 | the old image used, and force the new image to use a different correction channel. This |
||
| 61 | process eliminates the origin correlation peak produced by identical noise in the two images |
||
| 62 | when the same correction channel is used. |
||
| 63 | |||
| 64 | |||
| 65 | |||
| 66 | h2. Settings for Creating the Normalization Image |
||
| 67 | |||
| 68 | |||
| 69 | |||
| 70 | * Instrument and Camera Configuration |
||
| 71 | |||
| 72 | |||
| 73 | Best to use an exposure time/intensity similar to the data acquisition |
||
| 74 | |||
| 75 | |||
| 76 | * Images to combine |
||
| 77 | |||
| 78 | |||
| 79 | * Combine method = averge|median |
||
| 80 | |||
| 81 | |||
| 82 | Both methods are applied per pixel. Averge is used normally. Medium is used when |
||
| 83 | x-ray spikes are a common problem and requires a larger number of combining |
||
| 84 | images. |
||
| 85 | |||
| 86 | |||
| 87 | * Number of Channels = the numbers of separate normalization images that will be |
||
| 88 | saved for the camera configuration. |
||
| 89 | |||
| 90 | |||
| 91 | |||
| 92 | |||
| 93 | |||
| 94 | |||
| 95 | |||
| 96 | h2. Settings for Image Flat-Field Correction from Another Node |
||
| 97 | |||
| 98 | |||
| 99 | |||
| 100 | |||
| 101 | |||
| 102 | * No settings are required. If normalization image does not exist for the camera |
||
| 103 | configuration, there will be no correction. Channel selection is also |
||
| 104 | automatic. |
||
| 105 | |||
| 106 | |||
| 107 | |||
| 108 | |||
| 109 | |||
| 110 | |||
| 111 | |||
| 112 | |||
| 113 | |||
| 114 | |||
| 115 | |||
| 116 | h2. Correction by the correction plan |
||
| 117 | |||
| 118 | |||
| 119 | |||
| 120 | Correction plan is a list of bad columns, rows, and pixels that tend to give |
||
| 121 | non-repeating error readings. A good example is often found at the last columns of the CCD. |
||
| 122 | Because their non-repeating nature, flat-field correction can not remove their |
||
| 123 | contribution. |
||
| 124 | |||
| 125 | |||
| 126 | The correction plan is associated to individual instrument, camera, and camera |
||
| 127 | configuration. |
||
| 128 | |||
| 129 | |||
| 130 | |||
| 131 | |||
| 132 | * Edit Plan = Add/Edit/Delete the bad columns/rows/pixels. Separate values by |
||
| 133 | commas and pixel coordinates should be in ( ). For example, a bad pixel list may be |
||
| 134 | entered as (10,20),(11,20),(11,21). |
||
| 135 | |||
| 136 | |||
| 137 | * Grab from Image = Grab bad pixels marked in red on the image displayed. |
||
| 138 | |||
| 139 | |||
| 140 | |||
| 141 | |||
| 142 | |||
| 143 | |||
| 144 | |||
| 145 | |||
| 146 | |||
| 147 | h2. Intensity Clipping and Image Despike |
||
| 148 | |||
| 149 | |||
| 150 | |||
| 151 | Intensity clipping and image despike are done after flat-field correction. Intensity |
||
| 152 | clipping simply replace pixel values that is outside the min/max range with the limits. |
||
| 153 | Despike defines a hot pixel as a pixel that has intensity higher than the threshold |
||
| 154 | multiples of standard deviation above the mean of a neighborhood box. The intensity of the |
||
| 155 | hot pixel is replaced by the mean of the neighborhood box. |
||
| 156 | |||
| 157 | |||
| 158 | |||
| 159 | h2. Related Settings |
||
| 160 | |||
| 161 | |||
| 162 | The settings related to these two corrections apply to all camera configuration and |
||
| 163 | images passed through Corrector. |
||
| 164 | |||
| 165 | |||
| 166 | |||
| 167 | |||
| 168 | * Clipping Max | Min |
||
| 169 | |||
| 170 | |||
| 171 | * Despike Neighborhood Size (pixel): An input of 11 gives a box of 11x11 centered |
||
| 172 | at the pixel where spiking is evaluated. |
||
| 173 | |||
| 174 | |||
| 175 | * Despike Theshold (x standard deviation above the mean of the neighborhood box |
||
| 176 | (For example 11x11=121 pixels)) |
||
| 177 | |||
| 178 | |||
| 179 | |||
| 180 | |||
| 181 | |||
| 182 | |||
| 183 | |||
| 184 | |||
| 185 | |||
| 186 | |||
| 187 | |||
| 188 | h2. Find A Single Bad Pixel |
||
| 189 | |||
| 190 | |||
| 191 | |||
| 192 | When a single pixel is defected, it may not be easy to find it on a large image, even if |
||
| 193 | it changes the stats dramatically. A tool is available to help finding these pixels: |
||
| 194 | |||
| 195 | |||
| 196 | * Leginon/Correction> Acquire either a corrected image that shows the bad |
||
| 197 | stats. |
||
| 198 | |||
| 199 | |||
| 200 | * Leginon/Correction/Toolbar> Left-click on the <inlinegraphic |
||
| 201 | fileref="http://emg.nysbc.org/software/leginon/images/icons/stagelocations.png"/> |
||
| 202 | button to "Add extreme points to bad pixel list". There |
||
| 203 | |||
| 204 | |||
| 205 | * Leginon/Correction/Tools> Left-click on the "Add Region" tool that looks like |
||
| 206 | "+". This adds the selected bad region to the bad pixel plan. |
||
| 207 | |||
| 208 | |||
| 209 | * Leginon/Corrections> Acquire a corrected image in the same configuration to |
||
| 210 | check if the apearance improves. |
||
| 211 | |||
| 212 | |||
| 213 | |||
| 214 | |||
| 215 | |||
| 216 | |||
| 217 | |||
| 218 | h2. Bad Region Correction |
||
| 219 | |||
| 220 | |||
| 221 | |||
| 222 | When a large region is covered by a fallen chip, image correction through bright/dark |
||
| 223 | reference may not be sufficient to produce a spike-free image since the bright and dark |
||
| 224 | values in the region are almost identical. To add such a large region into bad pixel plan, |
||
| 225 | do the following: |
||
| 226 | |||
| 227 | |||
| 228 | * Leginon/Correction> Acquire either a bright or corrected image that shows the |
||
| 229 | bad region clearly. |
||
| 230 | |||
| 231 | |||
| 232 | * Leginon/Correction> Use "Regions" target tool next to the image to enclose the |
||
| 233 | bad region. The corners that the target tool identifies can be larger than the bad |
||
| 234 | region but should be close to its size so that not too much is corrected. |
||
| 235 | |||
| 236 | |||
| 237 | * Leginon/Correction/Tools> Left-click on the "Add Region" tool that looks like |
||
| 238 | "+". This adds the selected bad region to the bad pixel plan. |
||
| 239 | |||
| 240 | |||
| 241 | * Leginon/Corrections> Acquire a corrected image in the same configuration to |
||
| 242 | check if the apearance improves. |