ISSN: 2321-6204

Reach Us +1-845-458-6882
All submissions of the EM system will be redirected to Online Manuscript Submission System. Authors are requested to submit articles directly to Online Manuscript Submission System of respective journal.

Application of Computer Vision Systems in Colour Evaluation of Kalakand (Milk Sweet): A Heat Desiccated Dairy Product

Vyavahare AS1, Jayaraj Rao K2, Pagote CN3, Govindarajulu Yadav M4, Yogananda Reddy Kurra4, and Jayaveera KN4

1 Almarai Co., Riyadh, Suadi Arabia.

2Senior Scientist,DT Section, NDRI, Adugodi, Bangalore 560 030, Karnataka, India

3Principal Scientist,DT Section, NDRI, Adugodi, Bangalore 560 030, Karnataka, India

4International Science-Tech Research Institute, Anantapur, Andhra Pradesh

*Corresponding Author:
Almarai Co.,
Riyadh, Suadi Arabia.

Received date: 24/10/2012 Accepted date: 18/11/2012 Revised date: 15/11/2012

Visit for more related articles at Research & Reviews: Journal of Food and Dairy Technology

Abstract

Color is an important attribute which creates first impression about the food quality. The problem of maintaining a uniform colour of products in a dairy is one of the important and challenging areas of research in food engineering. Hence, in order to maintain a uniform colour, a reliable and faster method of colour measurement is required. In this context, computer-vision technology proves to be a useful method. In this paper, computer vision method has been used to measure colour of kalakand (milk sweet), an Indian dairy product using a flatbed scanner. The product was taken into a suitable transparent material and its surface scanned using the scanner.. The images obtained were opened in Adobe Photoshop software and colour parameters viz. R, G and B have been measured by the Graphical Editor of Photoshop. The overall L, R, G and B values ranged between 137.81 to 143; 140.76 to 150.43; 143.40 to 147.96 and 91.39 to 100.13 respectively on a scale of 256.. Scanner variables had little impact on magnitude of these colour parameters, but the material in which product kept or wrapped for scanning had a significant impact. The method developed was fairly accurate as indicated by low coefficient of variation values. Overall results showed that computer vision can be used as an objective, rapid and non-contact method to quantify the colour of Kalakand.

Keywords

Kalalkand (Milk sweet), Adobe Photoshop, coefficient of variation, RGB mode, Flatbed scanner

Introduction

Quality and safety are major factors that drive the economy of the food industry. This is because of increased awareness of consumers for high quality food products, which results in perennial need for enhanced quality monitoring [1]. For the sensory analysis of agricultural and food products, a new inspection systems, mainly based on scanner or camera - computer technology have been investigated. Computer vision technology is highly relevant and successful in providing objective measurements in various agricultural and food products, particularly for visual attributes like color or shape of food products. Therefore, computer vision method for food quality and safety evaluation is gaining much attention. And usefulness of computer vision in the food industry is authenticated by several experiments carried out throughout the world [2]. Computer vision has long been recognized as a potential technique for the guidance or control of agricultural and food processes [3]. Therefore, over the past 20 years, extensive studies have been carried out generating many publications. Measurement of colour is one area which plays an important role in perceiving food quality and also aids in detection of anomalies or defects of food items [4]. From the times immemorial humans devised some means of colour measurement, though by sensory organs and by comparison. From the times of Munsell colour discs, colour measurement has undergone enormous transformations and developments, thanks to today’s computerized revolutions in almost all the fields of human life. Computers can play a significant role in field of colour measurement offering vast opportunities for the researchers. By computer vision system, the colour components can be accurately measured.

For agricultural and food products, sorting and grading during handling processes and commercial purposes is one of the important commercial operations. For this, computer vision can be non-destructive and cost-effective technique [5]. Gokmen and Sugut [4] reported that, the chromatic and geometric attributes of any object should be accounted for making visual or instrumental assessment of appearance. It is well known that, as colour observation allows the detection of certain anomalies or defects of a product, colour can be used as a tool to accept or reject the product. Thus colour measurement is an important tool in the hands of food technologists for determining and monitoring quality of any food product. It could also act as a controlling means of certain processing conditions. Tossavainen and Kallionen [6] suggested that colour measurement can be used to follow the advanced Maillard reactions in milk. Colour spectrophotometers are now commonly used for measuring colour and colour stability of various meat and vegetable products like chicken patties [7], processed mango slices [8], sattu, a soybean product [9], French fries [10], mango gel [11], chicken balls [12], chilled beef [13], frozen and osmotically dehydrated tomato [14] and potato crisps [15]. The colour of all these products was measured in terms of Hunter L, a and b; CIE- L* i.e. lightness on a scale of 0 (black) to 100 (white), a* (red colour component) and b* (yellow colour component). It may be observed that all of the above reported studies employed reflectance principle and utilized Hunter method of colour evaluation or CIE methods of colour expressions. Few studies are reported on effective utilization of commonly available softwares like Adobe Photoshop, which otherwise finds effective application in the field of photography.

