Introduction

Rice (Oryza sativa) is one of the major cereal crops consumed all over the world (Grist 1975). With over 43 million hectares, India has the largest rice acreage in the world and is the second largest producer of rice. The rice crop forms the basic economic activity directly or indirectly for about 150 million rural households in India (Krishnaiah and Janaiah 2000). Hydro-thermal processing of rice grain, which includes puffing and extrusion, has become one of the most widespread food industries of the world (Bhattacharya 1990) in which rice starch is converted into its gelatinous form. Puffed rice is one of the most widely consumed ready-made processed cereals in rice-producing parts of the world (Bhattacharjee and Nath 1985). Puffed rice or expanded rice has been a popular snack food in the Indian subcontinent and China for several centuries where moistened (pre-treated) grains are puffed by a high-temperature, short-time (HTST) heat treatment (Bhattacharya 2011). It is very popular as a street food in developing countries such as India, Pakistan, China and Bangladesh and is consumed in many other countries as a cereal breakfast component or as a light food. It must be noted here that the terms puffed, popped and expanded rice have often been used rather interchangeably or indiscriminately in scientific literature (Bhattacharya 2011). Although the present study deals with expanded rice (Murmura, Puri or Muri), it has been referred to as puffed rice for the purpose of generality with most scientific texts which is in accordance to Murugesan and Bhattacharya (1986). The puffing process can be broadly classified as pressure-drop process such as gun puffing (Hoseney 1986), and as heating in high temperature processes which may use air, oil or sand with a sudden application of heat such as oven-puffing (Matz 1991). Puffed rice is, therefore, prepared from hydro-treated parboiled or milled rice by heating in high temperature, air, oil or sand, or also from raw milled rice in microwave field, fluidized bed or by gun puffing. Although gun puffing is a widely used process for making puffed rice for snacks on a commercial scale (Hsieh and Luh 1991); traditionally, oven-puffing is done by agitating them with sand in a vessel while supplying heat from underneath the vessel (Das and Srivastava 1989). The sand usually heated upto 200-250 °C acts as a convenient medium of heat transfer (Bhattacharya 2011). During puffing, the vapor pressure of water within the grain becomes so high that the grain can no longer hold its vapor form causing the kernels to increase their volume several times and a fully-treated crisp, porous, puffed, ready-to-eat product is created (Payne et al. 1989).

Optimization of food quality is of crucial importance in food manufacturing industries and requires a fundamental understanding of the different components in food. Visual changes due to processing (e.g., milling of grain, gelatinization of starch, etc.) are the result of changes at the microscopic and molecular levels (Kaláb et al. 1995). The texture of a food product is related to its geometric and mechanical properties. Structural characteristics such as cell size, density and uniformity strongly influence the sensory properties of a product, and play a significant role in quality assessment and control of expanded food products (Vickers 1988). Digital image processing plays an important role in evaluating food quality by maintaining accuracy and consistency while eliminating the subjectivity of manual inspections. The application potential of image processing techniques to the food industry has long been recognized (Tillet 1990). The food industry ranks among the top ten industries worldwide in using image processing techniques (Gunasekaran 1996) and several studies with micro-structural analysis have been carried out for the objective and non-destructive evaluation of several ready-to-eat food products (Timmermans 1998). Scanning electron microscopy (SEM) is often used in digital image processing to reveal the internal structure (cross and transverse sections) and/or surface appearance in details (Goldstein et al. 2003). These images have a distinct advantage in contrast and clarity to show the details of a product structure (Tan et al. 1997). Van Dalen (2004) developed a method for the determination of the size and size distribution of rice and the amount of broken rice kernels using image analysis. The method was tested on parboiled and regular-milled white rice of different varieties and yielded the same accuracy and precision, as compared to the manual method. Gao et al. (1999) studied the sensory properties of extruded corn puff texture using fuzzy edge-detected image analysis technique. Barrett and Peleg (1992) used an image analyzer to measure the cell sizes of corn-based extrudates and correlated the mean cell size with the mechanical properties of the extrudate. The expansion rates of a typical Korean oil-puffed rice snack (Yukwa) were quantitatively measured using image analysis by Cho et al. (2007).

