Near-Infrared Transmittance Spectral Imaging for Nondestructive Measurement of Internal Disorder in Korean Ginseng

The grading of ginseng (Panax ginseng) including the evaluation of internal quality attributes is essential in the ginseng industry for quality control. Assessment for inner whitening, a major internal disorder, must be conducted when identifying high quality ginseng. Conventional methods for detecting inner whitening in ginseng root samples use manual inspection, which is time-consuming and inaccurate. This study develops an internal quality measurement technique using near-infrared transmittance spectral imaging to evaluate inner whitening in ginseng samples. Principle component analysis (PCA) was used on ginseng hypercube data to evaluate the developed technique. The transmittance spectra and spectral images of ginseng samples exhibiting inner whitening showed weak intensity characteristics compared to normal ginseng in the region of 900–1050 nm and 1150–1400 nm respectively, owing to the presence of whitish internal tissues that have higher optical density. On the basis of the multivariate analysis method, even a simple waveband ratio image has the great potential to quickly detect inner whitening in ginseng samples, since these ratio images show a significant difference between whitened and non-whitened regions. Therefore, it is possible to develop an efficient and rapid spectral imaging system for the real-time detection of inner whitening in ginseng using minimal spectral wavebands. This novel strategy for the rapid, cost-effective, non-destructive detection of ginseng’s inner quality can be a key component for the automation of ginseng grading.


Introduction
Ginseng (Panax ginseng Meyer) is grown in Korea, northeastern China, and eastern Siberia and is hugely popular for both culinary and medicinal use [1]. Korean ginseng is colloquially referred to as "the king of the herbs" and has been used as a popular herbal medicine for thousands of years [2,3]. Ginseng is commonly used for the treatment of health issues, including ulcers, stress, nervousness, vomiting, tumors, nausea, internal degeneration, inflammation, aging, fatigue, diabetes, and depression [4,5]. Ginseng roots contain a number of active ingredients, including ginsenosides, polysaccharides, phytosterols, peptides, polyacetylenes, fatty acids, and polyacetylenic alcohols [5,6]

Ginseng Samples
In this work, six-year old ginseng samples were used to study whitening detection using near-infrared transmittance spectral imaging. Ginseng samples of both normal and abnormal materials were obtained from Korea Ginseng Corporation (KGC) 71, Beotkkot-gil, Daedeok-gu, Daejeon, Republic of Korea. The samples of both normal and abnormal materials were investigated and characterized by skilled inspectors from the KGC and included in the experiment. The normal ginseng samples had no whitening in the central region, whereas abnormal samples had distinctive inner whitening. The characterized ginsengs were then analyzed using transmittance spectral imaging measurement. For spectral imaging, 10 normal samples from grade 1 and 10 abnormal samples from grade 3 of different shapes and sizes were used. The shape of the ginseng is more or less cylindrical but sometime protrudes from the sample surface and the thickness of measured ginsengs ranges from 15 to 20 mm.
Inner whitening was externally undetectable, with both normal and abnormal ginseng samples displaying identical characteristics. The internal profile of abnormal and normal ginseng is shown in Figure 1.
Inner whitening was externally undetectable, with both normal and abnormal ginseng samples displaying identical characteristics. The internal profile of abnormal and normal ginseng is shown in Figure 1.

Near-Infrared Transmittance Spectral Imaging
Spectral image measurements of ginseng samples were carried out using a line-scan nearinfrared hyperspectral imaging system, operated in transmittance mode ( Figure 2). The system comprised a line-scan near-infrared hyperspectral imaging camera (HSI; Pika NIR-320, Resonon Inc., Bozeman, MT, USA), C-mount lens with a focal length of 25 mm f/1.4, and a moving stage. The camera was operated under the following conditions: spectral wavelength range, 900-1700 nm (with 168 spectral bands, 4.9 nm spectral resolution, and 320 × 500 spatial channels), and max frame rate (fps) of 520 Hz. Normally, this system also includes four halogen light sources to illuminate the test samples for reflectance imaging; as this study used transmittance imaging, this work modified the system by replacing the reflectance light source with a transmittance light source. Ginseng samples were illuminated from beneath by a 100 W halogen lamp, placed directly below the sample. To generate uniform lightning conditions for sample illumination, a cylindrical lens was fixed in front of the light source. A computer programmed motorized sample stage was integrated to move the samples towards the camera field of view (FOV). The camera was operated inside a dark chamber to avoid environmental light.