Kalakand, or (more correctly) Qalaqand in Urdu language is a popular milk product of India, particularly in the northern, eastern and central regions of the country. It is also popular in several parts of Pakistan. Kalakand bears a great social, religious and economic importance. It is prepared by heating danedar khoa and sugar with continuous stirring until characteristic grainy texture and caramelized flavor develops [16]. Kalakand has typical off white or creamy shade.

Materials and Methods

The following materials were employed in the study:

Computer: Dell, Core 2 Duo, 4GB RAM, Pentium 4

Scanner: Hewlett-Packard Scan jet 5370c

Camera: Cannon Company: 7.1 megapixels

Compact fluorescent lights(CFL): Philips- 14 Watt, B22 220-240 V, 50 Hz, 760 lumens

Printer: Hewlett-Packard Desk jet 5100, with cartridge number – 57

Scanner and Adobe Photoshop Method

Kalakand samples were conditioned at 30oC and blended properly in pestle and mortar. With the help of a spatula, the product was taken in a packaging material. The packaged sample was placed on the bed of the scanner and was covered by scanner top. Scanning was performed and the image was saved as JPEG file. The effect of following scanner variables on colour parameters were then studied: resolution (DPI 75 to 1200); sharpness (low, medium, high and extreme); image quality (low, medium and high); background of sample (black and white); thickness of sample inside the petri dish (0.5 cm, 1cm and 1.5 cm) and type of packaging material used (cellophane, glass and LDPE).

Colour analysis software namely Adobe Photoshop Version 8.0, compatible to the Microsoft Windows XP environment, was used to extract and analyze colour information from the scanned image [17]. The scanned images were transferred to computer hard disc and opened with Adobe Photoshop software. Colour parameters were measured in three colour modes viz. RGB mode- Lightness (L), Red (R), green (G), and blue (B); The separation of colours of scanned images and the determination of the luminosity of R, G, and B channels were made using the accessories in Adobe (R) Photoshop 8.0 software.

Statistical Analysis

In order to analyze the statistical significance among the colour parameters, the following statistical tools were employed: 1) Standard deviation – All the mean values were expressed as ± SD 2) Coefficient of variation (CV) - it was determined by the formula: Standard Deviation/Mean (σ/x) 3) One way ANOVA and 4) The Students t - test was used to calculate the significant difference between two treatments, like scanner background [18]. All calculations were carried out with Microsoft Office Excel 2007 software (version 8.0, Microsoft Inc., Redmond, WA) and the statistical significance expressed at 5% level of significance (P < 0.05) [19].

Results and Discussion

Scanner and Adobe Photoshop Method

The quality of the scanned images depends on several factors such as scanner resolution, image quality, sharpen level etc. The scanners are mostly designed for scanning text and photograph materials. They probably are not specially designed for any colour measurement purpose, though colour scans are commonly employed for various applications. However, because of availability of specialized software like Adobe Photoshop, the scanned images could be utilized for colour measurement purposes [20].

Effect of Scanning Resolution

One of the qualifying parameters for a scanner is its resolution, measured in pixels per inch (ppi), and more accurately referred to as dots per inch (dpi). The resolution defines the fineness of the scan. During scanning, scanner head moves over the document line by line more specifically dot by dot. Each line which is made up of “basic dots", corresponds to pixels. The range for resolution of scanner varies from manufacturer to manufacturer. But, generally the order of magnitude of the resolution ranges from 75 dpi to 2400 dpi and in some advance scanners, it is up to 4800 dpi or above. This scale of resolution is meant for different applications, the lower resolution image occupies less space on hard disk than higher resolution one. It may thus be inferred that colour intensity might vary with the magnitude of resolution adopted for the scanning the objects.

