illumination and optics and just a bit on image formats

34
Illumination and Optics and just a bit on image formats

Upload: candice-hubbard

Post on 23-Dec-2015

221 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Illumination and Optics and just a bit on image formats

Illumination and Optics

and just a bit on image formats

Page 2: Illumination and Optics and just a bit on image formats

Common Image Formats

• Bmp:Windows standard format is clumsy

• tiff: “Universal” format (tifflib)

• jpg: Excellent compression but has limitations

• gif: good graphics format

• pbm/pgm/ppm: simple formats (open source)

• png: portable net graphics (open source)

Page 3: Illumination and Optics and just a bit on image formats

Pixel Representations

• 1 bit/pixel: binary

• 8 bits/pixel: grayscale

• 4/8/15/16 bits/pixel: palette based

• 24+ bits/pixel: “true color”

Page 4: Illumination and Optics and just a bit on image formats

Image File Header

• Image header contain information specifying image size, image format, gamma and other related information

• “Raw” images have no headers and applications that can read them need manual input or are programmed only for special sizes and formats

Page 5: Illumination and Optics and just a bit on image formats

Chromatic Aberration

An optical aberration in which the component colours in a point source of white light are brought to a focus at different points; caused by the variation of the refractive index of the glass with wavelength.

Machine vision applications can also be affected by infrared radiation!

Page 6: Illumination and Optics and just a bit on image formats

Depth of FieldWidth of that region on either side of the focal

plane, where the image produced by an optical system remains in focus. Normally, a large DOF is advantageous. In General, a small lens aperture and bright object illumination will improve the DOF.

Depth of focus is the range of image distances over which the image remains sharp for a given object distance

Page 7: Illumination and Optics and just a bit on image formats

Diffuse Illuminiation

Illumination technique, projecting light onto a matt surface first. This acts as the illuminator for the object being viewed. Baffles avoid direct illumination of the object. Avoids sharp shadows and glinting due to specular reflection.

A diffuser is made from translucent material, e.g. polypropylene, and used to produce diffuse illumination.

Page 8: Illumination and Optics and just a bit on image formats

Diffuse Reflections

Light returned from a matt (i.e. non shiny) surface is diffuse; light is scattered in all directions (above the object surface). It is not strongly polarized.

Page 9: Illumination and Optics and just a bit on image formats

Specular Reflection

Reflection of light (e.g. from a smooth polished or metallic surface) in which the angle of incidence is equal to the angle of reflection. This gives rise to Glinting

Page 10: Illumination and Optics and just a bit on image formats

Distortion

Defect of an optical system in which magnification varies with angular distance from the axis, causing straight lines to appear curved. Common distortion patterns are pincushion and barrel.

Page 11: Illumination and Optics and just a bit on image formats

f-stop or f-number

The ratio of the focal length of a lens to the diameter of its input aperture. For a given lens, reducing its f-number by closing its aperture, increases the image brightness and reduces the depth of field.

Page 12: Illumination and Optics and just a bit on image formats

12: Coaxial Illumination

• Ideal for specular objects

• Camera and light source “coincide”

Page 13: Illumination and Optics and just a bit on image formats

OBJECTIVE To provide diffuse illumination without causing glinting.TYPICAL APPLICATIONS Viewing small bright shiny objects, such as coins, electrical connectors, printed circuit boards, EQUIPMENT Small incandescent filament lamp, LED array or fibre-optic illuminator, diffusing plate & beam-splitter. GEOMETRY•Mirror-like surfaces•Complex, embossed, etcMATERIALS •Bright metal surfaces•Reflective plastic•Lacquered  / painted surfacesREMARKS Excellent images can be obtained from mirror-like surfaces, which are often difficult to view using other methods. It appears as though the widget is illuminated by light emanating from a small area, corresponding to the front of the camera lens. Since this produces a much narrower illumination beam than Method 11, it is very sensitive to the geometry of the widget surface; it can readily detect embossing, engraving, stippling creasing, dimples, pimples, scratches and pits. This method relies on producing specular reflection. Hence, the widget must have a well-defined shape and be held in fixed orientation, to ensure that glinting is visible to the camera.