Near-Infrared Transmittance Spectral Imaging
Spectral image measurements of ginseng samples were carried out using a line-scan near-infrared hyperspectral imaging system, operated in transmittance mode ( Figure 2). The system comprised a line-scan near-infrared hyperspectral imaging camera (HSI; Pika NIR-320, Resonon Inc., Bozeman, MT, USA), C-mount lens with a focal length of 25 mm f/1.4, and a moving stage. The camera was operated under the following conditions: spectral wavelength range, 900-1700 nm (with 168 spectral bands, 4.9 nm spectral resolution, and 320 × 500 spatial channels), and max frame rate (fps) of 520 Hz. Normally, this system also includes four halogen light sources to illuminate the test samples for reflectance imaging; as this study used transmittance imaging, this work modified the system by replacing the reflectance light source with a transmittance light source. Ginseng samples were illuminated from beneath by a 100 W halogen lamp, placed directly below the sample. To generate uniform lightning conditions for sample illumination, a cylindrical lens was fixed in front of the light source. A computer programmed motorized sample stage was integrated to move the samples towards the camera field of view (FOV). The camera was operated inside a dark chamber to avoid environmental light.

Spectral Image Acquisition
Before HSI images were acquired, the system parameters were adjusted: scanning speed was 2 cm/s, with a total scan of 500 scans/sample. Ginseng samples were placed on the sample holder plate, and a moving stage scanned samples line by line using the HSI system, with a DC motor moving the translation stage towards the camera. The HSI camera was mounted over the stage and began to acquire images as the ginseng sample entered the camera's FOV. The samples were scanned in the wavelength range of 900-1700 nm. The acquired hyperspectral images were saved in a three-dimensional format containing two spatial dimensions (x and y) and a spectral dimension (λ). Total time of 15 s was required to measure a single ginseng sample with the aforementioned system settings.

Spectral Image Acquisition
Before HSI images were acquired, the system parameters were adjusted: scanning speed was 2 cm/s, with a total scan of 500 scans/sample. Ginseng samples were placed on the sample holder plate, and a moving stage scanned samples line by line using the HSI system, with a DC motor moving the translation stage towards the camera. The HSI camera was mounted over the stage and began to acquire images as the ginseng sample entered the camera's FOV. The samples were scanned in the wavelength range of 900-1700 nm. The acquired hyperspectral images were saved in a threedimensional format containing two spatial dimensions (x and y) and a spectral dimension (λ). Total time of 15 s was required to measure a single ginseng sample with the aforementioned system settings.

Calibraiton of Spectral Images
After hyperspectral image acquisition, a calibration step was performed on raw images to reduce the dark current noise and non-uniform illumination effect from the acquired images. For this purpose, a white and a dark reference image were taken during the measurement. The dark image (0% transmittance) was obtained by turning off the light source and covering the lens, and a bright image (100% transmittance) was obtained with a glass table. Thus, the normalized transmittance value was calculated by applying the following equation: where ( ) is the raw transmittance image of ginseng, ( ) is the dark image, ( ) is the white image, and is the corrected image. After image calibration, an image segmentation method was applied to isolate the background of hyperspectral images from the ginseng samples. For this purpose, a binary mask was created using a threshold value, to allow differentiation of ginseng samples from the background. Later, the background removed hyperspectral images were used for analysis.

Calibraiton of Spectral Images
After hyperspectral image acquisition, a calibration step was performed on raw images to reduce the dark current noise and non-uniform illumination effect from the acquired images. For this purpose, a white and a dark reference image were taken during the measurement. The dark image (0% transmittance) was obtained by turning off the light source and covering the lens, and a bright image (100% transmittance) was obtained with a glass table. Thus, the normalized transmittance value was calculated by applying the following equation: where After image calibration, an image segmentation method was applied to isolate the background of hyperspectral images from the ginseng samples. For this purpose, a binary mask was created using a threshold value, to allow differentiation of ginseng samples from the background. Later, the background removed hyperspectral images were used for analysis.

Preprocessing of Spectral Images
Preprocessing is an important step in the analysis of hyperspectral images and can be used to remove unwanted variation in the data, while retaining as much useful information as possible. Three well-known preprocessing methods (mean, max, and range normalization) were tested for preprocessing the ginseng hyperspectral image data. Normalization involves the fitting of data within unity by correcting the mean, maximum, and range values, so all data values take on a value between Sensors 2020, 20, 273 5 of 11 0 and 1 [15,16]. After testing all three preprocessing methods, range normalization was found to be the most appropriate method for removing noise from the hyperspectral image data.

