Endoscope

From Psych 221 Image Systems Engineering
Revision as of 12:49, 14 March 2015 by imported>Projects221 (Sources)
Jump to navigation Jump to search

Introduction

Our goal for this project was to learn how to appropriately and accurately apply Geometric calibration to an endoscope and also inverse its distortion in real-time.

Initially, we set out to test the various features of the endoscope and become comfortable with the paired user software needed to collect data. Once this was accomplished, our team had to determine the type of distortion found in the system and decide how to go about accounting for its affect on the various collected images. Once this was achieved and our images free of distortion, we would then be able to move on to our next task, algorithm development for two flash depth estimation. Unfortunately, our endoscope seemed to have variable gain on its light source that would change depending on how far it was to its target, so we were unable to fulfill this second part of the project.

Background

Key Terms

Optical Aberration: errors in an image that are caused mostly by imperfect manufacturing and approximations made based on our knowledge and understanding of light. Some of the more common types are Spherical aberration, Coma, Astigmatism, Curvature of Field, Chromatic aberration, and in our case Distortion

Distortion: a commonly used term in modern day photography that refers to any deviation from rectilinear projection. Though distortion comes in a wide range of patterns and irregular forms, the most common types we see are "Barrel Distortion" and "Pincushion distortion" as depicted below.

Pincushion: image magnification increases with the distance from the optical axis
Barrel: image magnification decreases with distance from the optical axis.


Geometric Calibration: determination of the geometric relation of the imaging process of a camera

Method

Hardware

Experiment Setup

Endoscope system
Endoscope capturing images of the displayed calibration target
Captured image displayed onscreen

Procedure

-Setup Endoscope in stationary position
-Capture images of test target in varying orientations and distances with endoscope.
-The image in question should be stationary at each data collection. (30+ images)


Data Collection Example

Software

Procedure:
1. Download the calibration software at: http://www.vision.caltech.edu/bouguetj/calib_doc/index.html#system
2. Store all of the MATLAB (.m) files in a folder called “toolbox_calib.”
3. Upon opening MATLAB, open the directory where the folder that contains all of the MATLAB files is located. Right click the folder a select “Add to Path.”
4. In the command prompt, type “calib” to start the calibration process.
5. Refer to the following example on the various options to choose and how to go through the calibration process: http://www.vision.caltech.edu/bouguetj/calib_doc/htmls/example.html
6. Choose the “Standard” option to load the GUI.
7. Store all of the images in a folder called “calib_example.” This can be anywhere, but put it in the “toolbox_calib” folder to avoid complications. Make sure to name all of images with a basename and different number. For example, if there are five images, the names should looks as followed: image01, image02, image03, image04, image05.
8. Click the “Image Name” option to load the images. Enter the basename and image type. The images should now all be loaded.
9. Click the “Extract Grid Corners” option to begin the calibration process. Follow the prompts and specify values when prompted. The checkboard is 7x9 squares. Refer to link above about what each step in this part is doing

Results

Conclusion

Sources

Background https://www.cs.purdue.edu/homes/aliaga/cs635-10/lec-camera-calibration.pdf

Code http://www.vision.caltech.edu/bouguetj/calib_doc/index.html#system

Acknowledgements

Andy Lin
Graduate Student
Electrical Engineering
Stanford University

Prof Daniel G. Aliaga
Department of Computer Science
Purdue University

Haomiao Jiang
Psych 221 Mentor
Stanford University

Joyce Farrell
Senior Research Engineer
Electrical Engineering - Information Systems Laboratory
Stanford University

Munenori Fukunishi
Olympus Corporation representative
Project Mentor

Steven Lansel
Olympus Corporation representative
Project Mentor