Despite the progress in image analysis of food, image processing techniques for puffing are not readily available. The prima-facie objective of this study is to characterize the microstructure of puffed rice kernels from their digitized images using image processing algorithms. The mathematical principles involved are formulated in a step-by-step approach to extract key information from the images considered.

Materials and methods

Materials

Sukara and Ziri rice varieties used in this study were obtained from National Bureau of Plant Genetic Resources (NBPGR), Delhi while IR-64 rice (a well-known IRRI variety) was obtained from Central Food Technological Research Institute (CFTRI), Mysore. The apparent amylose content of the rice is determined by the method of Juliano et al. (1985) and the expansion ratio is determined using the method of Segnini et al. (2004). Prior to oven-puffing, parboiling of the milled rice samples were carried out by the method of Feillet and Alary (1975).

Puffing characteristics

The rice was soaked in 2 % solution of NaCl (Murugesan and Bhattacharya 1986) for different time interval (0.5, 1 and 3 hour) before puffing. The salted rice was dried in a hot air oven at 80 °C to bring down the moisture content to 5, 11 and 15 (% d.b.) respectively. These values were taken as lower and upper range for the determination of optimal moisture content necessary for puffing, as observed to be between 10 and 11 % d.b. by Das and Srivastava (1989). Puffing of the rice is done in an open aluminum pan with a grain to sand ratio of 1:10 (Hoke et al. 2005; Das and Srivastava 1989). The pan was heated by a from a liquefied petroleum gas burner. The sand was manually agitated with a stainless steel ladle, with the pan exposed to the heat from the burner. When the sand reached the desired temperature (150, 200 or 250 °C), the gas burner was put off and the rice was poured onto it. The rice was then vigorously agitated for a varying time of 5 s, 10s and 15 s, while the average temperature of the puffed grains was kept around 150 °C. A stop-watch was used to measure the time between the start and the finish of the puffing process. After the completion of puffing, the rice-sand mixture is poured onto a sieve and the puffed product sieved off. The size of the sieve is large enough to drain out the sand almost instantaneously. The puffed rice was collected at one corner of the sieve and stored immediately in air-tight polythene bags.

All experiments were done in triplicate.

Analysis of variance

Analysis of Variance (ANOVA) is a statistically based, objective decision making tool for detecting any differences in the average performance of groups of items tested (Bagci and Aykut 2006). ANOVA helps in formally testing the significance of all main factors and their interactions by comparing the mean square against an estimate of the experimental errors at specific confidence levels. In the present study, a three-way ANOVA with replications was performed (R version 3.1.0, The R Foundation for Statistical Computing). Further, the frequency test (F-test) is utilized to see which design parameters have a significant effect that forms the quality characteristics (Ross 1996). The F-ratio refers to a ratio of the mean square error to the residual error and is typically used to determine the significance of a factor. This analysis was carried out for a level of significance of 5 %, i.e., for a 95 % level of confidence.

For the mean separation, Fisher Least Significant Difference (LSD) method was used which compares all pairs of means with the null hypothesis using the t‐statistic. The main idea of the LSD is to compute the smallest significant difference between two means as if these means had been the only means to be compared and to declare significant any difference larger than the LSD.

Scanning electron microscopy characteristics

SEM studies were conducted using a SEM Quanta 250 of FEI make and D9393 model. The puffed rice samples were carefully removed from air-tight containers and mounted on aluminum stubs with a carbon tape. The images were obtained with an accelerating voltage of 5 kV. Three samples per set of the puffed rice kernels were carefully sectioned in the transverse direction for SEM studies. Images were scanned directly to a computer and stored as image files for subsequent viewing and analysis.

Image processing

In this study, a comprehensive ultrastructural analysis has been attempted to analyze optimal behavior of puffed rice using suitable image processing algorithms. The image analysis toolbox (MATLAB version 7.0.4; Math Works Inc.) is used for image processing and analysis. The image analysis is used to characterize the cellular structure of rice kernels and quantify puffing at different operating conditions. The functionalities were accessed using MATLAB scripts which performed the desired statistical estimations.

Fig. 1
figure 1

SEM micrograph of a rice kernel of Sukara variety after puffing at optimal conditions (250 °C, 15 sec and 11 % moisture content). The arrows indicate the formation of large pores (Fig.1c) from the fine cracks that serve as micro channels (Fig. 1b), caused due to the rapid escape of high pressure steam during puffing

