Illumination Is One of the Most Critical Components of a Machine Vision
Total Page:16
File Type:pdf, Size:1020Kb
Lighting llumination is one of the most critical components of a machine vision system. The selection of Ithe appropriate lighting component for a specific application is very important to ensure that a machine vision system performs its tasks consistently and reliably. The main reason is that improper illumination results in loss of information which, in most cases, cannot be recovered via software. This is why the selection of quality lighting components is of primary importance: there is no software algorithm capable of revealing features that are not correctly illuminated. To make the most appropriate choice, one must consider many different parameters, including: • Lighting geometry • Light source type • Wavelength • Surface property of the material to be inspected or measured (e.g. color, reflectivity) • Item shape • Item speed (inline or offline application) • Mechanical constraints • Environment considerations • Cost Since many parameters must be considered, the choice can be difficult and sometimes the wisest advice is to perform feasibility studies with different light types to reveal the features of interest. On the other hand, there are a number of simple rules and good practices that can help select the proper lights and improve the image quality. For every application, the main objectives are the following: 1. Maximizing the contrast of the features that must be inspected or measured 2. Minimizing the contrast of the features of no interest 3. Getting rid of unwanted variations caused by: a. Ambient light b. Differences between items that are non-relevant to the inspection task www.opto-engineering.com Light in machine vision n machine vision, light is mostly characterized by its wavelength, Light visible to the human eye has wavelengths in the range of Iwhich is generally expressed in nm (nanometers). 400-700 nm, between the infrared (with longer wavelengths) and the ultraviolet (with shorter wavelengths): special Basically light is electromagnetic radiation within a certain applications might require IR or UV light instead of visible light. portion of the electromagnetic spectrum (cf. Fig. 1): it can be quasi-monochromatic (which means that it is characterized by a narrow wavelength band, i.e. with a single color) or white (distributed across the visible spectrum, i.e. it contains all colors). UV VISIBLE INFRARED 0.4 0.76 1000 X-RAYS MICROWAVES 0.9 1.7 3 5 8 14 SWIR MWIR LWIR Fig. 1: Electromagnetic specturm XXVIII www.opto-engineering.com Lighting Basically, light interacts with materials (Fig. 2) by being • Reflected and/or Transmitted • Transmitted and/or • Absorbed Emitted Reflected Additionally, when light travels across different media it refracts, i.e. it changes direction. The amount of refraction is inversely proportional to the light wavelength; i.e. violet light rays are bent more than red ones. This means that light with short wavelengths gets scattered more easily than light with long wavelengths when hitting a surface and is therefore, generally speaking, more suited for surface inspection applications. In fact, if we ideally consider wavelength as the only parameter Incident Absorbed to be considered from the previous list, blue light is advised for applications such as scratch inspection while longer wavelengths such as red light are more suited for enhancing the silhouette of transparent materials. Fig. 2: Interaction of light with matter: reflection, adsorption and transmission LED illumination here are many different types of light Mercury Quartz Halogen / Tungsten Tsources available (Fig. 3) including the following: • Incandescent lamps Daytime sunlight • Fluorescent lamps 0.8 Fluorescent • LED lights ) 0.6 White LED Xenon LED lights are by far the most commonly 0.4 used in machine vision because they offer a number of advantages, including: Relative intensity (% 0.2 • Fast response Red • Suitable for pulse and strobe operations LED • Mechanical resistance 0.0 • Longer lifetime, higher output stability • Ease of creating various lighting 300 400 500 600 700 geometry Wavelength (nm) Fig. 3: Emission spectra of different light sources Incandescent lamps are the well-known Fluorescent lamps are vacuum tubes LEDs (Light Emitting Diodes) produce glass bulbs filled with low pressure, in which UV light is first produced (by light via the annihilation of an electron- inert gas (usually argon) in which a thin interaction between mercury vapor and hole pair in a positive/negative junction of metal wire (tungsten) is heated to high highly energetic electrons produced by a semiconductor chip. temperatures by passing an electric a cathode) and then is adsorbed by the The light produced by an LED depends current through it. tube walls, coated with fluorescent and on the materials used in the chip and is The glowing metal emits light on a broad phosphorescent material. characterized by a narrow spectrum, i.e. it spectrum that goes from 400 nm up to The walls then re-emit light over a is quasi-monochromatic. the IR. The result is a white, warm light spectrum that again covers the whole White light is produced as in the (corresponding to a temperature of 2870 visible range, providing a “colder” white fluorescent lamps, but the blue light K) with a significant amount of heat being light source. is absorbed and re-emitted in a broad generated. spectrum slightly peaked in the blue region. XXIX LED power supply and output Forward voltage vs. Forward current n LED illuminator can be controlled by either setting the 200 180 Avoltage V across the circuit or by directly feeding the circuit 100 with electric current I. 50 One important consideration is that the luminous flux produced by a single LED increases almost linearly with the current while it does not do so with respect to the voltage applied: 10 1% uncertainty on the driving current will translate into 1% luminance uncertainty, while 1% uncertainty on the input voltage Forward current (mA) can result in a several percentage points variation (Fig. 4). 1 For this reason, it is suggested to directly regulate the current 2.0 2.5 3.0 3.5 4.0 4.5 and not the voltage, so that the light output is stable, tightly Forward voltage (V) controlled and highly repeatable. Forward current vs Relative luminous flux 4.0 For example, in measurement applications, it is paramount to obtain images with a stable grey level background to ensure 3.5 consistency of the results: this is achieved by avoiding light 3.0 ux (a.u.) flickering and ensuring that the LED forward current of the fl 2.5 telecentric light is precisely controlled: this is why Opto Engineering® LTLCHP telecentric illuminators feature built- 2.0 in electronics designed to have less than 1‰ variation in LED 1.5 forward current intensity leading to very stable performances. 1.0 Relative luminous 0.5 0.5 0 50 100 150 200 250 Forward current (mA) Fig. 4: LED current, tension and light output graphs LED pulsing and strobing EDs can be easily driven in a pulsed (on/off) regime and can be T Lswitched on and off in sequence, turning them on only when necessary. Usage of LEDs in pulsed mode has many advantages including the extension of their lifespan. max If the LED driving current (or voltage) is set to the nominal value t on declared by the LED manufacturer for continuous mode, we talk t about pulsed mode: the LED is simply switched on and off. off LEDs can also be driven at higher intensities (i.e. overdriven) than the nominal values, thus producing more light but only for a limited amount of time: in this case we say that the LED is operated in strobed mode. Strobing is needed whenever the application requires an Fig. 5: Duty cycles parameters increased amount of light to freeze the motion of fast moving objects, in order to eliminate the influence of ambient light, to preserve the LED lifetime and to synchronize the ON time of your light (ton) with the camera and item to be inspected. To properly strobe an LED light, a few parameters must be considered (Fig. 5 and 6): Trigger signal Trigger signal • Max pulse width or ON time ( max): the maximum amount ton Acquisition time Acquisition time of time for which the LED light can be switched on at the maximum forward current. Camera Camera • Duty cycle D is defined as (usually expressed in %): acquiring acquiring t on t on D = ton/(ton+toff) t off Strobed LED Strobed LED Where toff is the amount of time for which the LED light is off and light output light output LED constant light output T = ton+toff is the cycle period. The duty cycle gives the fraction in % of the cycle time during which the LEDs can be switched Time on. The period T can be also given as the cycle frequency f = 1/T, expressed in Hertz (Hz). Fig. 6: Triggering and strobing XXX www.opto-engineering.com Lighting LED lifetime he life of an LED is defined as the time that it takes for the LED luminance to decrease to 50% of its initial luminance at an ambient Ttemperature of 25°C. Line speed, strobing and exposure time hen dealing with online applications, there are some important parameters that have to be considered. WSpecifically, depending on the object speed and image sharpness that is required for the application, the camera exposure time must be always set to the minimum in order to freeze motion and avoid image blurring. Additionally, black and opaque objects that tend to absorb instead of reflecting light, are particularly critical. As an example, let’s suppose to inspect an object moving with speed vo using a lens with magnification m and a camera with pixel size p. The speed of the object on the sensor will be m times : vo vi = m vo, Therefore the space travelled by the object xi during the exposure time t is xi = vi t.