Design and Develop a Near-Infrared System for Intact Pineapples
Fan Wei Hong
1, b), Zeanne Gan
2, c)and Kim Seng Chia
1, a)1Faculty of Electrical and Electronic Engineering, Universiti Tun Hussein Onn Malaysia, Parit Raja, Batu Pahat, Malaysia
2Rida Fruits Sdn Bhd, Kawasan Perindustrian Sri Gading, Batu Pahat, Johor, Malaysia
a)Corresponding author: [email protected]
Abstract. The quality of pineapple is one of the most concern things in an industry. Currently, the method of using the digital refractometer to measure the quality of pineapples is time-consuming and destructive. Another method of measuring the quality of pineapples is the hyperspectral imaging (HSI) method, which uses near infrared wavelength that is non-destructive to the fruit. However, HSI is expensive; consuming long data acquisition time and high dimensional data. This project aims to design and develop a non-invasive near infrared system with a multispectral imaging method by using a webcam and near infrared LEDs with the wavelengths between 850 and 950nm on an intact pineapple. After calibrating the webcam, the image taken for pineapple was clear and bright. By extracting the pixel values of the image taken, we were able to know the light intensity value of red (R), green (G), and blue (B) at that particular point in the image, allowing for comparison to be made between them. After conducting experiments with three same species of pineapples over a period of four days, the results obtained from the system designed indicated a high potential in determining the internal quality of pineapple. As the internal quality of the pineapples will remain almost the same, the light intensity value of certain points inside the image taken will also remain similar throughout the four days even the skin color of pineapples changed. Due to the consistent results of the experiment, it can be concluded that the proposed system is promising to be applied to predict the internal quality of pineapples non-invasively.
Keywords— pineapple, hyperspectral imaging method (HSI), multispectral imaging method
INTRODUCTION
Pineapple is a popular fruit in tropical countries and is well-received by the society. It contains vitamin C, vitamin A, and fiber, and has many health benefits. In Malaysia, pineapples play a vital role in bringing up the country's economics due to its high market value. Pineapples can be transformed into various kinds of products such as pineapple juice, canned pineapple, fresh pineapple etc. which can be exported to other countries or sold within Malaysia. Before a bunch of fresh pineapples can be exported or processed, some of the pineapples within that bunch will be taken as a test sample to conduct a quality measurement to predict its sweetness. However, the conventional method using a refractometer is time-consuming and destructive to the fruit.
Near infrared spectroscopy (NIRS) is using the near infrared (NIR) region, a part of electromagnetic radiation, which will be partially absorbed by molecular bond consisted hydrogen atom e.g. C-H and O-H to provide the
molecular overtone and vibrations [1]. A typical NIRS set-up is using a light source, such as light emitting diode (LED), halogen lamp or tungsten lamp. Illuminating the light towards sample and the transmitted or reflected light will be measured and collected using a spectrometer. The collected near infrared spectra consists the specific information about the composition of examined samples. Using machine learning technology, the hidden information can be extracted and further investigated. As a rapid and non-invasive technique in qualitative and quantitative analysis, NIRS had been widely applied in various fields including agriculture, medical, textiles and so on [2]–[7].
Hyperspectral imaging method (HSI) which using the NIR wavelength region has been found to be a non- destructive method in accessing the internal quality of fruits. The image produced contains detailed information in each pixel corresponding to the signatures of the sample substances, which can be used in determining the internal quality of fruit [8]. Various researches had been carried out using the HSI, for example, differentiating the geographical origin of Chinese wolfberries [9], determining the total soluble content, titratable acidity, and maturity index of limes [10], detecting damaged jujube [11] and blueberries [12], determining the ripeness of two varieties of nectarines [13], detecting skin defects of peaches [8], and predicting physic-chemical and sensory characteristics of table grapes [14].
Alternatively, a simplified version of the HSI can be used to predict the quality of fruit non-destructively by choosing several wavelengths inside the HSI. This method is called the multispectral imaging method. The major advantages of multispectral imaging compared with HSI are lower cost and faster data acquisition, which makes it more suitable for industrial application [15]. Past studies have found that the multispectral imaging method had the potential to measure internal quality of apple non-destructively [16], to evaluate the sensory parameter of grapes [17], and to determine the internal quality of pineapples [18].
The quality of pineapple is most certainly a concern to the industry, hence it is important to find ways to measure its quality without compromising the fruit and productivity. Currently, the way to measure the quality of pineapples in an industry is time-consuming and destructive using a refractometer. On the other hand, the HSI method is expensive to acquire and process high dimensional data that making it unsuitable to process a large amount of sample at a fast processing speed. Thus, this study aims to investigate the potential of the proposed near-infrared system that based on the multispectral imaging method in determining the quality of pineapple. A non-invasive near-infrared system was developed by using a camera and near-infrared LEDs to capture images of intact pineapples, and the performance and stability of the system were then evaluated and discussed in the following sections.
METHODOLOGY
In designing a non-invasive system to measure the quality of intact pineapples, this study focused only on 4 different near-infrared wavelengths, which were between 850 and 950nm. Each wavelength consisted of three LEDs to provide sufficient light intensity, and worked with a webcam to capture the photo of a pineapple. The four wavelengths with 12 LEDs had minimized the complexity of the designed circuit and supplied enough light intensity to obtain a clear and bright photo. Due to the distance between the sample and webcam, the designed hardware is only applicable for intact pineapple. The dimensions used to build the hardware were based on the average size of pineapples. Experiments were carried out over four days by using three different pineapples to investigate the performance and stability of the proposed system.
Materials
In order to complete the near-infrared system, some design tools were used such as the Proteus 8 Professional version 8.0, SOLIDWORKDS 2016, and MATLAB R2016a. Proteus was used to design the circuit and build the PCB board to connect all the components, as well as also run the simulation to ensure that the connection between the LEDs and switches were correct. SOLIDWORKS was used to design the dimensions of the frame. After the photo of pineapple was taken, MATLAB was used to conduct further analyses.
Near Infrared Light Control
Four toggle switches were used to control the 'ON' and 'OFF' states of each wavelengths independently. Each wavelength consisted of three LEDs that were controlled by one toggle switch. When the first toggle switch was switched on, the first wavelength with three LEDs lit up. The webcam was used to capture the photo of the pineapple under the first wavelength. After taking the photo under the first wavelength, the first three LEDs were switched off, and the LEDs for the second wavelength would be switched on and lighted up for the next data acquisition. The process was repeated until the images under the four different wavelengths were taken.
In order to ensure that the pineapple would be located under the field of view (FOV) of the webcam, simple calculations were carried out to find out the distance between the sample and the webcam. The distance calculated followed the average size of pineapples, which was 30 cm. The distance was set to 45cm to make sure that pineapples of different sizes would be covered under the field of view of the webcam.
Calibration
A clear and bright photo taken can be referred as a high-quality image. In order to ensure that the webcam was able to capture a high-quality image, some important parts of the webcam were looked into, like the focus length and the parameters inside the webcam. By tuning the lens of the webcam in clockwise and anticlockwise directions, the sharpness of the image taken would change accordingly. A simple experiment was carried out to find out the optimum focus length of the webcam which was able to provide the sharpest and clearest image.
In order to ensure that the image taken is bright and clear, a webcam calibration was done. During the calibration, the focus length of the webcam lens was tuned to ensure that the image taken was clear. Then, the filter inside the lens was removed to prevent the filtration of the near-infrared light. This was necessary as the filtration of near-infrared light would cause the webcam to be unable to capture the image of the pineapple under a black room condition. There were six different parameters that needed to be tuned correctly, of which were brightness, contrast, hue, saturation, resolution, and gamma. Different wavelengths required different combinations of parameters to provide a high- resolution image. In order to find out the best combination of these six parameters, 15 different combinations for each wavelength were tested, and 15 images were taken. From those 15 images taken, the best image which is bright and clear was identified, and the combination for that particular wavelength would be used.
After the webcam calibration, some experiments were carried out to investigate the performance of the system designed. From the results obtained, the light intensity at certain points of the pineapple showed positive results. It is because the light intensity value remained similar throughout the four days. In fact, the internal quality of the pineapples would not change dramatically within four days. Thus, the proposed system is expected to acquire a similar light intensity values throughout the four days.
Data Acquisition
Three same species of pineapples which were named "Pineapple A", "Pineapple B", and "Pineapple C" were used to carry out an experiment throughout four days to investigate the relationship between the freshness of the pineapples and the light intensity inside certain pixels of the image taken. Each pineapple was divided into position 1 and position 2 to make sure that the image taken will cover the whole pineapple. Each pineapple was then captured under three different wavelengths, which are 850nm, 870nm and 950nm, in the two different positions. As such, each pineapple would provide six images, with a total of 18 images per day for the three pineapples. After capturing the images for the three pineapples for day 1, all three pineapples were then placed under room temperature for 24 hours.
The task was repeated on day 2, day 3, and day 4. After four days, 72 images were obtained.
System Evaluation
After the system was developed, its performance was evaluated based on the quality of photo taken, as well as its stability. In order to get a clear and bright image under a black room condition, webcam calibrations were done by tuning the focus length of the webcam to ensure that the image taken was clear and focus on the sample.
In order to test the stability of the system designed, an experiment was carried out for four days using three different pineapples. Since that the internal quality of pineapple will not change after it is harvested, the light intensity corresponding to the internal quality of pineapple should remain constant along the four days experiments in term of stability of designed system [19]. From all of the images taken, the MATLAB software was used to extract the pixel information at certain points of the image taken. Then, comparisons were made from the pixel values obtained to investigate the stability of the near-infrared system designed.
RESULTS AND DISCUSSION Webcam Calibration
Table 1 shows the 15 different combinations of parameters under wavelength 850nm, of which the best combination is combination 12. There are six parameters, which are brightness (Br), contrast (C), hue (H), saturation (S), sharpness (s), and gamma (γ) inside the webcam. For each different wavelength, the combination of these six parameters would be adjusted to provide a clear and bright image. In order to find out the specific combination for a particular wavelength, 15 different combinations of these six parameters were tried for wavelengths 850nm, 860nm, 870nm, and 950nm. Since the hue, sharpness, and saturation were not going to affect the quality of the image, they were set to a constant value, whereby the hue value equals to 0, sharpness equals to 32, and saturation equals to 36.
The range of values for brightness was set from -127 to 128, contrast was set from 0-30, and gamma was from 100 until 202. The experiment was then continued with three different wavelengths to find out the best combination of that particular wavelength.
TABLE 1. 15 combinations of parameters for wavelength 850nm (Br=Brightness, C=Contrast, γ =Gamma).
Data Acquisition
After four days, 72 images were acquired for three pineapples under three different wavelengths. The surface of three pineapples was marked clearly to distinguish two different positions of particular pineapples. The location of pineapple placed inside the hardware was signed and recorded to ensure three pineapples would place in the same location along the four days experiment to increase the consistency and accuracy [20]. Since our experiment was carried out along 4 days, the leaf of the pineapple was starting to wilt that caused the increase of black spots on the pineapples. Table 2 shows the image taken for day 4. The black spot on the pineapple was due to the wilt of leaf.
Combination
1 2 3 4 5
B= -127, C=0, G=100
B= -96, C=3, G=100
B= -62, C=8, G=100
B= -37, C=10, G=100
B= -16, C=17, G=100
6 7 8 9 10
B= -6, C=15, G=100
B= 0, C=15, G=100
B= 4, C=16, G=110
B= 10, C=16, G=125
B=15, C=14, G=140
11 12 13 14 15
B=16, C=17, G=160
B=24, C=13, G=181
B=53, C=15, G=193
B=93, C=25, G=202
B=128, C=30, G=202
TABLE 2. The acquired images with different wavelengths and position.
Wavelength 850nm 870nm 950nm
Pineapple A Position 1
Position 2
Pineapple B Position 1
Position 2
Pineapple C Position 1
Position 2
Effect of Different Positions on Pineapples
The data collected for four days were then used to investigate the relationship between the freshness of pineapples and the near-infrared light. As the image taken are RGB images, a single pixel inside the image are built up by three different colours, namely red (R), green (G), and blue (B). By using MATLAB, the value of RGB in each pixel of a single image taken can be known. In this experiment, the value of G had been chosen to make comparisons. This is because the value of both R and B almost reaches the maximum light intensity value at 255, making it hard to compare the differences between them. Based on the research in [21], by dividing the pineapple in to top, middle and bottom section along its longitudinal, the physicomechanical properties of pineapple can be studied. In order to investigate the performance and stability for each wavelength in three different pineapples, three points in a single image of each pineapple were selected, i.e. the top, middle, and bottom of the images; and then the G value was extracted to make comparisons.
After extracting the pixel value of G for the top, middle, and bottom part of Pineapples A, B, and C, the result was depicted into several graphs to make the comparison between the freshness of pineapple and the light intensity value.
Figure 1 shows the results obtained for position 1 and 2 of pineapple B throughout four days. Each position contains three parts which are top, middle, and bottom. The y-axis represents the light intensity value, and x-axis represents the wavelength used.
Since the sweetness of the pineapple will remain the same after harvesting process [19], the results obtained from Figure 1 reveals a positive sign in determining the relationship between the sweetness of the pineapple and the near- infrared wavelength. The light intensity value of 850nm, 870nm, and 950nm remained almost the identical values throughout the four days experiment in three different parts of position 1 and 2 for pineapple B corresponding to the fact as mentioned in [19]. Pineapple A and Pineapple C obtained almost the same pattern graphs as shown in pineapple B (Figure 1). As the light intensity values at the same positions remained constant throughout four days even though the skin changed due to a nature physiochemical response, this observation corresponded with the sweetness of pineapple. In other words, this indicated that the designed system is stable.
As aforementioned in [21], in studying the physicomechanical properties of pineapple, E. V. Miller concluded that the sweetness level of pineapple for top, middle and bottom sections can be arranged in a sequence where the bottom section is the sweetest, followed by middle section and finally top section. Based on the results in Figure 1, the light intensity value under wavelength 950nm revealed the statement corresponding to E. V. Miller. The light intensity of wavelength 950nm in bottom section has the lowest value in range around 80 to 100 W/𝑚2, followed by the middle section with intensity range 140 to 160 W/𝑚2, and lastly the intensity values range of top section with 200 to 250 W/𝑚2. The result indicated that the potential of designed system in predicting the sweetness of intact pineapple. Thus, based on the result obtained, the designed system is reliable.
A Single Pulp of Pineapple
In Effect of Different Positions on Pineapples section, the designed system performance was investigated by extracting the pixel values of three different parts in image taken for three pineapples including the top, middle, and bottom to make the comparison. The result obtained is convincing and able to provide sufficient information to indicate that the performance of the system designed is stable and reliable. To further investigate the potential of designed system, another experiment was carried out to support our results by only extracting the pixel value of a single pulp of pineapple. Since that some of region in a single pulp of pineapple is covered by the leaf of itself, to avoid the interference in extracting pixel value, three different points of pixel values were extracted with sheltering the leaf which covered the pulp.
Figure 2 shows the results obtained from the single pulp, for position 1 and 2 of pineapple C throughout four days.
The y-axis represented the light intensity value and x-axis is the points in a single pulp. Figure 2 (a), (b), and (c) show the change of acquired light intensity from the three different points of Pineapple C in the position 1 (the same pulp), while Figure 2 (d), (e), and (f) illustrate that in the position 2 for the three different wavelengths respectively. Due to the sensitivity of near infrared light, different wavelengths will provide different light intensity values even in the same point. However, the result indicated that the light intensity values at three different points in the single pulp remained similar throughout four days experiments for 3 different wavelengths. It revealed that the designed system have the potential in determining the internal quality of fruit.
FIGURE 2. The light intensity versus the points on one pulp of a pineapple in different days with different wavelengths: (a) position 1(850nm); (b) position 1(870nm); (c) position 1(950nm); (d) position 2(850nm); (e) position 2(870nm); (f) position
2(950nm).
Owing to the properties of pineapple where the sweetness will remain the same after it was harvested, the light intensity values acquired using the designed system should also remain the same. In Effect of Different Positions on Pineapples section, the results indicated that the light intensity value in different positions of pineapple remained almost the same throughout 4 days experiment. Then, in A Single Pulp of Pineapple section, the result obtained by extracting the light intensity values from a single pulp of pineapple showed the similar result corresponding to previous section. The light intensity values of NIR wavelengths for three different points in a single pulp of pineapple are remained the similar values i.e. Figure 2 (e) the light intensity values of 870nm along 4 days experiment, for the point 1 was in the range of 170 to 175 W/𝑚2, the point 2 was the range of 185 to 190 W/𝑚2 and the point 3 was in the range of 190 to 195 W/𝑚2. After conducting two different analyses in both section parameters, results suggest that the proposed system is feasible in predicting the internal quality of pineapples using wavelength 850nm, 870nm, and 950nm.
CONCLUSION
Results indicate that the designed system was able to give a positive sign in relating the sweetness of pineapple and the near-infrared wavelength. The internal quality of pineapple will remain the same after it is harvested. Based on the result obtained using the designed system, the acquired light intensity remained similar along 4 days and indicated that the near-infrared wavelength can be used to determine the sweetness of pineapple non-destructively.
According to the conventional HSI, the system setup is expensive and data processing time is slow due to the high dimensional of image taken [15]. However, the proposed system had revealed that the potential of determining the internal quality of fruit with only using 4 different NIR wavelengths with a low-cost webcam. Owing to the number of wavelengths used is limited, a short data processing time is promised to be achieved using the proposed system. It is because the image taken is not in high-dimensional pixel. Thus, it is going to make the processing part easier in extracting the desired information from a single pixel in image taken. For future work, the research can be continued by increasing the quantity of near-infrared wavelength used to increase the accuracy and reliability of designed system. Instead of using toggle switch to control the near-infrared light, microcontroller can be used to minimise the image capturing time.
A multispectral near-infrared system was successfully built by using a webcam and four different near-infrared wavelengths at 850nm, 860nm, 870nm, and 950nm. The proposed webcam was able to capture a high-quality image after the proposed calibration process. Three same species of pineapples were used to carry out the four-day experiment, whereby 72 images were obtained. By extracting the pixel value from the image taken, comparisons were made to investigate the relationship between the sweetness of the pineapples and the light intensity of near-infrared wavelengths. The light intensity values of the three different parts and the single pulp of a pineapple remained similar throughout the four days. The acquired light intensity was similar for four days is in-line with the physiochemical change of pineapples i.e. the internal quality of a pineapple would remain the same after it is being harvested. Thus, the proposed system is promising to be further developed to predict the internal quality of pineapples.
ACKNOWLEDGMENTS
Authors would like to acknowledge Universiti Tun Hussein Onn Malaysia (UTHM) for providing financial support via research grant GPPS H312. Authors would like to acknowledge Faculty of Electrical and Electronic Engineering, Universiti Tun Hussein Onn Malaysia (UTHM) and Rida Fruits Sdn Bhd for providing facilities and technical supports.
REFERENCES
[1] V. E. Dabkiewicz, S. de Mello Pereira Abrantes, and R. J. Cassella, “Development of a non-destructive method for determining protein nitrogen in a yellow fever vaccine by near infrared spectroscopy and multivariate calibration,” Spectrochim. Acta - Part A Mol. Biomol. Spectrosc., vol. 201, no. 2017, pp. 170–177, 2018.
[2] C. Li, H. Guo, B. Zong, P. He, F. Fan, and S. Gong, “Rapid and non-destructive discrimination of special-grade flat green tea using Near-infrared spectroscopy,” Spectrochim. Acta - Part A Mol. Biomol. Spectrosc., vol. 206, pp. 254–262, 2019.
[3] J. C. Hashimoto et al., “Quality Control of Commercial Cocoa Beans (Theobroma cacao L.) by Near-infrared Spectroscopy,” Food Anal. Methods, vol. 11, no. 5, pp. 1510–1517, 2018.
[4] F. Caro, M. Constantino, I. Martins, and A. Weintraub, “PLS, iPLS, GA-PLS models for soluble solids content, pH and acidity determination in intact dovyalis fruit using near-infrared spectroscopy,” For. Sci., vol. 49, no. 5, pp. 738–751, 2018.
[5] T. Kishino et al., “Predictive evaluation of pharmaceutical properties of ulinastatin-containing vaginal suppositories as a hospital preparation by near-infrared spectroscopy,” Chem. Pharm. Bull., vol. 66, no. 6, pp.
589–595, 2018.
[6] P. Kadamati et al., “Near-infrared spectroscopy muscle oximetry of patients with postural orthostatic tachycardia syndrome,” J. Innov. Opt. Health Sci., vol. 11, no. 05, p. 1850026, 2018.
[7] Z. Li et al., “Identification of oil, sugar and crude fiber during tobacco (Nicotiana tabacum L.) seed development based on near infrared spectroscopy,” Biomass and Bioenergy, vol. 111, no. August 2017, pp. 39–
45, 2018.
[8] J. Li et al., “Multispectral detection of skin defects of bi-colored peaches based on vis-NIR hyperspectral imaging,” Postharvest Biol. Technol., vol. 112, pp. 121–133, 2016.
[9] W. Yin, C. Zhang, H. Zhu, Y. Zhao, and Y. He, “Application of near-infrared hyperspectral imaging to discriminate different geographical origins of Chinese wolfberries,” PLoS One, vol. 12, no. 7, pp. 1–14, 2017.
[10] S. Teerachaichayut and H. T. Ho, “Non-destructive prediction of total soluble solids, titratable acidity and maturity index of limes by near infrared hyperspectral imaging,” Postharvest Biol. Technol., vol. 133, no. July, pp. 20–25, 2017.
[11] L. Wu, J. He, G. Liu, S. Wang, and X. He, “Detection of common defects on jujube using Vis-NIR and NIR hyperspectral imaging,” Postharvest Biol. Technol., vol. 112, pp. 134–142, 2016.
[12] S. Fan, C. Li, W. Huang, and L. Chen, “Detection of blueberry internal bruising over time using NIR hyperspectral reflectance imaging with optimum wavelengths,” Postharvest Biol. Technol., vol. 134, no.
August, pp. 55–66, 2017.
[13] S. Munera, J. M. Amigo, J. Blasco, S. Cubero, P. Talens, and N. Aleixos, “Ripeness monitoring of two cultivars of nectarine using VIS-NIR hyperspectral reflectance imaging,” J. Food Eng., vol. 214, pp. 29–39, 2017.
[14] A. Baiano, C. Terracone, G. Peri, and R. Romaniello, “Application of hyperspectral imaging for prediction of physico-chemical and sensory characteristics of table grapes,” Comput. Electron. Agric., vol. 87, pp. 142–151, 2012.
[15] C. Tang, H. He, E. Li, and H. Li, “Multispectral imaging for predicting sugar content of ‘ Fuji ’ apples,” Opt.
Laser Technol., vol. 106, pp. 280–285, 2018.
[16] M. Liu, D. Wumao, and H. Lin, “The study of non-destructive measurement apple ’ s firmness and soluble solid content using multispectral imaging,” Int. Conf. Comput. Comput. Technol. Agric. Springer US, vol. 294, pp.
1077–1086, 2008.
[17] R. Ferrer-Gallego, J. M. Hernández-Hierro, J. C. Rivas-Gonzalo, and M. T. Escribano-Bailón, “Evaluation of sensory parameters of grapes using near infrared spectroscopy,” J. Food Eng., vol. 118, no. 3, pp. 333–339, 2013.
[18] M. Nur and H. Jam, “A Five Band Near-Infrared Portable Sensor in Nondestructively Predicting the Internal Quality of Pineapples,” no. March, pp. 10–12, 2017.
[19] K. S. Chia, H. Abdul Rahim, and R. Abdul Rahim, “Prediction of soluble solids content of pineapple via non- invasive low cost visible and shortwave near infrared spectroscopy and artificial neural network,” Biosyst. Eng., vol. 113, no. 2, pp. 158–165, 2012.
[20] J. Sun, R. Künnemeyer, A. Mcglone, and P. Rowe, “Postharvest Biology and Technology Multispectral scattering imaging and NIR interactance for apple fi rmness predictions,” Postharvest Biol. Technol., vol. 119, pp. 58–68, 2016.
[21] A. Society, P. Biologists, and P. Physiology, “Distribution of Total Soluble Solids , Ascorbic Acid , Total Acid , and Bromelin Activity in the Fruit of the Natal Pineapple ( Ananas comosus L . Merr .) Author ( s ): Erston V . Miller and Gladys Downey Hall Published by : American Society of Plant Biologists ( ASPB ) Stable URL : http://www.jstor.org/stable/4258685 REFERENCES Linked references are available on JSTOR for this article : You may need to log in to JSTOR to access the linked references .,” vol. 28, no. 3, pp. 532–534, 2016.