Fig. 2
figure 2

SEM micrograph of a rice kernel of IR-64 variety after puffing at optimal conditions (250 °C, 15 sec and 11 % moisture content). The arrows indicate the formation of large pores (Fig. 2c) from the fine cracks that serve as micro channels (Fig. 1b), caused due to the rapid escape of high pressure steam during puffing

Fig. 3
figure 3

SEM micrograph of a rice kernel of Ziri variety after puffing at optimal conditions (250 °C, 15 sec and 11 % moisture content)

To highlight the cellular structure, the following modified Sobel operators were applied to enhance the edges of the SEM image:

$$ \begin{array}{l}\left[\begin{array}{lll}-1\hfill & -2\hfill & -1\hfill \\ {}0\hfill & 0\hfill & 0\hfill \\ {}1\hfill & 2\hfill & 1\hfill \end{array}\right]\kern0.24em \left[\begin{array}{lll}-1\hfill & 0\hfill & 1\hfill \\ {}-2\hfill & 0\hfill & 2\hfill \\ {}-1\hfill & 0\hfill & 1\hfill \end{array}\right]\hfill \\ {}\left[\begin{array}{lll}1\hfill & 2\hfill & 1\hfill \\ {}0\hfill & 0\hfill & 0\hfill \\ {}-1\hfill & -2\hfill & -1\hfill \end{array}\right]\kern0.24em \left[\begin{array}{lll}1\hfill & 0\hfill & -1\hfill \\ {}2\hfill & 0\hfill & -2\hfill \\ {}1\hfill & 0\hfill & -1\hfill \end{array}\right]\hfill \end{array} $$

These operators are in fact high-pass filters. The upper two detect gray level variations in the vertical direction (horizontal edges) while the lower two detect variations in the horizontal direction (vertical edges). The micrograph image is convoluted with the four operators individually, resulting in four filtered images. Each filtered image is offset by -50 in gray level, then the four images are added up to give a combined image. The edges in all directions are enhanced in the combined image. A global threshold is then applied to give a binary image which shows only the edges. An Otsu thresholding selection procedure has been implemented in the study (Otsu 1979). This procedure tries to find the threshold (T) between two classes, background pixels and foreground pixels, by minimizing the in-between class variance (σ 2 W ) as follows:

$$ {\sigma}_w^2(T)={\omega}_{bg}(T){\sigma}_{bg}^2(T)+{\omega}_{fg}(T){\sigma}_{fg}^2(T) $$

Where ω 2 bg and ω 2 fg are the probabilities, and σ 2 bg and σ 2 fg are the variances of the background and foreground classes respectively. Equivalently, the between-class variance (σ 2 B ) can be maximized as follows:

$$ {\sigma}_B^2(T)={\sigma}^2-\omega {\sigma}_W^2(T) $$

With σ 2 the total variance of the image. Alternatively, we can maximize the discriminant criterion η(T):

$$ \eta (T)=\frac{\sigma_B^2(T)}{\sigma^2}. $$

An ideal segmentation would therefore result in η(T) as 1.

Finally, a run-length histogram is obtained for each segmented binary edge image and in each direction i.e., horizontal, vertical and diagonal. As such, a weighting function is applied to modify the run-length histogram as shown below:

$$ {w}_1(i)= \sin \left(\frac{\pi }{N}i\right);\;N=640,\;1\le i\le 640 $$
(1)

where i is the run-length value. It gives large weights to medium run-lengths, and small weights to very short and very long run-lengths. A weighted-run-length histogram is illustrated later in the text. To avoid bias several other weighting functions are also applied to modify the run-length histograms such as:

$$ {w}_2(i)= \sin \left(\frac{\pi }{N}i\right);\;N=1280,\;1\le i\le 640 $$
(2)

and

$$ {w}_3(i)=1;\kern0.24em 1\le i\le 640 $$
(3)

where i is the run-length value. From the weighted run-length histograms, several statistical features are determined namely, average run-length to indicate average cell size μr, standard deviation of run-lengths to indicate the uniformity of cell sizes σr and variance of run-lengths as an indicator of cell size variation vr. A manual threshold is used to isolate the dark void regions that actually represent the cell sizes. After the dark void regions have been separated from the rest of the image, they are labeled using the function regionprops and the statistical features are re-determined.

