WuYang: 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 1: Line 1:
Psf analysis and image deblurring using a simulated camera lens
 
http://white.stanford.edu/teach/index.php/Psych221_Project_Suggestions#Psf_analysis_and_image_deblurring_using_a_simulated_camera_lens
http://white.stanford.edu/teach/index.php/Psych221_Project_Suggestions#Psf_analysis_and_image_deblurring_using_a_simulated_camera_lens
Tony Wu, Samuel Yang
Tony Wu, Samuel Yang


Back to [[Psych221-Projects-2014 |Psych 221 Projects 2014]]
Back to [[Psych221-Projects-2014 |Psych 221 Projects 2014]]
 
=Psf analysis and image deblurring using a simulated camera lens=
= Introduction =
= Background =
= Background =
[[file:Lighting.jpg|300px|right]]
=Introduction=
 
- Motivate the problem. Describe what has been done in the past.
What is known from the literature.
=Background=
 
- What is known from the literature.
= Methods =
=Methods=
[[file:pr650.jpg|300px|right]]
- Describe techniques you used to measure and analyze. Describe the instruments, and experimental procedures in enough detail so that someone could repeat your analysis. What software did you use? What was the idea of the algorithms and data analysis?
 
=Results=
== Linear Model for Digital Photography ==
- Organize your results in a good logical order (not necessarily historical order). Include relevant graphs and/or images. Make sure graph axes are labeled. Make sure you draw the reader's attention to the key element of the figure. The key aspect should be the most visible element of the figure or graph. Help the reader by writing a clear figure caption.
 
=Conclusions=
[[File:DigitalCameraLinearTableu.jpg|500px|center]]
- Describe what you learned. What worked? What didn't? Why? What should someone next year try?
 
=References=
 
- List references. Include links to papers that are online.
 
== Design of an Underwater Color Rig ==
 
[[File:ColorRigCartoon.jpg|center|600px]]
 
=== Handheld ===
 
 
[[File:AcrylicColorCard.jpg|center]]
 
=== PVC Rig ===
 
[[File:UnderwaterColorRigV1.jpg|frame|center|Original acrylic color card]]
 
 
[[File:ColorRigV1Air.jpg|frame|center|PVC color rig field of view in air]]
[[File:ColorRigV1Water.jpg|frame|center|PVC color rig field of view in water]]
 
=== PVC With Index-Compensated Geometry ===
 
 
[[File:UnderwaterColorRigV2.jpg|center|frame|Final Color Rig]]
 
 
== Calibrating the Underwater Color Rig ==
 
 
[[File:MacbethColorTarget.jpg|center|frame|Macbeth color target]]
 
 
 
 
 
[[File:MeasuringResponsivity.jpg|center]]
 
 
 
== Data-Collection Dives ==
 
 
= Results =
 
==Macbeth/Xrite Color Checker Reflectances==
 
 
[[File:MacbethReflectances.png|center]]
 
 
 
==Canon SX260HS Responsivities==
 
 
[[File:ExampleSpectralImage.jpg|frame|center|Red monochromatic illuminant on color target]]
 
 
 
[[File:RawRGBResponses.png|center]]
 
 
 
[[File:ColorimeterResponse.png|center|700px]]
 
 
 
[[File:CanonSX260HXResponsivitiesPositive.png|center|700px]]
 
 
 
