LENSES INEL 6088 Computer Vision
Digital camera A digital camera replaces film with a sensor array Each cell in the array is a Charge Coupled Device light-sensitive diode that converts photons to electrons other variants exist: CMOS is becoming more popular http://electronics.howstuffworks.com/digital-camera.htm
Cameras CCD: most common, low cost, good performance CMOS: inexpensive, low performance now Color: 1 CCD+color filters 3 CCD+prism Line-scan: row-by-row RS-170 Standard CCTV standard (used in USA, Canada; in Europe, CCIR) Interlaced, single-channel (serial) vertical and horizontal sync pulses + analog video signal
Issues with digital cameras Noise big difference between consumer vs. SLR-style cameras low light is where you most notice noise Compression creates artifacts except in uncompressed formats (tiff, raw) Color color fringing artifacts from Bayer patterns Blooming charge overflowing into neighboring pixels In-camera processing oversharpening can produce halos Interlaced vs. progressive scan video even/odd rows from different exposures Are more megapixels better? requires higher quality lens noise issues Stabilization compensate for camera shake (mechanical vs. electronic) More info online, e.g., http://electronics.howstuffworks.com/digital-camera.htm http://www.dpreview.com/
Parameters for Digital Images Physical properties of the photosensitive matrix Discrete nature of photo-sensors Quantization of the intensity scale Copyright 2002, Edmund Industrial Optics. All rights reserved.
https://en.wikipedia.org/wiki/image_sensor_format!6
!7
Ansel Adams's large format photograph The Tetons and the Snake River (1942).!8
RS170 Signals
Analog Video Signals
LENSES The function of the lens is to collect more light Image sensor size determines camera format Lens should be chosen so that all features to be measured are covered in the image sensor, plus 10% for extra margin Features must be at least 3 pixels across If there are more than 100 features use a second camera 11
Magnification = W camera /W FOV FOV: Field of view = object area that is imaged by the lens onto the image sensor W FOV =width of the FOV W camera = width of the camera sensor Working distance = distance from lens to object Thin-lens approximation: lens thickness is neglected Pinhole camera: no lens; images through a small hole 12
Camera Obscura The first camera Known to Aristotle How does the aperture size affect the image?
PINHOLE CAMERAS n Pinhole cameras work in practice Abstract camera model - box with a small hole 14
Pinhole too big - many directions are averaged, blurring the image Pinhole too smalldiffraction effects blur the image Generally, pinhole cameras are dark, because a very small set of rays from a particular point hits the screen. 15
Shrinking the aperture
THE REASON FOR LENSES 17
Adding a lens circle of confusion A lens focuses light onto the film There is a specific distance at which objects are in focus other points project to a circle of confusion in the image Changing the shape of the lens changes this distance
Lenses F optical center (Center Of Projection) focal point A lens focuses parallel rays onto a single focal point focal point at a distance f beyond the plane of the lens f is a function of the shape and index of refraction of the lens Aperture of diameter D restricts the range of rays aperture may be on either side of the lens Lenses are typically spherical (easier to produce)
Thin lenses Thin lens equation: Any object point satisfying this equation is in focus What is the shape of the focus region? How can we change the focus region? Thin lens applet: http://www.phy.ntnu.edu.tw/java/lens/lens_e.html (by Fu-Kwun Hwang )
THE THIN LENS Basic Properties: (1) Any ray entering the lens parallel to the axis goes through the focus on the other side; (2) any ray entering the lens from the focus in one side emerges parallel to the axis on the other side β β α α Focal length: distance between lens and camera plane when the object is at infinity Lens maker s formula: Magnification: m = z/z 21
(ignoring signs so -z z and -y y) tan = P z f = P 0 f tan = P f = P 0 z 0 f P P 0 = z f = f f z 0 f (z f)(z 0 f)=z 2 z 0 f zf + f 2 = f 2 zz 0 = z 0 f + zf 1 f = 1 z + 1 z 0
Image Geometry
Perspective Projection
SPHERICAL ABERRATION 25
LENS SYSTEMS 26
VIGNETTING 27
Chromatic aberration OTHER (POSSIBLY ANNOYING) PHENOMENA q Light at different wavelengths follows different paths; hence, some wavelengths are defocussed q Machines: coat the lens q Humans: live with it Scattering at the lens surface q Some light entering the lens system is reflected off each surface it encounters (Fresnel s law gives details) q Machines: coat the lens, interior q Humans: live with it (various scattering phenomena are visible in the human eye) Geometric phenomena (Barrel distortion, etc.) 28
Chromatic aberration
Light scattering (image flare)
Barrel distortion
Distortion No distortion Pin cushion Barrel Radial distortion of the image Caused by imperfect lenses Deviations are most noticeable for rays that pass through the edge of the lens
Modeling distortion Project to normalized image coordinates Apply radial distortion Apply focal length translate image center To model lens distortion Use above projection operation instead of standard projection matrix multiplication
Correcting radial distortion from Helmut Dersch
RESOLUTION Listed as resolving power in units of lines per inch/millimeter RP=1/2d lines/mm d = spacing between pixels in the image plane This equation neglects lens distortion usually not an issue in M.V. 35
F/NUMBER Cone angle of the rays that form an image Determines Brightness of image Depth of field Resolution of the lens In MV the f/number can be taken as the ratio of the focal lens to the diameter of the aperture; large aperture -> small f/number 36
DEPTH OF FIELD Larger aperture more light reduced depth of field Depth of field: range of scene (object) distances with scene points that are in focus to an acceptable degree Out of focus points are imaged to circles. If the diameter of the circle b is below the resolution of the sensor then defocusing is not significant 37
Depth of field f / 5.6 f / 32 Changing the aperture size affects depth of field A smaller aperture increases the range in which the object is approximately in focus Flower images from Wikipedia http://en.wikipedia.org/wiki/depth_of_field
DEPTH OF FOCUS D b: maximum acceptable blur diameter d: lens diameter f: focal length z: scene distance (nominal plane of focus) Near plane distance Far plane distance 39
EXPOSURE E = Et E : amount of light collected by the camera E : image irradiance; intensity of light falling on the image plane t : duration of exposure (shutter speed) 40
POLARIZATION Some objects have certain features that are extremely bright, reflective or objects may be illuminated from an angle that produces intense reflection. Polarize filters are a solution. 41
POLARIZATION Normally light is linearly polarized: 42
POLARIZATION A linear polarizer filter absorb E along some directions and transmit orthogonal to the direction of absorption. 43
POLARIZERS 44
POLARIZERS 45
MORE INFO For videos on different subjects related to MV, search for "EO Imaging Lab" in youtube Edmund Optics application notes Lumera Corporation white paper: Design a Vision System