From Table-1, it can be seen that the lightness value (L), R (Red) and G (Green) values showed decreasing trend with increasing resolution. The ‘L’, ‘R’, ‘G’ and ‘B’ (Blue) value ranged from 224.33 to 229.36; 240.07 to 245.55; 227.08 to 232.15; and 167.44 to 171.76, respectively The analysis of variance (ANOVA) of the data showed that there was no significant difference among colour values at various resolutions. This signifies that there was no significant effect of scanning resolution on the magnitude of colour parameters. The variation among the batches was analyzed by Standard Deviation (SD) and coefficient of variation (CVbatch). The variation among the resolution mean values was determined by ‘CVresol’. It can be seen from Table-1 that coefficient of variation within the batches (3.21 to 4.71) is much higher than resolution coefficient of variation (0.63 to 1.11).

food-dairy-technology-scanner-resolution

Table 1: Effect of scanner resolution on colour values of kalakand in RGB mode

Higher standard deviation as well as higher batch-wise coefficient of variation may be attributed to varying processing parameters like intensity of heat treatment applied, duration of heating, extent of stirring and scraping etc. As the variation attributable to resolution is very less as compared with the variation attributable to manufacturing batches of kalakand, any of the scanning resolutions provided in the instrument can be used for colour measurement purpose.

Ravindra and Goswami [21] concluded that the computer vision system involving measurement of peel colour in terms of lightness (L), a, b values using histogram window method of Adobe Photoshop, standard L*, a*, b* values, the hue and chroma values along with the total colour difference could be used to quantify overall changes of peel and pulp of mangoes, thus, enabling customization, standardization and storage studies of various fruits.

Effect of Sharpen Level

Sharpening defines contrast of an image. More specifically, sharpening emphasizes details in images by increasing the contrast of the boundaries between light and dark areas of an image. This increase in contrast sharpens the focus and accentuates the difference between areas of light and dark making for a sharper scanned image. Thus sharpening level may affect the clarity and quality of scanned images.

In most of the scanners, sharpen level ranges from low to high. Since sharpen level is likely to have an effect on colour parameters, the effect of sharpen level on colour values of kalakand (milk sweet) was studied. In general, the lightness and R values showed decreasing trend, while G and B values were almost the same with increasing sharpen level from low to extreme. (Table-2). The analysis of variance (ANOVA) of the data showed that there was no significant difference among colour values at various levels of sharpness. In Table - 2, each of the value under given sharpen level is an average of five different batches. The variation among the batches was analyzed by Standard Deviation (SD) and coefficient of variation, ‘CVbatch’. The variation among the mean values vis-à-vis sharpen level was also determined and reported by ‘CVsharpen’. It can be seen from Table-2 that batch coefficient of variation (1.96 to 3.30) is much higher than sharpen level coefficient of variation (0.01 to 0.18).

food-dairy-technology-sharpen-level

Table 2: Effect of sharpen level on colour values of kalakand in RGB mode

Effect of Image Quality

Similar to scanning resolution another parameter that affects scanned image is its image quality. It ranges from low to high. This scale of image quality is meant for different applications. Products from different batches were scanned at constant resolution and sharpen level, but saved with different image quality.

It was seen that the lightness, R, G and B values of kalakand showed increasing trend with increasing image quality from low to high (Table-3). However, there was no significant difference among colour values at various levels of image quality.

food-dairy-technology-image-quality

Table 3: Effect of image quality on colour values of milk sweet in RGB mode

It can be seen from Table-3 that batch wise coefficients of variation (2.13 to 3.43) were much higher than image quality coefficient of variation (0.03 to 0.68). Higher standard deviation as well as higher batch wise coefficient of variation may be attributed to various processing parameters like heat treatment applied, time period of heating, stirring and scraping etc. As the variation attributable to various levels of image quality is very less as compared with the variation attributable to batch of kalakand, measurement of colour values of kalakand in RGB mode can be done at any level of image quality.

Effect of Thickness/Height of Sample.

Thickness refers to height of product in petri dish. It is measured in centimeters (cm). During scanning, the captors convert the reflected light intensities into electrical signals, which are in turn converted into digital data by an analogue-digital converter. These light intensities may change with change in thickness of sample.

Product with varying thickness/height (0.5 cm, 1.0 cm and 1.5 cm) was scanned at same resolution keeping all other parameters constant. In general, the lightness value, R, G and B values showed decreasing trend with increasing sample thickness from 0.5 cm to 1.5 cm (Table-4). The analysis of variance (ANOVA) of the data showed that there was no significant effect of sample thickness among L and G values whereas significant effect was observed on R and B values.

