Research on parameters optimization of digital imaging system in red–yellow jadeite color measurement

The application of digital imaging to color measurement is more and more extensive, which also provides new ideas for gemology. In this paper, the single-factor experiment method and orthogonal experiment design are used to study the influence parameters of the digital imaging system (DIS) on gem color measurement. Among them, the illuminance has the most significant impact on the measurement results, followed by the exposure time, and the change of the measurement distance has an insignificant impact on the results; through range analysis and analysis of variance, the most suitable measurement parameters for red jadeite are 1600 lx, 12,500 μs, 25 cm.


Result and discussion
Influence of illuminance. The 24 pieces of jadeite samples were tested in 1100-2900 lx (interval = 200 lx) respectively (Measurement Distance: 25 cm, Exposure Time: 12,000 μs); The China national standard GB/T 26189-2010 "Lighting of Indoor Workplaces" suggests that the maintained illuminance (the lowest average illuminance on the work surface) of indoor jewelry manufacture and precious gemstone operation should be 1500 lx 32 .
The correlations between colorimetric coordinate a * b * and illuminance is shown in Fig. 2. The increment of b * is more than a * with the increase of illuminance, with a fitting coefficient of 0.013 (R 2 = 0.998) and 0.007 (R 2 = 0.997) respectively.
As shown in Fig. 3a, with the gradual increase of illuminance, the lightness L * of jadeite increases significantly and the mean lightness change from 1100 to 2900 lx is 27.81, which is the same as the observation by the naked eye. By comparing the lightness of jadeite with different hues, it is found that the lightness of yellow jadeite ( h • ∈ (80,110)) has a greater change, besides, it is found that there is a high positive correlation between colorimetric coordinate b * 1100 lx and the change of lightness from 1100 to 2500 lx (R 2 = 0.859) (Fig. 3b), which indicates that the lightness L * of jadeite with a higher colorimetric coordinate b * is more sensitive to the illuminance change. So those samples with a yellowish hue show a greater lightness change as the illuminance change ( Fig. 3b #55 compares with #61). Figure 4a shows that the chroma C * of jadeite positively correlates to the illuminance within the range from 1100 to 2900 lx. The mean value of chroma change from 1100 to 2900 lx is 22.29 that indicating the jadeite color will be vivid as the illuminance gets higher, which is consistent with the perception that colorfulness rises as illuminance grows within the set range. As shown in Fig. 4b, a positive correlation was found between colorimetric coordinate b * 1100 lx and C * 1100−2500 lx (R 2 = 0.761), combined with the result of Figs. 2 and 3, the rises in illuminance will lead to an increase in lightness L * , while the colorimetric coordinate b * is positive with the  www.nature.com/scientificreports/ change of lightness, so the chroma C * of samples with a higher b * is more sensitive with the change of illuminance ( Fig. 4b #61 compares with #67). The mean hue h° changes (max-min) is 3.12 which indicates the color hue of jadeite slightly fluctuate as the illuminance gets higher. To better compare the hue angle variation of jadeites with different hue range, the samples were divided into 3 groups. As shown in Fig. 5, it shows that the sample whose hue angle ranges from 35° to 50° has a significant rise from 1100 to 1500 lx (red box).   www.nature.com/scientificreports/ The main effect of illuminance on reading the color of jadeite is to improve the lightness, chroma, and slightly hue shift, however, excessive illuminance will cause the obtained photos to be overexposed ( Fig. 5 Yellow box) and read unreal data.
The yellow jadeite is dominant by the colorimetric coordinate b * , so its lightness and chroma show a higher sensitiveness to the change of illuminance; combined with lightness histogram, when the illuminance reaches 2500 lx and above, the lightness histogram of the yellow jadeite is occupied by the high lightness area (Fig. 6 red circle) when the histogram of red and orange jadeite shows a good uniformity, which means there is loss of color data in the yellow sample and causes the reading of unreal color. Therefore, the optimal parameters for the measurement of jadeite with different hues (red-orange-yellow) should be discussed separately. Based on the above results, the illuminance range can be further narrowed down to 1500 to 2300 lx to ensure the stability of the test.

Influence of exposure time (E.T).
The 14 jadeite samples were tested in 10,500-13,500 μs (interval = 500 μs; 1500 lx, 25 cm) respectively. As shown in Fig. 7a, the lightness L * of jadeite is increasing with the increase of E.T. The mean lightness change from 10,500 to 13,500 μs is 14.11, which corresponds to the objective fact that the luminous flux of the camera is increased. Figure 7b shows the Chroma C * gets higher as the E.T increases, the mean value of Chroma difference between 10,500 and 13,500 μs is 8.9. By analyzing with samples (#23 and #52), the higher C * 10,500 µs and L * 10,500 µs (the Chroma and Lightness in initial E.T value) it is, the more C * and L * will be. The E.T have little influence on the Hue h • of samples, with a mean change    www.nature.com/scientificreports/ =1.37, those jadeites with lower hue angle show a relatively greater sensitiveness than those higher (Fig. 7c).
According to the similar trend of L * C * h • caused by illuminance and exposure time, the interactive influence between them is considered in the orthogonal experiment subsequently.
Influence of measurement distance. Under the conditions of 1500 lx and 12,000 μs, the 14 samples were tested in 20-35 cm (interval = 5 cm) respectively. The mean change L * = 0.273, C * = 0.326, − h • = 0.383, which illustrates the influence of M.D is smaller than the illuminance and exposure time. Since the size and shape of jadeite in the market are very variable, the stability of the color measurement test can be simulated by changing the measurement distance. According to the results, it can be found that the digital image system can provide good stability under the set lighting and background conditions.

Optimal parameter for jadeite-red by DIS.
Six red jadeites from the tested samples were chosen for this chapter. According to the pre-test shown in Fig. 8, three levels for each factor were selected for the subsequent orthogonal experiment. The color difference was used here to measure the degree of applicability of the combination of test parameters, the smaller the E 00 , the better the combination. As is shown in Table 1, L18 (36) is selected for the 3-level 3-factor experiment with 2 interactions (A × B). According to the result of range analysis, R1 > R2 > R5 indicates the order of degree of influence of the experimental factors on the result: Illuminance > Exposure Time > Measurement Distance. For the result of illuminance, because it is based on the average color difference ΔE00-the smaller it is, the better the result is-k2 < k3 < k1 represents the most suitable level is 1600 lx. And so on the best measurement distance is 25 cm, and exposure time is 1250,0 μs (Fig. 9).
ANOVA can help distinguish between data fluctuations caused by changes in experimental conditions and data fluctuations caused by experimental errors. Again, the results of the ANOVA can further verify the conclusions of the above range analysis. The SS T indicates the sum of squared deviations where n represents the total number of experiments, y i represents the result of each experiment, and SS T is calculated by: The sum of squared deviations of each column SS j as: where T is the sum of − E 00 . The degrees of freedom of each factor f A and the total degrees of freedom f total are calculated as follows: (2) According to the sum of square deviations of each factor V A , the statistic F value can be calculated as: (4) f total = n − 1,  www.nature.com/scientificreports/ According to the results of the ANOVA (Table 2), the conclusions of the range analysis can be verified. The order of the degree of factors that influence the DIS is Illuminance (A) > Exposure Time (B) > A × B > Measurement Distance. Illumination has a very significant influence on the DIS, and the k 2 level is the best; the effect of exposure time have some influence, and the result shows that the k 3 level is the best; the effect of measurement distance is not obvious, and the level with the lowest color difference k1 can still be selected for the result; the interaction between illuminance and exposure time is not obvious, according to the analysis of the interactive influence, it is found that the A2B3 combination is the best level (Table 3), which corresponds to 1600 lx, 12500 μs; finally, the optimal parameter level combination for the red jadeite color reading by the DIS is 1600 lx, 12,500 μs, and 25 cm. In the future, more test samples can be added to modify the optimized measurement conditions, and based on this basis, measurement parameters can be obtained for other colors of jadeite. Verification experiments. 10 members observed all the simulated color blocks then say "yes" to the test result, which means every scheme can represent the average color of jadeite without comparison by different scheme. As shown in the Table 4, the scheme A was graded as 2 (low) with frequency 13.89% while the scheme C with 1.39% and B with 0.00%. Although the frequency of all schemes with a score greater than 3 was higher than 50%, the scheme B got 4 and 5 points more frequently than the others, which indicates that the parameters for DIS can better restore the color of jadeite red.

Conclusion
DIS is a non-contact color measurement system that could help researchers better study unevenly distributed colored gems. The system includes circumstance factors such as light source intensity (illuminance), exposure time, measurement distance, etc., which will affect the color reading of jadeite. Under the single factor experiment method: 1. The influence of illuminance is mainly to improve the test results of lightness and chroma. The hue angle will fluctuate as the illuminance rise. 2. The effect of exposure time is mainly to increase the luminous flux, thereby improving the lightness and chroma of jadeite, and the overall change trend is consistent with the  (2,6), the result is very significant (***), greater than F 0.05 (2,6) is significant, greater than F 0.10 (2,6) represents to have some influence (*), otherwise (-) deemed to have no significant impact.  www.nature.com/scientificreports/ change in illuminance; 3. The DIS shows good stability on the change of measurement distance, which is used to simulate the measurement on jadeites with different sizes and shapes. Based on the results of single-factor experiments, a three factors three levels orthogonal experiment with two interactive effects was designed. The order of the degree of influence obtained by range analysis and ANOVA is illuminance, exposure time, measurement distance (from high to low). Combined with the result, the optimal color measurement parameters of jadeite-red for DIS are 1600 lx, 12,500 μs, 25 cm; this provides a new case and theoretical support for the future application of DIS on reading the color of gemstones and the establishment of a gem-color database.

Methods
Color space. The CIE (International Commission de l'Éclairage) 1976 L * a * b * uniform color space has been widely used in the color evaluation of various colored gemstones; compared to the CIE1931 color space, the geometric distance between two given colors is inconsistent with human visual perception 33 . CIE1976 L * a * b * uniform color space has two advantages: (1) good color uniformity and (2) conform to the subjective law that the visual color difference in the yellow-blue direction is bigger than that in the red-green direction. This color system comprises color coordinates a * , b * and Lightness L * . Chroma C * and Hue angle h • can be calculated based on a * and b * : Color difference formula. To explore the optimal parameter combination of the Digital Image System (DIS) for measuring jadeite, this paper chooses the CIE DE2000 formula to analyze the results of the measured samples. The DE2000 formula is experimentally obtained based on the color difference formulas such as CIE LAB and CIE 94, which is more accurate and more computational: where L ′ , C ′ , H ′ represent the difference in lightness, chroma, and hue angle respectively (between the DIS data and photo calibrated data). The weight functions S L , S C , and S H are used to calibrate the uniformity of the color space, and the function R T is used to correct the deflection of the color tolerance ellipse in the blue area; the Parameters K L , K C , K H are to correct the experimental conditions, in gemology, where the parameter combination is usually set as (1:1:1) to provide better perceptibility.
The color difference is calculated at the "colortell.com" (developed by ColorTell Tech CO., LTD, Beijing, China) color management website by importing digital imaging system data (samples) and calibrated photo data (standards), after which the color data is calculated by the Eq. (9).

Digital imaging system (DIS).
The color of jadeite was measured by the Digital imaging system under the same Munsell N7 background (Fig. 10). The images were captured by using a Mako G-507C industrial camera (Allied Vision Technologies, Stadtroda, Germany) equipped with a CMOS-type Sony IMX264 sensor with a size of type 2/3. The resolution of the camera is 2464 (horizontal) × 2056 (vertical), it has a global shutter, a 50 mm (7) C * = a * 2 + b * 2 , Figure 10. The DIS experimental device. www.nature.com/scientificreports/ focal length, and an aperture factor of 1.4. The dome lampshade is a type of shadowless dome light source with a color temperature of 6326 K (Color Rendering index is 90, the power distribution is shown in Fig. 11), which is positioned 10 cm above the sample. To better read the color of the sample, a special diffuse reflection material is used inside the lampshade. So that the light can be evenly irradiated on the surface of the sample. A Konica Minolta CL-200 Color Illuminometer (Tokyo, Japan) served to measure the environmental illuminance of the measuring position. The color reading was processed by the CKVisionBuilder V3.0 software (developed by Shenzhen CKVision Machine Vision Technology Co., Ltd., Shenzhen, China). The color conversion algorithm is encapsulated in the supporting CKVisionSDK 3.0. The user can select different types of tools to read the color of the specified area in the picture, and the software can convert the sRGB value of the selected area to the L * a * b * value. Three areas were chosen to calculate the average color parameters for each sample.
All the jadeite samples were well polished and showed a high quality "glassy luster" because of their high refractive index (1.66). To prevent the influence of surface reflection on color measurement, we excluded the reflective areas from the color reading, selected three uniformly colored locations in the measuring area, measured the color, and took the average value as the test result (Fig. 12). Some samples containing black or white mineral inclusions were excluded from the measuring area.
Photograph calibration. The Nikon Z5 (Nikon, Tokyo, Japan) equipped with a CMOS-type sensor is used to take photos of X-rite Color Checker Passport (X-rite, Shanghai, China) (Fig. 13) and jadeite samples under the standard D65 light source, and all the samples are placed at the Munsell N7 neutral grey background.  www.nature.com/scientificreports/ X-rite Color Checker Passport contains a set of three-Color Checker photography targets 34 , a desktop camera calibration application, and an Adobe Photoshop Lightroom camera calibration plug-in to create a DNG profile that reflects specific camera, lens, and lighting conditions to process the calibration of the RAW photo and restore the true color of the jadeite. Each photo was processed in Photoshop 2020, using the established environment DNG feature file for correction (Fig. 14), operation steps as follow: 1. Take the picture of ColorChecker and samples under the set circumstance, the output format is RAW. 2. Import the picture including ColorChecker into "ColorChecker Camera Calibration" (developed by X-rite, Shanghai, China) to create a DNG profile. 3. Open picture of samples through Photoshop2020, then set the DNG profile as the configuration file.
Single factor experiment. This paper applied the single factor experiment method to test the three main influencing factors of the DIS (Illuminance, Exposure Time (E.T), Measurement Distance (M.D)). While one of the factors is regarded as a variable, the other two factors are regarded as constants, for example, when testing the influence of Illuminance, the experimental conditions were set as 1. Illuminance: 1100 lx, 1300 lx, 1500 lx, 1700 lx, 1900 lx, 2100 lx, 2300 lx, 2500 lx, 2700 lx, 2900 lx; 2. Exposure Time: 12,000 μs; 3. Measurement Distance:25 cm. To explore the influence of variables on the experimental results.
Orthogonal experiment design. An L 18 (3 6 ) Orthogonal table was selected for this paper, with 3 factors 3 levels, and 2 interactives. A blank column was set to consider the error. And the average color difference of each combination of experimental conditions is assigned to determine the feasibility of the experimental result. The ANOVA was set to investigate the degree of influence of experimental conditions on experimental results. Validation group. 10 people were chosen to participate in this experiment, two of whom own certificate of The Gemmological Association of Great Britain. They ranged in age from 20 to 60 years and were in good health.  www.nature.com/scientificreports/ The members observe the simulated color boxs exported by different parameters (shown on the 15.6 inchs screem LGD05C0 which is produced by LG Display, Korea) and physical samples (In the northern hemisphere at noon daylight), they have 10 s to decide whether the simulated color can represent the sample by "yes" or "no". If the answer is "yes", then they will give a grading point from 1 to 5 on the five-point Likert scale: 1 is "very low", 2 is "low", 3 is "moderate", 4 is "high", 5 is "very high" (Fig. 15).

Data availability
Data underlying the results presented in this paper are not publicly available at this time but may be obtained from the authors upon reasonable request.