PCA-Based Optimal Wavelength Selection for Detecting Whitening
Principal component analysis (PCA) was used on the preprocessed images ( Figure 3). PCA is an analytical method, used for high dimensionality data decomposition, feature selection, and feature visualization in hyperspectral data. It transforms high dimensional data into lower dimension data (also called principle components, PCs), by linear transformation. Graphics displaying PC scores visualize the features of multivariate data into smaller dimensions and illustrate differences and similarities among the samples. Factor loading is used to quantify how much each original variable contributes to a given PC [17].
To apply PCA to 3D hyperspectral ginseng matrices, it is necessary to unfold the hypercube into a 2D matrix, in which each column represents all the pixels from a given spectral band in the original image cube, and each row represents the spectrum of a single pixel [18,19]. Furthermore, the PCA was done by applying the following equation: where X C is the unfolded 2D matrix, T ij is the score matrix, P T ij is the loading matrix, and E ij is the error matrix.
The calculated scores matrix was re-folded, displaying the results in a score image that illustrates the distribution of the components in ginseng samples. The loadings obtained from the PCA were used to select optimal wavebands to detect inner whitening in ginseng. These optimal wavelengths, identified from the PC loadings, can be used for multispectral detection of whitening in abnormal ginseng samples. PCA and image processing techniques were carried out in MATLAB (2016a, MathWorks Inc., Natick, MA, USA).

Preprocessing of Spectral Images
Preprocessing is an important step in the analysis of hyperspectral images and can be used to remove unwanted variation in the data, while retaining as much useful information as possible. Three well-known preprocessing methods (mean, max, and range normalization) were tested for preprocessing the ginseng hyperspectral image data. Normalization involves the fitting of data within unity by correcting the mean, maximum, and range values, so all data values take on a value between 0 and 1 [15,16]. After testing all three preprocessing methods, range normalization was found to be the most appropriate method for removing noise from the hyperspectral image data.

PCA-Based Optimal Wavelength Selection for Detecting Whitening
Principal component analysis (PCA) was used on the preprocessed images ( Figure 3). PCA is an analytical method, used for high dimensionality data decomposition, feature selection, and feature visualization in hyperspectral data. It transforms high dimensional data into lower dimension data (also called principle components, PCs), by linear transformation. Graphics displaying PC scores visualize the features of multivariate data into smaller dimensions and illustrate differences and similarities among the samples. Factor loading is used to quantify how much each original variable contributes to a given PC [17].
To apply PCA to 3D hyperspectral ginseng matrices, it is necessary to unfold the hypercube into a 2D matrix, in which each column represents all the pixels from a given spectral band in the original image cube, and each row represents the spectrum of a single pixel [18,19]. Furthermore, the PCA was done by applying the following equation: where is the unfolded 2D matrix, is the score matrix, is the loading matrix, and is the error matrix.
The calculated scores matrix was re-folded, displaying the results in a score image that illustrates the distribution of the components in ginseng samples. The loadings obtained from the PCA were used to select optimal wavebands to detect inner whitening in ginseng. These optimal wavelengths, identified from the PC loadings, can be used for multispectral detection of whitening in abnormal ginseng samples. PCA and image processing techniques were carried out in MATLAB (2016a, MathWorks Inc., Natick, MA, USA).   Figure 4a,b show the raw and normalized spectrum of normal and abnormal ginseng samples with corresponding hyperspectral images. The raw hyperspectral images showed that whitened ginseng exhibits a darker region in center of the transmittance image, with differing intensity (Figure 4a ginseng spectrum with corresponding hyperspectral images) [20]. The occurrence of darker regions in the center is the result of higher optical density in the whitened material. In Figure 4a,b the spectrum of abnormal ginseng samples reflected lower transmittance intensity characteristics than that of the normal ginseng, especially in the region of 900-1050 nm and 1150-1400 nm, respectively. This is due to the inner, whitened region of abnormal ginseng reflecting higher amounts of light in this spectral region.  Figure 4a,b show the raw and normalized spectrum of normal and abnormal ginseng samples with corresponding hyperspectral images. The raw hyperspectral images showed that whitened ginseng exhibits a darker region in center of the transmittance image, with differing intensity ( Figure  4a ginseng spectrum with corresponding hyperspectral images) [20]. The occurrence of darker regions in the center is the result of higher optical density in the whitened material. In Figure 4a,b the spectrum of abnormal ginseng samples reflected lower transmittance intensity characteristics than that of the normal ginseng, especially in the region of 900-1050 nm and 1150-1400 nm, respectively. This is due to the inner, whitened region of abnormal ginseng reflecting higher amounts of light in this spectral region.

