Coded Aperture Imaging

学习multipinhole,涉及到optimize pinhole distribution,要看许多关于camera的问题。

 

传统的lens相机在普通光学领域应用较好,但在高能射线分析不好,原因是穿透力强,不易产生折射效应。所以x ray多用基于传统pinhole的camera,但问题是低resolution,还有光源和detector角度造成的模糊。

 

 

Mmm, gumballs...

This image was taken with a traditional camera and lens, but could just as easily been taken with a pinhole camera, in which the lens is replaced with a small hole. Pinhole cameras have a couple of advantages over lenses - they have infinite depth of field, and they don't suffer from chromatic aberration, which can be cured in a refractive system only by using a multiple element lens. Because they don't rely on refraction, pinhole cameras can be used to form images from X-ray and other high energy sources, which are normally difficult or impossible to focus. 

Coded Aperture Imaging_第1张图片Coded Aperture Imaging_第2张图片The biggest problem with pinholes is that they are... pinholes. They let very little light through to the film or other detector. This problem can be overcome to some degree by making the hole larger, which unfortunately leads to a decrease in resolution. The smallest feature which can be resolved by a pinhole is approximately the same size as the pinhole itself. The larger the hole, the more blurred the image becomes. Using multiple, small pinholes might seem to offer a way around this problem, but this gives rise to a confusing montage of overlapping images. Nonetheless, if the pattern of holes is carefully chosen, it is possible to reconstruct the original image with a resolution equal to that of a single hole. 

 

 


可以通过coded aperture的方法解决

 

This pattern is a Modified Uniformly Redundant Array, or MURA. A MURA pattern can be used as the aperture of a pinhole camera, and consists of nearly 50% open space. In the case shown, the MURA is 211 elements on a side, which gives it a light gathering power ~22,000 times that of a single pinhole. A MURA is constructed on a square lattice whose side length p is prime; each element of the MURA, A i,j, where i and j run from 0 to p − 1, is:

  • 0 if i = 0,
  • 1 if j = 0, i != 0,
  • 1 if CiCj = +1,
  • 0 otherwise,
where C q = +1 if q is a quadratic residue modulo p, and −1 otherwise. C  q is also known as the Jacobi symbol. If x 2 mod p = q mod p, q is said to be a quadratic residue of p. The resulting array of 1's and 0's can be cyclically shifted to bring the upper left corner to the center of the array, resulting in the pattern shown, where white corresponds to 1 and black corresponds to 0.


Coded Aperture Imaging_第3张图片In any case, if we use this MURA as the aperture of our camera, the original gumball scene produces an image which most would not consider to be a great improvement over that produced by a single pinhole. The multiple overlapping images generate what could graciously be called a huge mess.

There's hope, however... 

Coded Aperture Imaging_第4张图片This decoding pattern is based on the MURA above. Its elements, Gi,j, are constructed from the MURA's elements Ai,j and are equal to:

  • +1 if i + j = 0,
  • +1 if Ai,j = 1 (i + j != 0),
  • −1 if Ai,j = 0 (i + j != 0)

Each 0 in the MURA is replaced by a −1 in this pattern, with the exception of the upper left element, which is always 1. Again, the resulting pattern has been cyclically shifted to bring the upper left corner into the center, which shows the symmetry of the array.

If we now perform the correlation of the smeared image above with the decoding pattern, we can reconstruct the original scene with a resolution equal to the smallest element of the MURA, with a tremendous gain in light gathering power. 

A couple of interesting points remain. First, actually building a pinhole camera using this technique is not straightforward. Because a tremendous amount of light comes through the aperture, exposure times become much shorter than with a single pinhole. The resulting image must then be digitized and fed to a computer for post processing; alignment of the image becomes a problem. Still, it might be worth making a transparency of the aperture shown above, and projecting its image through a tube onto a translucent screen, where it could be photographed directly. The ultimate camera would let the pattern from the aperture fall onto a CCD, which would digitize the image directly and pass it along to a microprocessor for the requisite mathematical treatment.

It is not clear whether such a camera would exhibit the infinite depth of field associated with single pinholes. Light reflecting from different points of an object close to the aperture would enter the mask at different angles, which would seem to necessitate a more complex decoding procedure. Still, we can speculate that the resulting pattern would carry enough information to reconstruct the depth information from the scene. This is an interesting problem which needs further exploration.

 

 

For those interested in generating their own matrices, the results given by the above algorithms for a 5 x 5 MURA and its decoding array are:

A
0 0 0 0 0
1 1 0 0 1
1 0 1 1 0
1 0 1 1 0
1 1 0 0 1

G
+ − − − −
+ + − − +
+ − + + −
+ − + + −
+ + − − +

The images presented here were constructed by convolving the original image with matrix representations of the apertures in Mathematica. The original color image was split into red, green and blue channels within Photoshop, and these monochrome images were saved in raw format. After processing, the resulting data files were read back into Photoshop and recombined into a color image. Mathematica performs Fast Fourier Transforms to aid in the convolution and correlation operations, and also has a function which returns the Jacobi symbol.

 

 

Building a real coded aperture camera is difficult. We have cheerfully assumed here that the detected scene ends abruptly at precisely the limit of the aperture's field of view. In real life, sources outside the field of view cause partial views of the aperture to fall on the detector or film, which adds noise and spurious images to the reconstructed product. Also, misalignment of the aperture and detector elements will cause further difficulties. Nevertheless, several such cameras have been built and used for X-ray and Gamma-ray observations aboard balloons and satellites.

你可能感兴趣的:(exception,image,processing,each,Matrix,alignment)