Research Article
Liquid Color Recognition by Using an Optical Reflection System
Department of Physics, Tehran North Branch, Islamic Azad University, Iran
H. Golnabi
Institute of Water and Energy, Sharif University of Technology, Tehran, Iran
The appearance of an object, such as its color provides essential details that allow us to distinguish one objet from another. Color is a power tool when objects are distinguishable by their distribution of color reflectance. Numbers of experimental methods have been suggested that employ object color distributions as signatures for the object recognition. Color information from materials can be used in different applications such as transmission, reflection, object identification, image formation and object recognition. Many optical color filters are developed based on the absorption property of materials at different wavelengths. There are a variety of color investigations in literature for the image formation, visual inspection and object recognition. Recognition of important materials and documents such as banknotes is via their color and texture features as reported by Garcia-Lamont et al. (2012). Different scanners can also identify objects form differences in their colors. The mechanism of the reflection depends on the illumination light characteristics (like polarization, wavelength, intensity distribution) and the properties of the reflecting target (material type, shape, structure). In many studies the use of color and depth has been used for the face recognition in biometric investigations (Tsalakanidou et al., 2003). Such technique is developed based on the depth and color information gathered by the recorded face image information. The main objective of such studies is to evaluate three different approaches based on the color, depth and the combination of the depth and color for the face recognition (Tsalakanidou et al., 2003).
In image formation, segmentation and analysis different techniques are developed for a more precise object recognition. For example the Dichromatic Reflection Model (DRM) introduced by Ortiz and Oliver (2010) is the most referred physics-based model of image formation. One problem in reflection information and image recognition is the existence of highlight as exhibited in the cluster shape. The DRM expresses the radiance at a given point for a certain illumination wavelength as a sum of two reflection components. One reflection is from body reflection which, is referred to as the diffuse reflection term and the other component for the interface reflection that is referred to as the specular term. Thus it is important to differentiate between the two reflection terms in order to obtain a more complete image of the object under study (Ortiz and Oliver, 2010).
For metallic and mirror type homogeneous surfaces the specular reflection is the main contribution of the total reflection. However, for materials such as wood, plastics, ceramic other opaque nonconductors, the reflections are the combination of diffuse and specular reflections (Shen et al., 2008). The role of specular reflection is important in the fields including computer vision and object recognition. The separation of specular reflection and diffuse reflection, or equivalently removed component, is required in the filed of computer vision, object recognition and image synthesis. For example, separation of reflection components using light color and polarization is reported. As described the nature of reflection strongly depends on the target material characteristic which requires more experiments for the samples in solids, liquids and gas phases (Shen et al., 2008).
In many industrial plants bottle liquid filling is used in the manufacturing production lines and thus inspection of such process is an important function. In practice the reflections from the surface of a glass container for the case of empty bottle and a bottle full of different color liquid are important factors. Effectiveness of the optical system reported before (Golnabi, 2010, 2011; Khorramnazari and Golnabi, 2011) motivated us to use the new optomechanical design for the color recognition of different materials and objects. A similar scanning system is employed to test the color of the target surface by using the reflection response curve of the target under study. A double-fiber optical arrangement is developed to investigate the color character of different liquids. The details of the reflection measurement procedure for the tested color liquids are given and obtained results are compared.
Experimental set up: The experimental arrangement used in this research is shown in Fig. 1 which consists of a light source, a double-fiber probe, a liquid cell, a mechanical translational stage, a stepping motor, a stepper motor driver interface, a photodetector, a digital multimeter and a PC for signal monitoring. The light source can be either a coherent laser light or a white or color LED source. A double-fiber arrangement is used in this set up in which in one end; two fibers are separated and they are attached to each other at the other end to form the double-fiber probe. The attached double-fiber end as can be seen in Fig. 1 is mounted in a fixed holder in line with the cell sample under study. The fiber probe holder is fixed on a double-rail mechanical stage that can be scanned in a linear direction by using a stepper motor.
Mechanical scanner: For scanning purpose a smooth double-rail translational stage equipped with two-end micro switches are used in this set up. The dynamic range of the electro-mechanical scanning system is about 60 cm. A 200 step/rev stepping motor is used in this design which offers a controllable scanning speed of about 0.5 to 2.0 mm sec-1. The MATLAB software is used to control the stepper motor with the PC and two electro-mechanical switches are used for start/stop function at the two end limits of the scanning range.
Light source and detection: The light source used here is a white LED operating at a supply voltage of 5V. The Plastic Optical Fibers (POFs) as described by Haus (2010) can operate successfully at visible wavelength range and thus are used in this experiment. Some general benefits of POFs are the simpler and less expensive components, lighter weight, operation in the visible wavelength range, greater flexibility, ease in handing and connecting and greater safety than glass optical fibers.
Fig. 1: | Block diagram of the experimental arrangement, DMM: Digital multimeter, PC: Personal computer |
Two plastic optical fibers formed a double-fiber which are used in this experiment. Each fiber has a total diameter of 2.2 mm, core plus cladding diameter of 1 mm and the core diameter of 0.860 mm with a length of nearly 60 cm. Since the cross section of the fiber is large enough, therefore, the source light is directly coupled to the fiber. The light detection design provides a way to collect all the reflected light even by using a small area (low-noise) photodetector.
A silicon photodiode (BPX 65 Centronic) is used for light detection and conversion of optical signal into an electric one and is reversed biased to 18 V and operates in the photoconductive mode. The electric output signal of this detector is connected to a digital voltmeter. A digital multimeter (SANWA Electronic Instrument Co. Ltd., PC 5000 DMM) is used in this set up for the output voltage reading and data processing (±0.1 mV precision). The general specifications of this instrument are such that provides a 0.03% basic accuracy and 0.01 mV AC/DC voltage resolutions and equips with an optional interface port at the meter back for data communication with a PC. More experimental details about the double-fiber sensor designs and optical fiber probes can be found in other references (Asadpour and Golnabi, 2008, 2010; Haghighatzadeh et al., 2009; Jafari and Golnabi, 2008). Theoretical treatment of the light transmission/reflection in fiber probe and details of the overlap cross section determination are cited by Golnabi and Azimi (2008) and Jafari and Golnabi (2010).
Sample cell arrangement: A cubic cell is fixed on a xyz-mechanical transnational stage in front of the fiber probe as indicated in Fig. 1. The cubic flat surface cell has a dimension of 12.5x12.5x45 mm made of glass material. The wall thickness of the cells is approximately 1.25 mm. The full volume of the flat cell is about 4.5 cc of liquid. All the color liquids are prepared in the same way by dissolving color paint materials in the similar water solvent. The base liquid for all the samples is the same, therefore, the only difference is the liquid color. In practice the cell is fixed on the holder plate in a vertical position as shown in Fig. 1. The required scan distance for reflection study of the cell is about 12.5 mm (cell width), but for recording of the background signals at two cell sides and a more steadier signal at cell, scan distance is about 30 mm. In the measurements care was taken to clean the cell surfaces after each experiment in order to be able to compare the reflection results for different color liquids.
RESULTS
All the experiments for the white LED light source for the cubic cell are performed at the same incident angle and fiber illumination power. For a better comparison the fiber arrangement is fixed in horizontal position for all the experiments and the cube cell as shown in Fig. 1 is in vertical position. The reported results are for the case of fiber probe scanning from left to right. The light reflection signal is given as a function of the scanning time which is useful for some comparative studies. However, a calibration process is required to convert the scan time into the scan distance. First experiment considers reflection results from the empty cubic cell with the flat surface. In recording signal care was taken in order to suppress the stray light in order to optimize the signal-to-noise ratio. The background reflection light signal for such reported measurements is of the order of 2.5 -5.5 mV depending on the room light and stray light conditions. To suppress the stray lights in all experiments the light sensitive experimental parts such as source, fiber probe and photodetector are covered by a thick black cloth. For all experiments the average background of about 4.5 mV is considered and background corrected reflection signals are determined.
A typical background corrected reflection signal as a function of scanning time is shown in Fig. 2 for the empty cubic cell. As can be seen in Fig. 2, observed peak corresponds to the position of the cell for reflection study. In order to obtain the corrected signal as mentioned the average background signal equal to 4.5 mV is deducted from the measured signal values. The corrected reflected light signal is shown for the range of 0-24 sec time scale. Usually signal starts from a background level, then raises to a maximum and stays maximum for a period of time.
Fig. 2: | Reflection signal as a function of scan time for an empty cubic cell |
After a period of time signal drops to the background level again and stays constant for the some scanned times. As can be seen in Fig. 2, reflection signal starts from a voltage level of about 0.51 mV and it is constant from 0-6 sec, reaches to a maximum value of about 16.0 mV at scanning time of 9 sec and from 9 to 17 sec signal is almost constant and from that point on decreases and for the time scale of 22-24 as shown in Fig. 2 is constant again (0.55 mV). In general the response curve for the plane surface of a cubic cell shows a flat-top distribution and the Full Width at Half Maximum (FWHM) of this pulse function is considered as the figure of merit for the specification of the reflection response function. The FWHM of this pulse function for the empty cell is approximately 9.75 sec in the given time scale.
Now the reflection signals from prepared different color liquids in cubic cell are described. For this measurement the sample cell is filled with color liquid under study and reflection signals are recorded, accordingly. In this investigation, measurements are performed in turn for different color liquids and the results for the yellow, red and black color liquid samples are given here. Reflection signal as a function of scanning time for the yellow color liquid is shown in Fig. 3. The reflected light signal is shown for the range of 0-30 sec scale and as can be seen in Fig. 3, for the filled cubic cell signal starts from a voltage level of about 5.23 mV (background signal), it is constant from 0-6 sec, from 6 sec raises and reaches to a maximum value of about 24.28 mV at scanning distance mark of 10 sec and from that point on it is almost constant at about 24 mV level up to 19 sec mark. The reflection signal drops again to about 4.96 mV and stays constant at the scanning time range of 22-30 sec. As described for the empty cell (Fig. 2) the response curve for the liquid filled cubic cell shows also a flat distribution and the FWHM of this curve is determined for the specification of the reflection response curve. The determined FWHM of pulse function shown in Fig. 3 for the cell with the yellow color liquid is 9.58 sec in the given time scale.
Fig. 3: | Reflection signal as a function of scan time for the yellow color liquid |
Similar experiment is performed for the red color liquid and the reflection signal as a function of scanning distance is plotted. The reflected light signal is shown for the range of 0-30 sec time scale and as can be seen in Fig. 4, for the filled cell signal starts from a voltage level of about 5.48 mV (background signal), remains constant from 0-8 sec and reaches to a maximum value of about 16.55 mV and remains at this level for the time interval of 11-19 sec, at scanning range of 22-30 sec signal is about he background level (5.62 mV). Response curve for the reflection from the cubic cell shows a flat intensity distribution. The FWHM of this curve is considered to specify the response curve. The averaged value of the FWHM of this pulse function for the cell containing the red color liquid is 9.79 sec in the given time scale.
In another experiment for the black color liquid the reflection signal as a function of scanning time is recorded. Fig. 5 shows the reflected light signal response for the range of 0-30 sec . As can be seen in Fig. 5, signal as usual starts from a voltage level of about 4.69 mV (background signal for 0-8 sec) and reaches to a maximum value of about 13.28 mV at scanning time mark of 10 sec and from 10 to 18 sec stays at a constant level of about 13.20 mV. The reflection voltage signal drops again from 18 sec time interval to 24 sec and from 24 to 30 sec it is constant about 4.75 mV of the background signal. The response curve for the cubic cell as described before shows a flat distribution function and the FWHM of this curve is considered as the figure of merit for the comparison of the reflection response curves. The averaged value of the determined FWHM of this response function as indicated in Fig. 5 for the cell with the black color liquid is 9.81 sec in the time scale plot.
As described in Fig. 2-5 the reflection signals are plotted as a function of the scanning time which, is useful for some comparative studies. However, in order to relate the response curve to the cell dimension a calibration process is desired in order to convert the scan time into the scan distance. For this purpose the scanner is scanned for a fixed length of about 300 mm and the total scanning time is recorded by the computer program link.
Fig. 4: | Reflection signal as a function of scan time for the red color liquid |
Fig. 5: | Reflection signal as a function of scan time for the black color liquid |
Fig. 6: | Comparison of the reflection signals from different color liquids |
Thus a relationship between the distance and time is obtained which is used as the calibration number for time conversion. By using such a line slope the scan time can be converted precisely into distance for the reported scanning system. According to such results the velocity of the stepper motor with the defined controller function (pause 0.9) is 1.12 mm sec-1 with a correlation R2 factor of unity between the experimental data points and the fitted line.
A comparison of the reflection signals from different color liquids in the cubic cell is described in the following section. In order to see the effect of the reflection signal with the scan distance variation in Fig. 6 the background corrected signals are shown together as a function of the scan distance. Reflection curves for the yellow, red and black color liquid samples are compared here. As described all the color liquids are prepared in the same way by dissolving color materials in water solvent. As a result the base liquid for all the samples is the same and the only difference is the liquid color. For the empty cell the average corrected signal as shown in Fig. 2 is 16.04 mV (uncorrected maximum of 20.5 mV) and the background signal for that case is 5.0 mV. Two points are notable in results given here. First, some color liquids like yellow color one shows reflection signal higher than that of empty cell while, some colors like the red and black samples show a lower reflection signal. Second, among tested color liquids the yellow color liquid gives the highest corrected reflection signal (19.78 mV), next red color liquid (12.43 mV) and the black color shows the minimum reflection signal of 8.77 mV. As can be seen, there is a correlation between the reflection peak signal and the color of the liquid. Comparison of the maximums of the response curves for the tested liquids with the same cell and illumination power clearly shows that the peak intensity mainly depends of the liquid color. A careful look at Fig. 6 verifies such a notable difference in the observed peak signals.
Comparison of the response curves for the tested liquids with the same cell and the similar illumination power distribution can also show the pulse bandwidth dependence to the liquid color. First let us look to see if there is a correlation between the bandwidth (FWHM) of the response curve and the color of the liquid sample. For the tested color liquids all prepared similarly and illuminated with the same light source the yellow color liquid gives the bandwidth value of (FWHM of 10.84 mm), red color liquid shows a FWHM of 11.0 mm and the black color shows the FWHM value of 11.17 mm. It must be pointed out here the FWHM for the air sample in the cubic cell is 9.76 sec in time scale and around 10.92 mm in the distance scale. Three points are notable in this investigation. First point and perhaps the more important one, is that the nature of the medium in the cell is really important factor in the value of the maximum peak observed in the reflection response curve. Second point is the fact that FWHM of the response curves does not show a meaningful difference with the liquid color change. For the tested color liquids as shown in Fig. 6, there is a difference of only 0.17 mm in the obtained bandwidths. Considering the possible error in the determination of such FWHMs then one can conclude that the curve bandwidth value varies insignificantly with the liquid color. Thus, the maximum of the peak is more indicative of the color variation of the liquid. Third point is that the nature of the response curve is almost insensitive to the filling medium of the cell. This point can be verified by comparing the FWHM of the air sample which is 10.92 mm very close to the FWHM of the yellow color liquid that is 10.84 mm.
In the last study the reproducibility of the results for the cubic cell measurements are investigated and typical results are compared for this investigations. The two reflected light signals are shown in Fig. 7 for the range of 0-24 sec time for the same experimental conditions.
Fig. 7: | Reproducibility of the reflection results for the cubic cell measurements |
For the two series signals start from a voltage level of about 3.48 mV (background signal for the range of 0-6 sec) and reach to the maximum value of about 16.92 mV at 7 sec and stay at this level for the range of 7-15 sec and then signals drop to the background level of 5.9 mV and for the 20-24 sec signals stay constant at the same level. In term of reproducing the results, the response curves for the two series are plotted together in Fig. 7 which overlap very well. Series 1 results are indicated by the diamond symbol, while series 2 are indicated by the square symbols in figure. As can be seen, the response reflection functions for the two runs are very similar in behavior. For the series 1 the maximum signal for the air is 16. 92 mV while for series 2 is 17.32 mV at the same scanning check point. The background signal for the run 1 at start of scan is 3.48 mV while for run 2 is 3.84 mV (0.36 mV difference). At the end of scan the background signal for the run 1 and run 2 are 5.90 mV and 5.54 mV, respectively (-0.36 mV difference). The maximum observed error signal for the given air sample is 0.4 mV which, corresponds to an error of about 2.3%. The averaged reproducibility error of about 1.15% can be considered for the reported system of reflection measurements. The observed minor difference can be due to the ambient condition variation, source light fluctuations and fluctuations due to the electro-mechanical scanner missteps in scanning operation. The maximum fluctuation for the background signal is about 0.36 mV that shows the main source of the reproducibility error is because of the dark noise and stray light effects in such signal detections. However, the real time overlap of the response curves indicates a good precession in measuring the position of the peak signals that corresponds to the position of the cell. A key point of this investigation is that there are good reproducibility figure numbers for both the maximum value of signals and the occurring time of such maximums. In another study the sensitivity of the results for the reported optical system is investigated. For this purpose the reflection signals for the dark green and green color liquids are recorded and compared. A reasonable difference of about 2 mV is obtained which, shows a relatively high sensitivity level of the reported system.
Some of the obtained experimental results are interesting which show the novelty of the reported system in some respects. Considering the obtained results following remarks can be made:
• | The reflection response curve and the (FWHM) depend on the cell surface curvature and the properties of the filling liquid. The response curve for the cubic cell is a nearly flat-top function. The reflection signal value depends mainly on the cell surface, liquid material and structure and color. There is a correlation between the FWHM of the response curve and width of the cubic cell facing the probe light. The actual path-length of the flat cell is about width of the cell 10 mm which, corresponds to the 10.7-10.8 mm as obtained from the response curves of the empty and filled cell as shown in Fig. 6 |
• | Recorded signals depend on both the specular and diffusion reflections. Such a reflection also depends on the target material color. For tested samples the reflection signal from the yellow color liquid is higher than that of the red and black color liquids for the white LED illumination source. The fiber arrangement and the position of the cell surface with respect to the fiber position are important in reflecting signal measurements. It is noted that for the cubic cell with the plane surfaces the fiber vertical/horizontal arrangement does not affect the sensitivity of the reflected signal |
• | In many industrial plants bottle liquid filling is used widely and thus inspection of such process is an important task. In such plants and production lines either a machine vision system or a simple vision sensor is used for the final quality control checking of the products and goods. Thus inspection of such a process of liquid filling and the examination of the liquid color are important issues in industrial plants. In practice the reflection from the empty glass bottle and bottle full of a color liquid can be investigated by using the reported method |
• | In view of the system ability the main features and advantages of the new design with respect to the others are twofold. First, the reported experimental arrangement offers an effective method for the reflection study of different targets. This method offers a good reproducibility of the results and the reflection signals for the dark green and green color liquids could be clearly recognized which indicates the high sensitivity of the reported system. A reasonable reflection signal difference is obtained that verifies this point. Second, the cell option provides a real means to compare the reflection results for the color liquids. More accurate results are deduced from the comparative measurements by using the empty cell reflection signal and that of the filled cell. The reported system in spite of the simplicity and its low cost offers advantages for the liquid color recognition and inspection |
Now let us compare the result of this study to other studies in order to see the advantages and the limitations of the reported system. After searching literature up to authors knowledge the optical arrangement is a new one for the liquid color testing. The nearest reported design found is a reflection-based optical fiber system used to evaluate the quality of food in a large scale industrial oven (OFarrell et al., 2004). In that experiment the food sample is illuminated using a broadband tungsten halogen light source through a fiber. The reflected light which is representing the color sample is transmitted by a fiber sensor to a spectrometer for color resolving. The given data is stored in the computer for the subsequent analysis using the neural network simulator software. The optical system comprises a purpose built optical fiber probe which is directly coupled to the spectrometer. As described in that report an optical fiber sensor is developed for the on-line examination of food color samples in the oven. Considering such experiment the reported optical arrangement can be used in practical applications based on color analysis.
Relative diffuse reflection measurements from different solid target surfaces by using a He-Ne laser are reported before (Golnabi, 2001). In that measurement the role of the diffusion reflection is investigated and it was concluded that for the metallic surfaces the specular reflection is dominant while for the dielectric surfaces the diffuse reflection plays a more important role. However, the given results are only for the solid target surfaces in general. In another experiment a laser light is used in the study of reflection from metallic surfaces (Tanner and Fahoum, 1976). Considering the importance of both specular and diffuse reflections, the results of this study provides information about total reflections from liquids with different colors that has not been reported by using the double-fiber optical arrangement. As described the nature of the reflection is different from solid and liquids reflecting targets. However, there is a good agreement between the reported results and that of the previous work for the color papers. As referred by Golnabi (2001), the yellow color paper shows the highest reflection signal while the gray color shows the lowest diffuse reflectance. This is in agreement with our result for in which yellow color liquid results the highest reflection signal among tested samples. The novelty of this method is that provides useful color information that can be used in many applications. Another advantage of the reported method is the sensitivity of the method which, is higher than the earlier reports (Golnabi, 2001; Tanner and Fahoum, 1976).
The effect of the liquid color on the light reflection by using an optical system is described in this report. Useful reflection information for different color samples is given here and it is shown that reflection signal can be effectively used for color recognition. Previous results showed that reflecting signals can provide information about the structure of the surface and in particular, can provide information about the shape and curvature of the object surface under study. Results of this study show that in addition to described information new given color information is helpful for the recognition and inspection. As shown the uniform plane surface of the empty cell shows a flat-top response function and there is a correlation between the cell width and the FWHM of the cubic cell. A similar response functions with different maximums for the color liquids are also observed in color testing experiments. Such comparison shows that the behavior of the response curve mainly depends on the liquid container cell which is a plane surface in this case. However, the maximum of the response function depends on the filling liquid, in particular the color parameter in this investigation. Since the reflecting surface is a uniform plane surface therefore it is insensitive to the fiber arrangement of the fiber probe that makes the probe adjustment very easy. As a final note, bottle liquid filling and liquid color examination are important tasks in the manufacturing processes and production lines. The reported optical system and reflection measurement method can be employed in design and operation of such vision sensors for the inspection of described processes.
This study was supported by the Sharif University of Technology Research program. The authors gratefully acknowledge the grant money devoted to this research project.