Whitening Detection Based on PCA and Two-Band (Ratio) Images
The ginseng hyperspectral data was analyzed using PCA, in combination with the image processing technique. In this study, PC-2 loading (Figure 5a) was chosen for ginseng characterization, as PC2 made the greatest contribution to detecting inner whitening (Figure 5b, PC-2 score image). Overall, the first three PC loadings accounted for nearly 80% of the total sample variance; subsequent PCs were unimportant and probably reflected noise in the data. Overall, PC-2 preserved relatively complete information regarding the internal quality of ginseng, and PC-2 loading showed characteristic bands at 950, 1110, and 1326 nm, which are associated with the ginsenoside compound (C 42 H 72 O 14 ) of the ginseng sample [21]. Specifically, the band at 1326 and 1110 nm corresponds to the C-H stretching vibrations of ginsenoside [21], and the band around 950 nm corresponds to the second overtone of the O-H stretching vibration [22] of the ginsenoside compound.

Whitening Detection Based on PCA and Two-Band (Ratio) Images
The ginseng hyperspectral data was analyzed using PCA, in combination with the image processing technique. In this study, PC-2 loading (Figure 5a) was chosen for ginseng characterization, as PC2 made the greatest contribution to detecting inner whitening (Figure 5b, PC-2 score image). Overall, the first three PC loadings accounted for nearly 80% of the total sample variance; subsequent PCs were unimportant and probably reflected noise in the data. Overall, PC-2 preserved relatively complete information regarding the internal quality of ginseng, and PC-2 loading showed characteristic bands at 950, 1110, and 1326 nm, which are associated with the ginsenoside compound (C 42 H 72 O 14 ) of the ginseng sample [21]. Specifically, the band at 1326 and 1110 nm corresponds to the C-H stretching vibrations of ginsenoside [21], and the band around 950 nm corresponds to the second overtone of the O-H stretching vibration [22] of the ginsenoside compound. In the PC-2 score image (Figure 5b), the whitened region in the center of the sample appeared bright, whereas in the PC-1 and PC-3 images (not shown), this region was dark. As PC-2 was able to discriminate the whitened region from the surrounding healthy tissue, the PC-2 loadings can be the feasible wavebands for detecting whitening [23]. On the basis of the above observations, the two most differentiating wavebands (950 and 1326 nm) from the PC-2 loading were used to carry out imagebased classification of whitened regions. This approach may provide information for the development of low-cost multispectral imaging techniques to measure the internal quality of ginseng. In addition, the one-way analysis of variance (ANOVA) test was also conducted in R software (version 3.6.1) for each waveband considering abnormal and normal ginseng. The ANOVA test showed that the wavelength region 950 and 1326 nm have significant differences (better classification) between abnormal and normal ginseng, as the larger F-value of 12 and lower p-value of 0.002 (p < 0.05) is in this wavelength region. The larger F-value indicates a more statistically significant mean separation between two groups [24].
Later, by applying the optimal wavebands identified through PCA, we saw that certain image ratios (Figure 6b) made whitened regions more apparent, whereas whitening was absent in the normal samples (Figure 6e). In contrast to the normal ginseng samples, the abnormal ginseng showed more warm coloration (yellow-red) in the center, where normal ginseng showed more cool coloration (green-blue). The PC-2 score images (Figure 5b) showed a similar coloration map for discriminating between the normal ginseng and abnormal ginseng. In the PC-2 score image (Figure 5b), the whitened region in the center of the sample appeared bright, whereas in the PC-1 and PC-3 images (not shown), this region was dark. As PC-2 was able to discriminate the whitened region from the surrounding healthy tissue, the PC-2 loadings can be the feasible wavebands for detecting whitening [23]. On the basis of the above observations, the two most differentiating wavebands (950 and 1326 nm) from the PC-2 loading were used to carry out image-based classification of whitened regions. This approach may provide information for the development of low-cost multispectral imaging techniques to measure the internal quality of ginseng. In addition, the one-way analysis of variance (ANOVA) test was also conducted in R software (version 3.6.1) for each waveband considering abnormal and normal ginseng. The ANOVA test showed that the wavelength region 950 and 1326 nm have significant differences (better classification) between abnormal and normal ginseng, as the larger F-value of 12 and lower p-value of 0.002 (p < 0.05) is in this wavelength region. The larger F-value indicates a more statistically significant mean separation between two groups [24].
Later, by applying the optimal wavebands identified through PCA, we saw that certain image ratios (Figure 6b) made whitened regions more apparent, whereas whitening was absent in the normal samples (Figure 6e). In contrast to the normal ginseng samples, the abnormal ginseng showed more warm coloration (yellow-red) in the center, where normal ginseng showed more cool coloration (green-blue). The PC-2 score images (Figure 5b) showed a similar coloration map for discriminating between the normal ginseng and abnormal ginseng.
After the hyperspectral measurement of ginseng samples, some normal and abnormal ginseng samples were halved to confirm the presence of whitening (Figure 6a,d). The color images of abnormal samples (S1, S3, and S4) showed a central whitening amount similar to the detected percentage of whitened pixels in the binary image (Figure 6a,c). This demonstrates a good correlation between the real images and the pixels detected nondestructively in the hyperspectral images. Normal ginseng slices showed no sign of whitening in the central region (Figure 6b).