The number of voids per unit cross-sectional area is related to the density distribution of the pore spaces through the matrix, while the average void area indicated the average pore space. These parameters serve as indicators of structural properties, and especially to have a quantitative comparison with the expansion ratio of the puffed rice.

Results and discussion

Physicochemical analysis

The factors which influence puffing are the temperature and duration of puffing, initial moisture content of the material to be puffed and starch content of the raw materials (Pardeshi and Chattopadhyay 2010). Although no apparent relationship is found between sand temperature and puffing time with amylose content for Sukara (Table 1) and Ziri (Table 1) varieties, an increase in amylose content is observed for IR-64 (Table 1) variety. This observation is similar to Chinnaswamy and Bhattacharya (1983b) as they also found high puffing yield with an increase in amylose content, although Murugesan and Bhattacharya (1991) found that amylose content had no relationship with puffing expansion. According to Amornsin (2003), amylose easily leaches out of the granule into the liquid surrounding the kernel during starch gelatinization and there is no interference with moisture absorption i.e., there is no direct relationship between moisture content and amylose content although Maisont and Narkrugsa (2009) found that the amylose content correlated negatively with expansion ratio.

Table 1 Results of physic-chemical analysis indicating puffing characteristics for Sukara, Ziri and IR-64 varieties

Statistical analysis

Tables 1 indicates the amylose content and the corresponding expansion ratios for Sukara, Ziri and IR-64 varieties of rice at three different puffing time (5 s, 10s and 15 s) and sand temperatures (150 °C, 200 °C and 250 °C) respectively. Table 2 lists the ANOVA results for Sukara, Ziri and IR-64 varieties based on which the optimum conditions were selected for each variety. Initially the data set was subjected to a three-way ANOVA with replications in order to select the optimal puffing time, sand temperature and moisture content. Then the resulting data set was subjected to LSD test in order to find out the contribution of all the parameters and their corresponding levels tested. All the parameters were found to have significant effect on the expansion ratio which is in agreement with the observations of Bhattacharya and Ali (1985) as well as Bauer and Knorr (2005).

Table 2 Results of the analysis of variance (ANOVA) analysis of optimal puffing conditions for Ziri, Sukara and IR-64 varieties

The optimum puffing conditions for each rice variety are tabulated in Table 3. Based on an ANOVA F-test, the optimum values were found to be 15 s, 250 °C and 11 % (d.b) for puffing time, sand temperature and final moisture content of the puffed rice samples respectively. It is interesting to note that the optimal puffing conditions were found to be same for all the three varieties (Sukara, Ziri and IR-64) considered in this study, although Ziri showed the least expansion after puffing (Table 1). Sand temperatures higher than 250 °C and/or an increase in the puffing time beyond 15 s resulted in a darker texture of the puffed rice because of being burnt. These samples are known to have poor consumer acceptability and hence higher sand temperature and puffing time were not further investigated. The optimal puffing conditions were found to be similar to Chinnaswamy and Bhattacharya (1983a) using ‘Intan’, ‘Asm 44′ and ‘Chianan 8′ varieties and to Das and Srivastava (1989) using ‘kukri’ varieties of parboiled rice respectively.

Table 3 Optimum puffing time, temperature and moisture content values for Sukara, Ziri and IR-64 varieties of rice

Scanning electron microscopic analysis