Page 14: Illumination and Optics and just a bit on image formats

11: Diffuse Front Illumination

Page 15: Illumination and Optics and just a bit on image formats

OBJECTIVE To reduce the effects of glinting .TYPICAL APPLICATIONS  Inspecting objects with shiny, nearly planar surfaces,

to detect scratch es, crack s, pit s, embossing , engraving , etc. shiny object s. Suitable for CD s, coin s, electrical connector s, printed circuit board s, smooth plastic , glass , porcelain , etc.

EQUIPMENT Bright flood lamp s (e.g. incandescent filament or fluorescent illuminator  with a high-frequency driver) Diffusing screen with viewing aperture. This consists of a flat matt white board that has a small cut in its center. It may be necessary to fit a short tube (painted matt black on its inside surface) into this hole, to prevent light reaching the camera directly from the lamps. A secondary light source  and beam-splitter  are used to compensate for the dark aperture in the diffusing screen.

GEOMETRY Mirror-like surfaces and nearly flat surfaces with embossing, engraving, etc. Can also be useful for more complex structure s, since it does not cast sharp shadows.

MATERIALS Bright metal , smooth plastic , glass , porcelain , etc., lacquered  / painted surface s.

REMARKS Excellent images of defects such as scratches can be obtained from mirror-like surfaces, which may be difficult to view otherwise. The secondary light source and beam-splitter avoid creating a reflection of the camera when viewing a mirror-like surface. In some applications, it is possible to eliminate them altogether.

Page 16: Illumination and Optics and just a bit on image formats

13: Grazing Illumination

Page 17: Illumination and Optics and just a bit on image formats

OBJECTIVES • To highlight shallow surface features, created by engraving , embossing , rolling ,

pressing , stamping , casting , moulding , etc• To detect surface imperfections, such as scratch es, crack s, pit s, dirt , dust , grit , etc, on

a smooth mirror-like surface .TYPICAL APPLICATIONS Inspecting flat machined metal  surfaces, plastic , glass ,

glossy  painted & lacquered surfaces, plastic sheeting, ceramic tiles, etc.EQUIPMENT Collimator. For close-range operation, it may not be necessary to use a

collimator . In some applications, a very small ("point") source of light, such as a LED  or fibre optic light guide , is adequate.

CAMERA ArrayLENS Short focusMOTION StaticGEOMETRY Nominally flat and smooth. Both depressions and raised features are visible.  MATERIALS Any reflective surface REMARKS Care must be taken to prevent the camera from seeing a reflection of itself.

(This can usually be achieved by tilting the widget slightly.) Linear feature s, such as scratches and cracks that are approximately normal to the light path are highlighted, Cliff-like edge s facing the light source tend to cause glinting, while those facing away create shadow s. Linear features that are nearly parallel to the light beam are suppressed.. This anisotropy can cause difficulties but is useful in  certain situations.

Page 18: Illumination and Optics and just a bit on image formats

17: Back Lighting  of Matt Opaque Objects

Page 19: Illumination and Optics and just a bit on image formats

OBJECTIVE To view silhouettes of non-shiny matt opaque objects.TYPICAL APPLICATIONS • Dimensional measurement and inspection of laminate objects, such as flat

metal stampings , pressings , plastic moulding s, leather cuttings , etc • Dimensional measurement and inspection of a very wide range of 3D objects.EQUIPMENT Specialist back-light unit, or light box  of the type used in

hospitals for viewing X-rays. CAMERA ArrayMOTION StaticGEOMETRY Thin laminate, or any 3D object in which the relevant

measurements may be obtained from its silhouette . MATERIALS Opaque, non-reflective.REMARKS Back-lighting is ideal for shape analysis  and high-precision

metrology . It operates on the same principle as the industrial shadowgraph  and hence is readily accepted by industrial engineers. It is one of the oldest and most important lighting-viewing methods used in Machine Vision, since it produces high-contrast image that are easy to process.

Page 20: Illumination and Optics and just a bit on image formats

