The Effect of Camera and Light Source Characteristics on Image Quality in Machine Vision Application in Food Industry

Machine vision technology has been used in a variety of agricultural and food industries applications ranging from planting and postharvest operations to food processing and inspection. High quality image has an essential role in successful application of machine vision technology. To acquire the best image for a specific application, an appropriate camera along with correct light source must be chosen. In the present work, two different types of light sources, namely LEDs and Fluorescent along with two models of camera namely, Proline and Telecam were used. The completely randomized experiment was carried out and 10 standard RAL white card images were captured during each treatment. The RGB values of images were extracted by Image processing toolbox of Matlab software. Comparisons were made between these values and those of standard card values i.e. 255 using SPSS software. LEDs along with camera Telecam proved to be an appropriate combination if high quality images are desired.


Introduction
Machine vision is one of the most widely used technology in various fields such as medicine, military, security, food and agricultural industry.In the recent years, much attention has been paid to the quality sorting of foods.In a sorting line that uses image processing technology, the need for a controlled artificial ligh room is necessary because of variability in daylight.Also, to avoid confusions in image segmentation, the light room must omit any shadows.Figure 1(a) shows the gray level image captured under daylight and Figure 1(b) shows the gray level image captured in light room.As shown, image obtained under daylight has shadow that leads erroneous segmented image, while image captured by artificial illumination system solves that problem (Pourdarbani et al, 2009).Also Martin and Jisnu (2005) proposed a new method for removing the shadows.They used Support vector machines to identify shadow boundaries based on their boundary properties.This boundary information is used to identify shadowed regions in the image and then assign them the color of non-shadow neighbors of the same material.The basic principle of all machine vision applications is that the object should adjust the incoming light in some detectable way; otherwise a device cannot be visible to a neither camera nor to a human eye.If the device adjusts the incoming light in such a way that the outgoing rays are different from the incoming rays, then the object has created contrast (URL1).
The most popular illumination technologies are listed below: Direct Illumination: The object is illuminated directly with light closed to the optical axis.The direct illumination is suitable for non-reflective parts, and wherever strong illumination is needed.This type of illumination is also available as strobe version which provides increased intensity during flash.
Low Angle and Horizontal Illumination: The low angled light emphasis even smallest deviations of the surface.This is very helpful to detect scratches, tool marks and edges on reflective parts.This type of illumination is also available as strobe version.
Back Light Illumination: Back light illumination achieves a highly homogeneous light on a large surface.Back light illumination can be used either to measure very precisely the contour of an object or to inspect transparent or semi-transparent parts.
Dome Illumination: For shiny spherical and convex objects dome illuminations provide a diffuse and homogeneous light without reflections (URL2).
There are three basic types of illumination commonly used for machine vision: halogen, fluorescent and LED.Lou et al (1997) evaluated three light sources, namely, fluorescent, halogen and incandescent for machine vision.Pourdarbani et al (2008) compared four types of light sources i.e. miniature 3mm LED, fluorescent, halogen and incandescent.
Many researches have been carried out about illumination.Kobus Barnard (1998) gives a survey of computational approaches of modeling scene illumination color for computer vision and image reproduction.Cowan (1991) gives a procedure to automatically place the camera and the light source to obtain high-quality images for further processing.The procedure was developed using computer aided design (CAD) models.Li et al (1995) used mathematical programming techniques to determine the optimal sensor and for light source positioning.They defined the optimal sensor and light source positions to be able to place camera and light source in such a position that produces images with minimum variance in desired measurement.They assume that the vision task is specified in terms of measurements related to edges in the image.Using a variant of the Torrance-Sparrow model that takes into account the polarization of the light, the contrasts across edges are computed and used to estimate the variance of the required 2D measurement.Sunil Kumar (2006) designed a illumination system for machine vision.He suggested a design procedure to obtain uniform illumination on the scene being images using several light sources.He posed the problem of determining the optimal position of the light sources as a minimization problem.Simulation results showed the effectiveness and suitability of the proposed procedure to illuminate the scene uniformly.Thorsten and Rolf-Rainer (2010) introduced a model of active illumination source.Safety issues with regard to near infrared illumination are addressed using this model and a radiometric analysis.The characterization of image quality is based on the measurement of Opto-Electronic conversion, modulation transfer function and noise.Sellahewa and jassim (2010) declare that the accuracy of automated face recognition systems is greatly affected by intra-class variations between enrollment and identification stages.In particular, changes in lighting conditions are a major contributor to these variations.They presented adaptive approaches to face recognition to overcome the adverse effects of varying lighting conditions.Image quality, which is measured in terms of luminance distortion in comparison to a known reference image, was used as the base for adapting the application of global and region illumination normalization procedures.Image quality was also used to adaptively select fusion parameters for wavelet-based multi-stream face recognition.
In this paper, we concerned the preparation of the appropriate hardware system for machine vision application for aiming the high quality for images.