Scanning electron photomicrographs of the cross-sectional areas of the puffed rice kernels were taken at an accelerating voltage of 5 kV. Figures 1a-c, 2a-c and 3a-c depict the photomicrographs of rice samples (Sukara, IR-64 and Ziri varieties respectively) at various puffing times (5 s, 10s and 15 s respectively) with moisture content of 11 % (d.b) and sand temperature of 250 °C. From Figures 1a-c and 2a-c, it can be observed that the hydro-treated milled rice grains contain fine cracks throughout the endosperm suggesting that they serve as micro channels (indicated with arrows on the figures) for water migration. Partially gelatinized (due to hydro-treatment) compound starch granules (indicated with oval-shape circles in the figures) and a closely-packed protein matrix in the inner endosperm region are also observed. The starch granules show some degree of puffing caused due to the rapid escape of high pressure steam during puffing. The pores (air vacuoles) are more prominent in IR-64 (Fig. 2c) created by the separation of cell walls during expansion which gives it a comparatively higher expansion ratio. It must be noted that the puffing process is usually accompanied by rapid vaporization of moisture due to failure of the starchy endosperm wall or diffusive outflow of vapor through the walls, thinned by the puffing process (Wu and Schwartzberg 1994). The expansion during puffing progressed from the outer endosperm portion towards the center gaining more freedom for expansion which resulted in bigger pores. Similar to the observation of Chandrashekhar and Chattopadhyay (1990), the cells lost their isodiametric shape after expansion and became round or oval. The ultrastructure of Ziri variety at 15 s puffing time (Fig. 3c) look dissimilar, the SEM micrograph indicate much smaller pores, in comparison to Sukara (Fig. 1c) and IR-64 (Fig. 2c) varieties of puffed rice samples. Evidently, expansion ratio for Ziri was much smaller compared to the other two samples. Hoseney et al. (1983) noted that the husk in rice, which corresponds to pericarp in maize, serves as a pressure valve to hold internal steam pressure until the threshold level required to expand the grain was reached. Loosely hooked husk thus fails to maintain vapor pressure before the kernel explodes. On the other hand, a thicker ventral region layer results in the driving force not being enough for expansion (Pordesimo et al. 1990). Both Sukara and IR-64 varieties had optimum thickness in terms of ventral layer resulting in much higher degree of puffing compared to Ziri variety.

Image analysis

The rapid development in image processing has made it possible to analyze complex images with greater detail and accuracy. Although micro-structural changes of rice at different stages of high temperature-short time (HTST) puffing have been studied by Chandrashekhar and Chattopadhyay (1990), image processing of the samples to interpret puffing behavior was, however, missing. A flowchart indicating the sequence of image processing operations implemented in this study can be seen in Fig. 4.

Fig. 4
figure 4

Algorithm flowchart indicating the sequence of image processing operations implemented in this study

As the starting point for a sample image analysis, a micrograph image (Fig. 5a) of puffed Sukara sample (11 % d.b moisture content at 15 s puffing time and 250 °C sand temperature) is considered. It is important to note that the most important structural characteristics of puffed rice are those relating to the geometric properties of the cells.

Fig. 5
figure 5

