PengStarobinets: Difference between revisions

From Psych 221 Image Systems Engineering
Jump to navigation Jump to search
imported>Projects221
No edit summary
imported>Projects221
No edit summary
Line 27: Line 27:
Existing restoration algorithms for this problem can generally be categorized in two ways.
Existing restoration algorithms for this problem can generally be categorized in two ways.


= Multi-Frame Reconstruction Framework =
== Multi-Frame Reconstruction Framework ==


First, a nonrigid image registration technique is used to register each observed frame with respect to a fixed reference grid (usually generated from an average of the image sequence to eliminate spatial variation). Next, the registration parameters are used to estimate the corresponding motion field for each frame and one frame is transformed back to a non-deformed position. Finally, a sharp image is formed through a Bayesian reconstruction filter.
First, a nonrigid image registration technique is used to register each observed frame with respect to a fixed reference grid (usually generated from an average of the image sequence to eliminate spatial variation). Next, the registration parameters are used to estimate the corresponding motion field for each frame and one frame is transformed back to a non-deformed position. Finally, a sharp image is formed through a Bayesian reconstruction filter.


= Lucky Imaging =  
== Lucky Imaging ==  


Image selection and fusion methods are used to reduce the blurring effects caused by turbulence. The image selection algorithm attempts to find frames of the best quality (lucky frames) from the image stream. The output image is then produced by fusing these best-quality images together. The principle behind this method is that for short-exposuer images, turbulence creates 'mutations' in image quality and randomly makes some images sharp. Lucky-image-based weighting schemes can be used to select the sharpest image or images with certain sharp regions, and combine them to create an image that is sharp everywhere.
Image selection and fusion methods are used to reduce the blurring effects caused by turbulence. The image selection algorithm attempts to find frames of the best quality (lucky frames) from the image stream. The output image is then produced by fusing these best-quality images together. The principle behind this method is that for short-exposuer images, turbulence creates 'mutations' in image quality and randomly makes some images sharp. Lucky-image-based weighting schemes can be used to select the sharpest image or images with certain sharp regions, and combine them to create an image that is sharp everywhere.


= Our Method =  
== Our Method ==  


To correct geometric distortion and reduce space and time-varying blur, a new approach is proposed in this paper capable of restoring a single high-quality image from a given image sequence distorted by atmospheric turbulence. This approach uses two major steps. For the first step, we use a B-spline based non-rigid image registration algorithm to register each observed frame with respect to a reference image. To improve registration accuracy, a symmetry constraint is introduced to the cost function to penalize inconsistency between the forward and backward deformation parameters during the estimation process. A fast Gauss-Newton method is used to reduce the computational cost of the registration algorithm. We improved the computational efficiency further by applying our method to multiple small blocks and stitching them together. In addition to reducing computational load and time, this improves on the original method by reducing the effect of systematic errors on the system, because an error will be isolated to the particular block rather than affecting the whole image. In the second step, we restore a high quality image from the registered observed frames using a high-pass sharpening filter.
To correct geometric distortion and reduce space and time-varying blur, a new approach is proposed in this paper capable of restoring a single high-quality image from a given image sequence distorted by atmospheric turbulence. This approach uses two major steps. For the first step, we use a B-spline based non-rigid image registration algorithm to register each observed frame with respect to a reference image. To improve registration accuracy, a symmetry constraint is introduced to the cost function to penalize inconsistency between the forward and backward deformation parameters during the estimation process. A fast Gauss-Newton method is used to reduce the computational cost of the registration algorithm. We improved the computational efficiency further by applying our method to multiple small blocks and stitching them together. In addition to reducing computational load and time, this improves on the original method by reducing the effect of systematic errors on the system, because an error will be isolated to the particular block rather than affecting the whole image. In the second step, we restore a high quality image from the registered observed frames using a high-pass sharpening filter.




== Proposed Approach ==
=== Proposed Approach ===
   
   


=== Non-rigid Image Registration ===
==== Non-rigid Image Registration ====
First, we obtain a reference image without image deformation, generally by averaging the frame sequence. The math is specified below in the equations section. However, in general, the geometric distortion between an observed distorted image and the reference image is obtained by the movement of control points placed in a grid on the images. B-spline interpolation is then used to map all the points from the reference image to the deformed image. A cost function is then calculated to minimize both the error between the mapped points and maximize symmetry between forward and backward deformations. After this cost function is minimized, a motion vector from the deformed image to the reference image is generated, and we can then register the deformed image and apply a sharpening filter to create a high-quality image.
First, we obtain a reference image without image deformation, generally by averaging the frame sequence. The math is specified below in the equations section. However, in general, the geometric distortion between an observed distorted image and the reference image is obtained by the movement of control points placed in a grid on the images. B-spline interpolation is then used to map all the points from the reference image to the deformed image. A cost function is then calculated to minimize both the error between the mapped points and maximize symmetry between forward and backward deformations. After this cost function is minimized, a motion vector from the deformed image to the reference image is generated, and we can then register the deformed image and apply a sharpening filter to create a high-quality image.