food-dairy-technology-thickness-height

Table 4: Effect of sample thickness/ height on colour values of milk sweet in RGB mode

Effect of Sample Container

In order to maintain specific dimensions of the product and to prevent any damage to the scanner surface caused by direct contact with the product, kalakand was taken in a container for scanning purpose. Different containers may be used, but because of their varying refractive indices, they may influence the colour parameters of the product. Three containers were used namely glass (petri dish), polythene (LDPE) and cellophane films. The product was wrapped or spread in the containers which were then placed on the scanner surface for scanning purpose.

It was found that all Lightness, R, G and B value were higher in cellophane followed by LDPE and glass in that order, this might be because of the differences in their refractive indices. There was variation observed in these values because of the type of container as indicated by CV values which ranged from 0.99 to 1.86 (Table-5). The variations within the batches of kalakand (milk sweet) were given by CV values ranging from 2.22 to 2.72. ANOVA indicated significant differences among the type of container (P < 0.05).

food-dairy-technology-colour-values-kalakand

Table 5: Effect of type of sample container on colour values of kalakand in RGB mode

Effect of Scanner Background

During scanning, the sample taken in container is kept on the sample platform and the flap closed. The inner surface of the flap forms the background of the sample and is normally white. During scanning, light from the source incidents on the sample surface and gets reflected back onto the detector. A part of light gets absorbed by the sample and some part of the light passes through the sample and impinges on the background. If the background is white, then the impinging light gets reflected back into the sample. If the background is black then the light is absorbed in which case, magnitude of colour parameters is likely to vary. Hence, to determine whether background of the sample has any effect on the colour parameters, two backgrounds were chosen for the study: white and black, the former having the property of reflecting all the light and the latter having the property of absorbing all the light. The L, R, G and B values of kalakand with white background were 224.6, 246.19, 224.42 and 166.51, respectively and these values for black background were 220.57, 240.7, 220.89 and 164.42 (Fig.1). These values indicate that black background produced lower values than the white background, which is statistically significant as indicated by t- test (P < 0.05). This is because the rays from the light source were completely reflected by white background some of which in turn added to the light reflected by the sample giving more colour values. When black background was used, the light falling around the sample was absorbed by the background leaving only the portion of light reflected from the sample.

food-dairy-technology-colour-parameters

Figure 1: Effect of scanner background on colour parameters of kalakand (milk sweet) in RGB mode.
Note: All parameters shows significant difference at p <0.05

Thus, it was inferred that measurement of colour values of kalakand could be done at any level of the scanner parameters like resolution, image quality and sharpen level, but the product has to be taken in a specified container - petri dish or cellophane or polythene film with specified background (black or white). The results obtained could not be exactly evaluated against works reported in literature, because there are very few such reports published on dairy products. Nawale et al. [22] used flatbed scanner and Adobe Photoshop method for the comparing colours of espresso drinks prepared with and without whey as a base ingredient. Fresh coffee samples were scanned at a constant scanning resolution, the scanned images were then transferred to Adobe Photoshop and colour values in terms of R, G and B value were recorded. It was found that colour of whey coffee was almost similar to colour of milk coffee. It was suggested in the study that this method for comparison of colours of products was safe and reliable. The similar method was used by elsewhere for the study of colour changes of gulabjamuns (sweet milk product) during frying [23]. Fried gulabjaimuns were scanned and using Adobe Photoshop software chroma, hue L, a and b values were computed. The study established the utility of computer vision system in measuring colours of heterogeneous products like gulabjamun. Borin et al. [24] quantified Lactobaccilus spp. in fermented milks grown in MRS agar by use of digital colour images obtained by scanning agar under flatbed scanner. For this purpose, they used glass petri plate as container for containing product while scanning.

Conclusion

It was concluded that, Scanner–Adobe Photoshop method can be used to measure colour of products like kalakand in which natural colour variations occur because of several reasons. For all of the above variables studied, except type of container and colour of background, it was observed that variations in colour parameters attributed to natural batch to batch variations were more than the variations caused by scanner parameters. Therefore, measurement of colour values of kalakand could be done at any of the scanner parameters, but the sample background has to be specified and sample has to be taken in a specified container – glass petridish or cellophane or LDPE film.

References