a Sample SEM micrograph of a rice kernel (Sukara variety) having 5 % moisture content (d.b) at puffing conditions of 15 s and 250 °C. b. Binary image of the edges after using filter and threshold functions respectively, corresponding to the SEM micrograph shown in Fig. 5a. c Histogram generation based on horizontal run length calculation, corresponding to the SEM micrograph shown in Fig. 5a. d Weighted run length histogram generation based on Fig.5d, corresponding to the SEM micrograph shown in Fig. 5a. e Cell voids of puffed rice sample (corresponding to the SEM micrograph shown in Fig. 5a isolated using void region segmentation. Note that the void region segmentation is done using different thresholds for different images (for this image 0.1 is used)

The segmented binary edge image in Fig. 5b, a binary image of the edges after using filter and threshold functions respectively, has only two gray levels: 0 for the void areas and 1 for the walls or edges. The cell sizes correspond to the sizes of the continuous areas of zero gray level in the binary image. The zero gray-level run-length in a direction, which is the number of successive pixels having a 0 gray level, can thus reflect the cell sizes. The run-lengths are computed in horizontal, vertical and the diagonal direction to obtain the best estimate for the cell size. Note that each row of a binary edge image is scanned from left to right and the number of successive pixels having 0 gray levels is counted. Since the image size, considered in this example, is 480 × 640, the run-length values ranged from 1 to 640. Similarly, each column is also scanned from top to bottom to get run-lengths in the vertical direction. The run-lengths in this direction ranged from 1 to 480. The image is also scanned diagonally in the south-east direction. The run-lengths in this direction also ranged from 1 to 480.

The edge enhancement operations and the irregularities in cell structure gave many sharp corners and narrow gaps in the binary edge images, thereby resulting in multiple extremely short run-lengths. On the other hand, because the edges detected are not perfectly continuous, there were also some extremely long run-lengths. These short and long run-lengths are actually artifacts, and are not related to the cell sizes. In order establish a relationship between cell sizes and run-length a weighting function is applied to modify the run-length histogram. The weighting function w 2 (Eq. 2) assumes a closer relationship between longer run-lengths and the cell sizes, while the weighting function w 3 (Eq. 3) gives an equal weight to all the run-lengths and is, therefore, used as a reference.

As observed in Fig. 5a, the cell voids are seen as dark regions while the walls are seen as bright regions. The dark void regions approximately indicate cell sizes. This motivated the second approach to characterize the cell sizes i.e., to isolate and study the dark void regions in the SEM images. It is done using a manual threshold to isolate the dark void regions that actually represent the cell sizes. It is important to note here that all the dark void regions do not represent cell sizes, as some of them are merely noise. As such the dark voids above a minimum number of pixels are considered, keeping in mind the information on the average size of the pores obtained from a rough estimate of the SEM images. The final processed image can be seen in Fig. 5e. The value 0.1 means that the threshold lies on one-tenth of the gray value scale. In this study, the gray value scale ranges from 0 to 255 meaning the threshold lies at 25, thus all the pixels with value > 25 are set to 1.

The run-length and void image area analysis of Sukara and IR-64 samples under optimized conditions of puffing are indicated in Table 4. From these data, it can be inferred that the average cell size and void area are almost same for the two rice varieties, which also explains the similarity in their optimal puffing conditions as mentioned earlier. Ziri showed much lesser void area (not shown in this study) and hence least expansion after puffing. IR-64 has a slightly higher run-length compared to Sukara which can be attributed to its comparatively higher expansion ratio among the three samples considered in this study. Table 5 lists the correlation coefficients between the run-length image features and the directly measured cell characteristics. The average run length correlated well with the cell area, standard deviation and variance, with IR-64 showing a slightly higher correlation as compared to the Sukara. The existence of cell non-uniformity for IR-64 was higher than Sukara which correlated significantly with the cell size characteristics. Among the three weighting functions studied, w1 gave the best correlation which indicated that medium run lengths were most indicative of the cell characteristics. As also observed by Tan et al. (1997), this meant that medium run-length was most indicative as it gave large weights for the cell size characteristics. A satisfactory correlation from the image features extracted from segmented void areas was obtained, with IR-64 being slightly higher than Sukara, which indicated the dark regions in the SEM micrographs to be cell (pore) size. Void area segmentation gave almost a similar correlation for cell area standard deviation and variance for both the varieties of rice than the run length approach. The main reason for this is that the void area segmentation was found to be not affected by cell non-uniformity unlike the run length, in describing cell size variation.

Table 4 Void area analysis from the SEM micrographs of Sukara and IR-64 varieties of rice under optimal conditions of puffing
Table 5 Correlation between image features from run lengths (weighting function 1, 2 and 3) and void areas with cell size characteristics (μa, μr, μs represent average mean, σa,, σr, σs represent standard deviation and va, vr, vs represent variance of cell area, average run length and average void area respectively)

For both Sukara and IR-64 varieties, a linear regression was found between average run length and average void area with the cell size characteristics with R2 values of 0.91 and 0.95 respectively. For the other parameters, a nonlinear regression was fitted with an R2 value closer to 0.90 indicating the SEM micrographs can indeed be effectively predicted by using the image features extracted in this study.

The m-files needed for implementation of the image processing algorithm in MATLAB can be made available upon request.

Conclusion

Physicochemical characteristics of three varieties of parboiled milled rice (Sukara, Ziri, IR-64), commonly used for puffing, under variable conditions of moisture content, puffing time and sand temperature were studied. A comparatively high puffing yield with an increase in amylose content for IR-64 was observed. Comprehensive digital image analysis was performed to ascertain and compare the expansion ratios obtained from the experiments, and interpret the cellular structure of the puffed rice kernels. The features obtained from SEM measurements, using image processing algorithms, were found to be highly descriptive and correlated to various stages of puffing. It is hoped that image analysis of puffed rice kernels would not only help in automating the assessment for process monitoring and quality control, but would also enhance the objectivity of the measured results from the puffing process.