=== Equations===
= Equations=
The initial test points are taken with equal spacing and can be represented as:
The initial test points are taken with equal spacing and can be represented as:
<math> \hat{\mathbf{x}}_{0i} = (\hat{x}_{0i},\hat{y}_{0i})^T </math>
<math> \hat{\mathbf{x}}_{0i} = (\hat{x}_{0i},\hat{y}_{0i})^T </math>
Line 107: Line 107:
where <math> \frac{\part R(\mathbf{W(x; } \overrightarrow{\mathbf{p}}^l \mathbf{)})}{\part \mathbf{W}} = [r_x(\mathbf{W}),r_y(\mathbf{W})]</math> and is the gradient of the averaged image R at the deformed pixel location <math> \mathbf{W(x; } \overrightarrow{\mathbf{p}}^l \mathbf{)}) </math>.
where <math> \frac{\part R(\mathbf{W(x; } \overrightarrow{\mathbf{p}}^l \mathbf{)})}{\part \mathbf{W}} = [r_x(\mathbf{W}),r_y(\mathbf{W})]</math> and is the gradient of the averaged image R at the deformed pixel location <math> \mathbf{W(x; } \overrightarrow{\mathbf{p}}^l \mathbf{)}) </math>.


=== MR Analysis ===
The MR data was analyzed using [http://white.stanford.edu/newlm/index.php/MrVista mrVista] software tools.
==== Pre-processing ====
All data were slice-time corrected, motion corrected, and repeated scans were averaged together to create a single average scan for each subject. Et cetera.
==== PRF model fits ====
PRF models were fit with a 2-gaussian model.
==== MNI space ====
After a pRF model was solved for each subject, the model was trasnformed into MNI template space. This was done by first aligning the high resolution t1-weighted anatomical scan from each subject to an MNI template. Since the pRF model was coregistered to the t1-anatomical scan, the same alignment matrix could then be applied to the pRF model. <br>
Once each pRF model was aligned to MNI space, 4 model parameters - x, y, sigma, and r^2 - were averaged across each of the 6 subjects  in each voxel.
Et cetera.


= Results - What you found =
= Results - What you found =
== Retinotopic models in native space ==
Some text. Some analysis. Some figures.
== Retinotopic models in individual subjects transformed into MNI space ==
Some text. Some analysis. Some figures.
== Retinotopic models in group-averaged data on the MNI template brain ==
Some text. Some analysis. Some figures. Maybe some equations.
== Retinotopic models in group-averaged data projected back into native space ==
Some text. Some analysis. Some figures.


= Conclusions =
= Conclusions =
Line 148: Line 116:
= References - Resources and related work =
= References - Resources and related work =


References
= References =


[1] Zhu, X. and Milanfar, P., “<span style="text-decoration:underline">Image Reconstruction from Videos Distorted by Atmospheric Turbulance</span>”, <i>SPIE Electronic Imaging, Conference 7543 on Visual Information Processing and Communication</i>, San Jose, CA, 2010
[1] Zhu, X. and Milanfar, P., “<span style="text-decoration:underline">Image Reconstruction from Videos Distorted by Atmospheric Turbulance</span>”, <i>SPIE Electronic Imaging, Conference 7543 on Visual Information Processing and Communication</i>, San Jose, CA, 2010

Revision as of 21:19, 19 March 2013

Back to Psych 221 Projects 2013




Background

The performance of long-distance imaging systems can often be strongly affected by atmospheric turbulence caused by variation of refractive index along the optical transmission path. Such turbulence can produce geometric distortion, space and time-variant defocus blur, and motion blur. An example is shown in the following video of the moon.

Below is the exmaple of atmospheric turbulence that was used for this project:

Moon with turbulence
Recording of the moon with effects of turbulence

There have been many approaches to solving this problem that attempt to restore a single high-quality image from an observed frame sequence distorted by air turbulence. As in the video, these approaches, and the approach addressed in this paper, work under the assumption that the scene and the image sensor are both static and that observed motions are due to the air turbulence alone.

The imaging process can be modeled as:

where denotes the ideal image, and represent the geometric deformation and blurring matrices respectively, denotes additive noise, and is the k-th observed frame.

The key then becomes to basically reverse this process so that we can find the desired corrected image.

Methods

Existing restoration algorithms for this problem can generally be categorized in two ways.

Multi-Frame Reconstruction Framework

First, a nonrigid image registration technique is used to register each observed frame with respect to a fixed reference grid (usually generated from an average of the image sequence to eliminate spatial variation). Next, the registration parameters are used to estimate the corresponding motion field for each frame and one frame is transformed back to a non-deformed position. Finally, a sharp image is formed through a Bayesian reconstruction filter.

Lucky Imaging

Image selection and fusion methods are used to reduce the blurring effects caused by turbulence. The image selection algorithm attempts to find frames of the best quality (lucky frames) from the image stream. The output image is then produced by fusing these best-quality images together. The principle behind this method is that for short-exposuer images, turbulence creates 'mutations' in image quality and randomly makes some images sharp. Lucky-image-based weighting schemes can be used to select the sharpest image or images with certain sharp regions, and combine them to create an image that is sharp everywhere.

Our Method

To correct geometric distortion and reduce space and time-varying blur, a new approach is proposed in this paper capable of restoring a single high-quality image from a given image sequence distorted by atmospheric turbulence. This approach uses two major steps. For the first step, we use a B-spline based non-rigid image registration algorithm to register each observed frame with respect to a reference image. To improve registration accuracy, a symmetry constraint is introduced to the cost function to penalize inconsistency between the forward and backward deformation parameters during the estimation process. A fast Gauss-Newton method is used to reduce the computational cost of the registration algorithm. We improved the computational efficiency further by applying our method to multiple small blocks and stitching them together. In addition to reducing computational load and time, this improves on the original method by reducing the effect of systematic errors on the system, because an error will be isolated to the particular block rather than affecting the whole image. In the second step, we restore a high quality image from the registered observed frames using a high-pass sharpening filter.


Proposed Approach

Non-rigid Image Registration

First, we obtain a reference image without image deformation, generally by averaging the frame sequence. The math is specified below in the equations section. However, in general, the geometric distortion between an observed distorted image and the reference image is obtained by the movement of control points placed in a grid on the images. B-spline interpolation is then used to map all the points from the reference image to the deformed image. A cost function is then calculated to minimize both the error between the mapped points and maximize symmetry between forward and backward deformations. After this cost function is minimized, a motion vector from the deformed image to the reference image is generated, and we can then register the deformed image and apply a sharpening filter to create a high-quality image.


Equations

The initial test points are taken with equal spacing and can be represented as:

Running correlation algorithm, we found the deformed locations of the test points. This difference between the original positions and the deformed position are then stored in the deformation vector:

=

Using B-spline interpolation, we defined the spline basis and the basis function matrix for each pixel where .

By definition, is:

, where

The basis function matrix is then:


With the basis function matrix, we can then define the deformed coordinates for every pixel:

As suggested in Professor Milanfar's paper, instead of using a classic B-spline registration approach to the estimation of the deformation vector through minimization of the following cost function,

which is prone to local minima traps, one can use the following cost function:

by initial approximation that:

where we initially assume that

Then, after each iteration, the cost deformation vector can be updated as:


The following equations describe the system:

, where .

The faster implementation, as suggested in the paper is calculating and the following way:

where:

where and is the gradient of the averaged image R at the deformed pixel location .


Results - What you found

Conclusions

Here is where you say what your results mean.

References - Resources and related work

References

[1] Zhu, X. and Milanfar, P., “Image Reconstruction from Videos Distorted by Atmospheric Turbulance”, SPIE Electronic Imaging, Conference 7543 on Visual Information Processing and Communication, San Jose, CA, 2010

[2] Shimizu, M., Yoshimura, S., Tanaka, M., “Super-Resolution from Image Sequence under Influence of Hot-Air Optical Turbulence”, CVPR 2008 , 1–8 (June 2008)

[3] Zhu, X. and Milanfar P., “Removing Atmospheric Turbulence via Space-Invariant Deconvolution”, IEEE Trans. on Pattern Analysis and Machine Intelligence vol. 35, no. 1, pp. 157-170, Jan. 2013

[4] Szelinski, R. and Coughlan J., “Spline-Based Image Registration”, CRL, Jan. 1994

[5] Joshi, N. and Cohen M., “Seeing Mt. Rainier: Lucky Imaging for Multi-Image Denoising, Sharpening, and Haze Removal”, Microsoft Research, ICCP, 2010


Software

Appendix I - Code and Data

Code

File:CodeFile.zip

Data

The data has been provided by Professor Milanfar. Originally provided by NASA Langley Research Center.

MoonSurface data

Appendix II - Work partition (if a group project)

Brian and Bob gave the lectures. Jon mucked around on the wiki.