19: Back Illumination  of Shiny Objects

Page 21: Illumination and Optics and just a bit on image formats

OBJECTIVES To view the silhouette  of a shiny object.TYPICAL APPLICATIONS • Metrology  and other applications where the edge contour  must be located

accurately. • Dimensional measurement of extrusions  and lathe-turned object s.EQUIPMENT Collimator  and telecentric lens . Both of these must be larger than

the widget.CAMERA ArrayMOTION StaticGEOMETRY Particularly suitable for objects with spherical, cylindrical and

conical surfaces . Appropriate for any elongated object whose outer edge is gently curved along the optical axis. Flat object s and those with sharp outer edges do not need the collimator, since the edge is well defined by the simpler technique (Method 17).

MATERIALS Any shiny / glossy material  (e.g. polished metal , smooth plastic , rubber , glass , ceramic ), painted, lacquered, wet, oily and waxy surfaces .

REMARKS When viewing a shiny widget using the simpler technique (Method 17), we under-estimate the size of the widget dimensions . The collimator prevents reflections of non-paraxial rays  occurring at points inside the outer edge.

Page 22: Illumination and Optics and just a bit on image formats

20: Dark-Field Illumination

Page 23: Illumination and Optics and just a bit on image formats

OBJECTIVE To view silhouettes  of transparent  objects.

TYPICAL APPLICATIONS Shape analysis of glass and plastic bottles, jars, tumblers, etc.

EQUIPMENT Light box , with thin black strip placed across its centre.

CAMERA Line scan .

MOTION Linear movement.

MATERIALS Transparent / clear glass , plastic . Transluscent  materials.

REMARKS This method produces far better results than back-lighting on some transparent / transluscent objects, such as glass and plastic containers. When there is no object present, the line-scan camera receives no light at all, as it is facing the mask. A bottle , or jar , placed in the optical path receives light, which is diverted within and around the side walls, by refraction and internal reflection. Light therefore emerges to reach the camera, from those parts that are not illuminated directly from behind.  Vertical edge s and sudden variations in wall thickness are high-lighted particularly well. Hence, embossing , cracks  and features such as "bird-swings " (filament of glass hanging between the side walls, across the inside of a bottle) and "spikes " ("stalagmite" of glass protruding inwards from the base or side-wall of a jar) are all highlighted by this method.

Page 24: Illumination and Optics and just a bit on image formats

21: Dark-Field Illumination

Page 25: Illumination and Optics and just a bit on image formats

OBJECTIVE To view silhouettes  of transparent  objects.TYPICAL APPLICATIONS Shape analysis of glass and plastic bottles, jars,

tumblers, etc.EQUIPMENT Light box , with thin black strip placed across its centre.MATERIALS Transparent / clear glass , plastic . Transluscent  materials.CAMERA ArrayMOTION StaticMATERIALS Transparent / clear glass, plastic. Transluscent materialsREMARKS This method produces far better results than back-lighting on

some transparent / transluscent objects, such as glass and plastic containers. When there is no object present, the camera receives no light at all, as it is facing the mask. A bottle , or jar , placed in the optical path receives light, which is diverted within and around the side walls, by refraction and internal reflection. Light therefore emerges to reach the camera, from those parts that are not illuminated directly from behind.  Vertical edge s and sudden variations in wall thickness are high-lighted particularly well. Hence, embossing , cracks  and features such as "bird-swings " (filament of glass hanging between the side walls, across the inside of a bottle) and "spikes " ("stalagmite" of glass protruding inwards from the base or side-wall of a jar) are all highlighted by this method.

Page 26: Illumination and Optics and just a bit on image formats

25: Viewing Small Objects

Page 27: Illumination and Optics and just a bit on image formats

OBJECTIVE To view small objects using a standard lens.

TYPICAL APPLICATIONS Experimental work for prototype development, when viewing objects of approximate size 5-50 mm.

EQUIPMENT Extension tubes fitted to standard lens.