==Underwater Color Rig Data==
 
 
[http://youtu.be/Hqa_7cUKV6M 85ft Dive Number 1 (with Salp capture on return!)]
 
[http://youtu.be/aHSGxZLbVos 85ft Dive Number 2 (with plastic bottle for fun)]
 
===Extracting Color Patch RGB Information===
 
[[File:ColorPatchMap.jpg|center|400px]]
 
As the rig descends the patches take on a green tint and the red patches especially lose their intensity and appear a muted gray color. A rendering of the color checker values at different depths is shown below.
 
[[File:XriteAt5.png|center|frame|Xrite Chart Colors at 5 ft]]
 
[[File:XriteAt35.png|center|frame|Xrite Chart Colors at 45 ft]]
 
Light is quickly attenuated by the water column as the rig descends. A plot of RGB color values throughout a dive is shown below to illustrate the effect. The RGB values correspond to the white color patch on the bottom left of the color target.
 
[[File:WhiteRGBValues.png|center|700px]]
 
===Pixel Saturation===
 
 
[[File:PixelHistogram.png|center|700px]]
 
During the RGB pixel extraction process, color patches that experienced saturation were flagged as unusable for illuminant estimation. Of the 24 patches on the Xrite color target, only 7 were usable. A map of the usable color patches is shown below.
 
[[File:UsableColorPatches.jpg|center|400px]]
 
==Underwater Spectra==
With known camera color responsivities, known color target reflectances, and a set of extracted RGB pixel data the underwater scene illuminant can be estimated. Rearranging the linear model for color digital photography, we get the following system for each camera photo:
 
[[File:CombinedLinearSystem.png|center|500px]]
 
The color patch reflectivities in the model have been merged via element-by-element multiplication to form a single combined spectral response for each color patch. There are a total of 7 usable color targets within each image and 3 pixel color values per target resulting in a total of 21 linear equations usable for estimating the illuminant. There are a total of 51 spectral bands in the responsivity matrix of the color filter array and consequently 51 unknown values in the illuminant estimate. This results in an underdetermined system. To solve the system, an additional smoothness constraint was applied by developing the following optimization objective function, inspired by the multispectral estimation techniques of Park et. al [4].  
 
[[File:OptimizationObjective.png|center|200px]]
 
The system was solved via non-negative least squares optimization in MATLAB using the lsqnonneg function. Since natural illuminants tend to be smooth and are guaranteed to be non-negative this is a reasonable constraint. An estimated, normalized spectrum from a depth of 65 feet is shown below.
 
[[File:IlluminantEstimation65ft.png|center]]
 
By sorting the estimated spectra by depth an intensity map of illuminants can be created, as shown below. Depth in feet is shown along the y-axis and wavelength is shown in nanometers along the x-axis. Illuminant intensity is shown in log scale. Note the dramatic attenuation of light with depth and the spectral peak near 532nm.
 
[[File:EstimatedIlluminantSpectra.jpg|center|700px]]
 
= Conclusions and Future Work =
The proof-of-concept experiment reveals future improvements and experiments for the system: The color target chosen must be analyzed explicitly to confirm the color patch spectra match those in the ISET toolbox. The acrylic technique used to shield the color card must be refined to suppress reflections. A higher resolution setting on the PR-650 colorimeter should be used to refine the color filter array characterization of the digital camera. A shorter exposure setting should be used during data-collection dives to prevent pixel saturation. Finally, more illuminant data should be collected at both the Hopkins Marine Station site and other locations during different seasons to determine the geographic and temporal diversity of the seawater absorption characteristic.
 
Despite design challenges, however, the underwater color rig was successfully able to characterize the changing underwater illumination with depth using relatively inexpensive equipment. By careful selection and characterization of both digital camera and color target a sufficient basis was established to generate a true multispectral estimate of the underwater illuminant spectrum. The techniques described in this report can be used to process images captured and estimate illumination at depth in a variety of applications from digital photography color balancing to monitoring marine plankton populations or estimating the health of a coral population. Hopefully the design of this inexpensive system will enable further underwater multispectral exploration.
 
= References - Resources and related work =
'''References'''
'''References'''


Line 148: Line 28:


[4] Jong-Il Park, Moon-Hyun Lee, Michael D. Grossberg, and Shree K. Nayar "Multispectral Imaging Using Multiplexed Illumination" Computer Vision, 2007. ICCV 2007. IEEE 11th International Conference on
[4] Jong-Il Park, Moon-Hyun Lee, Michael D. Grossberg, and Shree K. Nayar "Multispectral Imaging Using Multiplexed Illumination" Computer Vision, 2007. ICCV 2007. IEEE 11th International Conference on
=Appendix I=
- Upload source code, test images, etc, and give a description of each link. In some cases, your acquired data may be too large to store practically. In this case, use your judgement (or consult one of us) and only link the most relevant data. Be sure to describe the purpose of your code and to edit the code for clarity. The purpose of placing the code online is to allow others to verify your methods and to learn from your ideas.


'''Software'''
'''Software'''
Line 155: Line 39:
Canon Hack Development Kit http://chdk.wikia.com/wiki/CHDK
Canon Hack Development Kit http://chdk.wikia.com/wiki/CHDK


= Appendix I - Code and Data =
=Appendix II=
In the belief that the techniques used may be illustrated best by example, the MATLAB code used to perform the multispectral analysis and calibration is available below along with sample data from the project.
- (for groups only) - Work breakdown. Explain how the project work was divided among group members.
==Code==
All code was written in MATLAB R2012a for Mac OSX, Mountain Lion. External dependencies include the MATLAB Image Processing Toolkit, MATLAB Optimization Toolkit, and the ISET toolkit.
 
[[File:UnderwaterColorCode.zip]]
==Data==
A total of 2.5GB of image data were collected for this project, and are available upon request. The extracted RGB color patch data, colorimeter responses, and SX260HS responsivity data are available below.
 
[[File:UnderwaterColorData.zip]]
 
[[File:CanonSX260HSResponsivity.zip]]
==Presentation==
This project was given as a 5-minute presentation to the PSYCH221 Winter 2013 class at Stanford. The presentation files used are linked below.
 
[[File:UnderwaterColor.pptx | 5min Powerpoint Presentation File]]
 
[[File:UnderwaterColor.pdf | 5min PDF Presentation File]]

Revision as of 00:06, 15 March 2014

http://white.stanford.edu/teach/index.php/Psych221_Project_Suggestions#Psf_analysis_and_image_deblurring_using_a_simulated_camera_lens Tony Wu, Samuel Yang

Back to Psych 221 Projects 2014

Psf analysis and image deblurring using a simulated camera lens

Introduction

Background

Introduction

- Motivate the problem. Describe what has been done in the past.

Background

- What is known from the literature.

Methods

- Describe techniques you used to measure and analyze. Describe the instruments, and experimental procedures in enough detail so that someone could repeat your analysis. What software did you use? What was the idea of the algorithms and data analysis?

Results

- Organize your results in a good logical order (not necessarily historical order). Include relevant graphs and/or images. Make sure graph axes are labeled. Make sure you draw the reader's attention to the key element of the figure. The key aspect should be the most visible element of the figure or graph. Help the reader by writing a clear figure caption.

Conclusions

- Describe what you learned. What worked? What didn't? Why? What should someone next year try?

References

- List references. Include links to papers that are online.

References

[1] Coral Watch Project http://www.coralwatch.org/

[2] Raimondo Schettini and Silvia Corchs, "Underwater Image Processing: State of the Art of Restoration and Image Enhancement Methods" EURASIP Journal on Advances in Signal Processing, Volume 2010, Article ID 746052, 14 pages

[3] Brian A. Wandell, Foundations of Vision, Chapter 9. https://www.stanford.edu/group/vista/cgi-bin/FOV/chapter-9-color/#Linear_Models

[4] Jong-Il Park, Moon-Hyun Lee, Michael D. Grossberg, and Shree K. Nayar "Multispectral Imaging Using Multiplexed Illumination" Computer Vision, 2007. ICCV 2007. IEEE 11th International Conference on

Appendix I

- Upload source code, test images, etc, and give a description of each link. In some cases, your acquired data may be too large to store practically. In this case, use your judgement (or consult one of us) and only link the most relevant data. Be sure to describe the purpose of your code and to edit the code for clarity. The purpose of placing the code online is to allow others to verify your methods and to learn from your ideas.


Software

Image Systems Engineering Toolbox http://imageval.com/

Canon Hack Development Kit http://chdk.wikia.com/wiki/CHDK

Appendix II

- (for groups only) - Work breakdown. Explain how the project work was divided among group members.