Sensors 2019, 19, x FOR PEER REVIEW 8 of 11
After the hyperspectral measurement of ginseng samples, some normal and abnormal ginseng samples were halved to confirm the presence of whitening (Figure 6a,d). The color images of abnormal samples (S1, S3, and S4) showed a central whitening amount similar to the detected percentage of whitened pixels in the binary image (Figure 6a,c). This demonstrates a good correlation between the real images and the pixels detected nondestructively in the hyperspectral images. Normal ginseng slices showed no sign of whitening in the central region (Figure 6b).

Identficaion of Whitening Region on the Basis of Binary Imaging
The binary images (Figure 6c) were used to assess pixilation in the whitened region. To generate binary images from the ratio images, image segmentation was used, based on a threshold value. To determine a suitable threshold value, a 3D mash plot was produced, reflecting the ginseng image pixel intensity (Figure 7). In this plot, the majority of the whitened pixel intensity (red-region) lies over 5, so a threshold value of 5 was used to segment the whitened region from the remainder of the ginseng sample. All pixels below this threshold were subsequently classified as 0 (black); all pixels above this threshold were classified as 1 (white). The following equation was used to detect the whitening region of the abnormal ginseng.
where ( , ) represents whitening image pixel at ( , ), ( , ) represents the original ginseng image pixel at ( , ), and T represents the threshold value.