Materials and Methods
In this study, 2 types of light sources, namely, Power LED12v DC and fluorescent and 2 types of cameras, namely, Proline and Telecam were evaluated.The completely randomized experiment was carried out and 10 standard RAL white card images were captured during each treatment (Figure 3).With respect to Power LED source, 8 LEDs were placed on the 10 cm width circular frame inside dome illumination system.With respect to the fluorescent, a 40 cm diameter circular lamp equipped with high frequency transformer to reduce the signal oscillation was placed inside the dome illumination system.The criterion of evaluation was the standard colored RAL cards.The RGB value of images was extracted by Image Processing toolbox of Matlab software.For validation of system, RGB values of captured images were compared with those of standard RAL card values i.e. 255.Statistical analysis was conducted using SPSS software.

Results and Discussion
To produce a smooth and steady signal, a 12V battery was used to power LEDs. Figure 4 shows the changes trend of signals in AC power supply (Alciarore & Histand, 2003).Since a fluorescent lamp is powered by AC supply, therefore, changes in RGB values of the images at different frames are expected.For example if the image is captured when the voltage is exactly zero, that image will be dark while capturing the image in maximum voltage results in brightest image.Since it is not possible the fluorescent lamp to be powered by DC supply, so this problem won't be solved, but it can be reduced.If high frequency transformer is used, the maximum voltage will be occurred fast and the probability of capturing frames near maximum voltage will increase.But if 12VDC battery is used, the output signal will be fixed (Figure 6), as a result, all captured frames will be in the same lighting condition.That is what needed for machine vision applications to have invariable acquisition condition.
Figure 6.The voltages produced by DC power supply for LEDs The results of fluorescent and LED are given in table 1 to 6.  2, 4, 6, the differences between cameras and light sources are significant.Also interaction between camera and light source is significant.Tables 1, 3, 5 give the mean values for Red, Green and Blue respectively.Since RGB value for a combination of LED -Telecam was near to 255 and in fact did not have any significant differences with standard reference, so it was selected as an appropriate system for machine vision application.
As mentioned above, Luo et al (1997) evaluated three light sources and concluded that fluorescent gave the best results.The results of Pourdarbani et al (2008) research confirmed Luo results, moreover showed that Miniature 3mm LED gave better result than that of fluorescent; however since the Miniature LEDs were fed by AC supply power, so they couldn't obtain as constant output as DC power supply.
It is also worth to mention that the performance of capture card affects the quality of images.Two capture cards of the same brand but different quality were examined under the same conditions (illumination system and camera); low quality capture card led to noisy images.
Figure 1.Sample images under different light sources

Figure 2 .
Figure 2. Schematic view of basic dome lighting system design

Figure 4 .
Figure 4.The voltages produced by AC power supply

Figure 5 .
Figure 5.The voltage produced by AC power supply for LEDs

Table 1 .
Descriptive statistics for Red

Table 2 .
Interaction results between camera and light for Red

Table 3 .
Descriptive statistics for Green

Table 4 .
Interaction results between camera and light for Green

Table 5 .
Descriptive statistics for Blue

Table 6 .
Interaction results between camera and light for Blue