Question: remove the artifacts introduced by changing flat fields, we need to make the correction dynamic as well. 2 Conventional flat field correction Conventional flat field
remove the artifacts introduced by changing flat fields, we need to make the correction dynamic as well.
Conventional flat field correction
Conventional flat field correction FCC works by exploiting the LambertBeer law, which gives a projection
of the Xray signal attenuated by the material of the object we're scanning.
exp
to get the attenuation from equation we simply divide by the intensity and take the logarithm to get
rid of the exponential. To compensate for the dark current of the detector, we additionally subtract the dark
field image
In practice and are mean images created from several scans to average out temporal differences. But
when the source and detector have instable behaviours over time, this can not adequately remove the arti
facts.
FFC for dynamic processes
To correct for the changing conditions, we have to assign a changing to every projection. The corrected
or normalized projection for each angle is then given by
where is the index of the projection, is the average dark field image and is the flat field corresponding
to the projection with the same index. Now we can certainly remove the object after every angle and take
a flat field, but that would severely influence the scanning quality. Ideally we want a flat field for every
projection, but we do not want to take intermediate flat fields. So we first make several scans to estimate
the fluctuations in the flat fields and then make our scan. We then try to estimate a flat field for each of the
projections out of the flat fields we took in the beginning. Eigen Flat Fields
Vincent Van Nieuwenhove developed a technique for that, which he named "Eigen Flatfield Correction"
EFF correctionI The algorithm is as follows:
Compute eigen flatfield
a Prepare the flatfield matrix with size with the number of pixels in a single flatfield and
the number of flatfields. Then subtract the mean of the dark field images.
b Compute centered flatfield matrix by simply subtracting mean flatfield from each individual
flatfield.
c Compute eigen vectors and eigenvalues of the covariance matrix Refer to the
original paper I to make this computation more efficient!
d Calculate standard deviation of the flatfield matrix A across several flatfields. Then draw sam
ple matrices from a multivariate normal distribution with identical size as matrix A and that
standard deviation.
e Calculate eigenvalues of covariance of each matrix and compute the average over the repi
tions
f Select the eigen flatfields that have the eigenvalues larger than of the computed eigenvalues
of the random matrices. You can do that by looking at the average value that each eigenvalue gets
for all the random matrices; if an eigenvalue is above this average value plus times the stan
dard deviation, then it an acceptable eigenvalue. At the end of this step, you will get principle
EFFs, which depends on the number of flatfields that meet the above criterion.
Estimate dynamic flatfields
a A single dynamic flatfield is generated by linearly combining above eigen flatfields with certain
weights. The optimization function is constructed using formula in the paper. It minimizes
the gradient magnitude of the flat fields.
b This optimization can be solved by using a customized cost function with the optimize minimize
of the scipy Python package. For more information, please refer to the documentation.
Tasks
Write a Python script that uses the dataset on provided on Blackboard and imple ments the Eigen
Flat Field Correction described above. The dataset is composed by in this order dark field images,
flat fields, projections, and flat fields. You can neglect the projection and some of the flat
field images if the memory requirement is too high for your laptop.
Tip: Make yourself a favour and define functions to implement a specific taskfunctionality
Think of an approach to comp
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