Identficaion of Whitening Region on the Basis of Binary Imaging
The binary images (Figure 6c) were used to assess pixilation in the whitened region. To generate binary images from the ratio images, image segmentation was used, based on a threshold value.
To determine a suitable threshold value, a 3D mash plot was produced, reflecting the ginseng image pixel intensity (Figure 7). In this plot, the majority of the whitened pixel intensity (red-region) lies over 5, so a threshold value of 5 was used to segment the whitened region from the remainder of the ginseng sample. All pixels below this threshold were subsequently classified as 0 (black); all pixels above this threshold were classified as 1 (white). The following equation was used to detect the whitening region of the abnormal ginseng.
g(x, y) = 1 0 Sensors 2020, 20, 273 9 of 11 where g(x, y) represents whitening image pixel at (x, y), f (x, y) represents the original ginseng image pixel at (x, y), and T represents the threshold value. This study tested several threshold values, but some pixels were unidentifiable when ginseng had little or no whitening. The threshold value was best at identifying pixels when there was little or no whitening. After the threshold value was applied, the resultant binary images (Figure 6c) showed that pixels above the threshold value corresponded to whitening, whereas pixels below the threshold value corresponds to healthy ginseng. The binary images isolated whitening from surrounding healthy regions. Further percentage whitening in ginseng samples was also calculated, using the following equation: where is the total number of ginseng pixels, is the total number of whitening pixels in ginseng, is the total number of normal pixels in ginseng, is the percentage of whitening pixels in the ginseng [25].
By applying Equations (4) and (5), it was found that the percent range of heavy whitening ranged between 48%-54% in the measured abnormal ginsengs. The calculated number of whitened pixels was based on the size/area of whitening in the samples; the extent of the whitened region was confirmed by comparing the generated hyperspectral images with color images of abnormal ginseng, showing a good match between the images as shown is Figure 8. In addition, we have also applied an outlier detection method using the 3σ rule, however, no outliers were observed in the calculated pixels.
(b) (a) Figure 7. (a) Ratio and RGB images of an abnormal ginseng sample used for mash plot development. (b) 3D mash plot showing ginseng pixel intensity; the x and y-axis represent the pixel identities, whereas, the z-axis represents the pixel intensity. The red region in the plot belongs to the whitening region. Threshold value of 5 was used to detect the whitening pixels, as the larger proportion of whitening pixels lies above this threshold value.
This study tested several threshold values, but some pixels were unidentifiable when ginseng had little or no whitening. The threshold value was best at identifying pixels when there was little or no whitening. After the threshold value was applied, the resultant binary images (Figure 6c) showed that pixels above the threshold value corresponded to whitening, whereas pixels below the threshold value corresponds to healthy ginseng. The binary images isolated whitening from surrounding healthy regions. Further percentage whitening in ginseng samples was also calculated, using the following equation: where T p is the total number of ginseng pixels, W p is the total number of whitening pixels in ginseng, H p is the total number of normal pixels in ginseng, P wp is the percentage of whitening pixels in the ginseng [25]. By applying Equations (4) and (5), it was found that the percent range of heavy whitening ranged between 48-54% in the measured abnormal ginsengs. The calculated number of whitened pixels was based on the size/area of whitening in the samples; the extent of the whitened region was confirmed by comparing the generated hyperspectral images with color images of abnormal ginseng, showing a good match between the images as shown is Figure 8. In addition, we have also applied an outlier detection method using the 3σ rule, however, no outliers were observed in the calculated pixels.

Conclusions
Near-infrared transmittance spectral imaging was successfully used to detect inner whitening in ginseng samples. The transmittance intensity of abnormal ginseng was generally lower than that of normal ginseng samples. Firstly, PCA was conducted to identify the most effective wavebands pairs for differentiating whitened from healthy regions. The PC-2 score images showed the best discrimination between normal and whitened regions, so the effective wavebands from PC-2 loadings were used to generate a two-band ratio image. This ratio image showed good visualization of the whitened region in abnormal ginseng samples. Thus, the study shows that is it possible to develop an economic spectral imaging system to evaluate internal ginseng properties, using only two spectral bands. Our results suggest that near-infrared transmittance spectral imaging is a suitable and rapid method for grading ginseng and could be an alternative to using skilled inspectors. Considering the time saved with this method, it is much faster compared with the current manual grading system (based on human visual inspection). Manual grading is time-consuming, as it takes one or two days to detect the inside properties of a single ginseng lot. By adopting this system in a ginseng plant, it could change the grading system from days to hours, due to the automated process and analysis. In the future, spectral imaging techniques using this approach could be used to measure the internal quality of ginseng and could be developed into a key automated method for ginseng producers.

Conclusions
Near-infrared transmittance spectral imaging was successfully used to detect inner whitening in ginseng samples. The transmittance intensity of abnormal ginseng was generally lower than that of normal ginseng samples. Firstly, PCA was conducted to identify the most effective wavebands pairs for differentiating whitened from healthy regions. The PC-2 score images showed the best discrimination between normal and whitened regions, so the effective wavebands from PC-2 loadings were used to generate a two-band ratio image. This ratio image showed good visualization of the whitened region in abnormal ginseng samples. Thus, the study shows that is it possible to develop an economic spectral imaging system to evaluate internal ginseng properties, using only two spectral bands. Our results suggest that near-infrared transmittance spectral imaging is a suitable and rapid method for grading ginseng and could be an alternative to using skilled inspectors. Considering the time saved with this method, it is much faster compared with the current manual grading system (based on human visual inspection). Manual grading is time-consuming, as it takes one or two days to detect the inside properties of a single ginseng lot. By adopting this system in a ginseng plant, it could change the grading system from days to hours, due to the automated process and analysis. In the future, spectral imaging techniques using this approach could be used to measure the internal quality of ginseng and could be developed into a key automated method for ginseng producers.