REMARKS The combination of a standard lens and an extension tube provides a convenient alternative to a macro lens that is suitable for prototype development in the laboratory. Extension tubes produce slightly superior picture quality, compared to short focus lens attachments but are more difficult to use. Extension tubes lenses are available in a range of powers. For the standard C-mount lens fitting, a useful set of tubes for experimental purposes consists of 20mm, 10mm, 5mm and a set of washers of various thickness. The effect of adding two or more extension tubes lenses is additive. When using extension tubes, care are should be taken to avoid vignetting.

Page 28: Illumination and Optics and just a bit on image formats

28: Telecentric Lens

Page 29: Illumination and Optics and just a bit on image formats

OBJECTIVE To view objects as if they were at an infinite distance from the camera, thereby eliminating parallax distortion

TYPICAL APPLICATIONS Metrology. A number of other lighting-viewing methods rely on the use of telecentric lenses.

EQUIPMENT Telecentric imaging system, consisting of a large lens (possibly Fresnel type, if a large objective element is required) and a smaller standard lens. Pinhole aperture.

REMARKS The magnification of a telecentric imaging system is determined by the ratio of the focal lengths of the individual elements: f2/f1. The optimal image

quality is obtained with a very small pin-hole aperture, although this introduces a high optical loss. In this case, the widget must be brightly illuminated. Notice that the objective element must be at least as large as the widget. Telecentric lenses of diameter up to 475 mm are available commercially. To obtain an even larger field of view (up to 2m diameter), plastic Fresnel lenses may be used. (It may be necessary to use monochromatic light, to eliminate "rainbows" around high-contrast edges,.) Fresnel lenses (30 cm diameter) intended for overhead projectors can be used. to produce a low-cost telecentric system. Cylindrical-telecentric lenses are also available for line-scan cameras.

Page 30: Illumination and Optics and just a bit on image formats

Polarized Light

Page 31: Illumination and Optics and just a bit on image formats

By controlling lighting conditions, specular reflections can be removed from surfaces from any viewing angle. Provided the subject is illuminated with polarized light and a polarizing filter (sometimes called an analyzer) is placed over the camera lens. Illuminating with polarized light causes all surface specular reflections to be entirely composed of polarized light and thus can be removed by the analyzer and the camera lens. Total elimination of the specular components is achieved when the analyzer and polarizer are at right angles to the other.

It is also possible to align the analyzer with the polarized light to attenuate diffuse reflections. This will nearly double the contrast of specular features relative to the diffuse background.

Page 32: Illumination and Optics and just a bit on image formats

Front and Back Illumination

Page 33: Illumination and Optics and just a bit on image formats

OBJECTIVE To provide a method for viewing opaque objects  which are pierced, so that edge  and internal/surface feature s can be seen simultaneously.

TYPICAL APPLICATION Inspecting printed circuit boards , to verify that the holes  and pads  are aligned.

EQUIPMENT Back-lighting  unit and flood lamp s. Color filter s (optional)

CAMERA Color or monochrome array camera

MOTION Static

GEOMETRY Has holes

MATERIALS Opaque, non-shiny, shiny traces on PC boards

REMARKS The color filters allow the images from the silhouette and front face to be separated or combined, as appropriate. Another simpler optical arrangement is possible, by simply omitting the color filters. In this case, a monochrome camera can be used and the intensity of the front and back illumination sources must be carefully balanced, to ensure that the surface features and silhouette  can both be seen clearly.

Page 34: Illumination and Optics and just a bit on image formats

Types of illumination• Incandescent illumination produces broadband radiation

via a hot glowing filament. Common incandescent sources produce much more radiation in the red portion of the spectrum. May use DC supply for constant light output. Most of the supplied power is dissipated as heat.

• Fluorescent illumination is a mixture of different phosphors to produce “white” light. Single phosphor sources are available. May use high-frequency supply for constant light output.

• Gas discharge lights produce intense illumination with various spectra depending on gas used. Strobe sources use this type of lamp.

• LEDs produce monochromatic illumination and can use a DC supply for constant light output.

• Lasers provide monochromatic coherent illumination but the coherence can cause strong interference patterns.