Evaluating the effect of light exposure and seed coat on lentil cotyledon color by computer vision

A computer vision system and color analysis algorithms were employed to study the influence of UVA (ultraviolet‐A) and visible light on the color of lentils with red, green, and yellow cotyledons. Twenty samples of cotyledons from each of the three‐color classes were subjected to six light treatments (ultraviolet, full‐spectrum visible, red, green, blue, and dark control) for 7 days at room temperature. The International Commission on Illumination L*a*b* (CIE L*a*b*) color values of the individual seeds were obtained before and after each treatment using the computer vision and image analysis system. Results of the analysis showed that light exposure had a statistically significant effect on all three cotyledon color classes. The effect size was largest for green lentils, smaller in yellow, and least in red lentils. By having established that light exposure affects the color of lentil cotyledons, it was hypothesized that seed coats may protect cotyledons against the effects of light exposure and that the degree of protection would vary with seed coat color classification. This hypothesis was tested using green‐cotyledon lentil varieties with different seed coat classes. Results confirmed that light‐induced color loss in the cotyledons was significantly influenced by seed‐coat color class. The order of protective effect of lentil seed coat from least to highest was found to be as follows: gray‐zero tannin, green, normal gray, and black. Thus, breeding for seed coat protection may improve the overall quality of green lentils. The results from this study will be informative to breeding programs that focus on enhancing the cotyledon color of lentils, and in making decisions regarding the dehulling of lentils and the design of dehulled lentil materials handling.

phenylalanine. It is also rich in phenolic compounds, especially polyphenols.
Lentil is a major export crop in Canada, which has assumed the status of the world's largest exporter of lentils since [2005][2006]. Statistics Canada (2019) estimated lentil production in Canada to be about 2.2 million tonnes. The province of Saskatchewan accounts for 95% of lentil production in Canada (Boye, 2015).
There is concern about the cotyledon color of Canadian lentils.
Although this is mostly associated with red lentils, which are usually dehulled for consumption (Erdo gan, 2015), it is important to also consider the colorfastness of green and yellow cotyledon classes. Color may correlate well with other quality attributes of a commodity (Sahin & Sumnu, 2006), and the loss of color may indicate a loss in nutrients and secondary metabolites, such as polyphenols. After maturation, Canadian lentil crops are swathed or desiccated with chemicals and allowed to remain in the field to dry for about 10 days (Saskatchewan Pulse Growers, 2020). During this period, there are concerns about the role light may play on the quality of the underlying cotyledon. In previous work (Jackson, 2020), it was found that there was detectable transmission of longer wavelength radiation (mostly from UVA [315 nm]) through all lentil seed coat types tested. As a result, lentil cotyledon quality may be reduced due to photodegradation. In addition to light exposure in the field, dehulled lentil seeds may be exposed to light during handling and storage, and this may affect cotyledon quality.
Although no published studies were found specifically on the interaction between light and seed quality, the effect of light of different wavelengths on foods and harvested crop quality have been studied. Conrad et al. (2005) studied the protective effects of polyethylene terephthalate (PET) and PET/PEN (polyethylene naphthalate) blend packaging on ascorbic acid and color in juices exposed to fluorescent (visible) and UVA (315-400 nm) light. They exposed apple and orange juices packed in the different packaging bottles (one PET and three levels of PET/PEN bends) to dark, intense fluorescent (1500 lux), and UV light conditions at 22 C and monitored them for more than 7 months for ascorbic acid content and color changes. The most important highlights of this study were that UVA and visible light had significant effects on the food material and that color changes were observed even under dark conditions. The protective effect of the packaging material was also reported to differ depending on its chemistry. Asim and Kasi (2018) investigated the effects of UVB (290-315 nm) irradiation on the postharvest color quality and decay rate of red "Capia" peppers and found that UVB treatment enhanced the redness but increased darkness. G omez et al. (2012) investigated the effect of pulsed light (PL) dose on color, microbiological stability, and microstructure of cut apple during 7-day refrigerated storage. They reported that the cut-apple surface exposed to high PL fluxes turned darker (lower lightness [L*] values) and less green (higher rednessgreenness [a*] value) than control.
To study the effect of light treatment on lentil cotyledon color, a suitable method of quantifying color pretreatment and posttreatment is required. Halcro et al. (2020) developed a computer vision system for imaging and extracting color and physical dimensions of seeds. The system comprised a portable imaging system (called BELT) and image acquisition and analysis software (called phenoSEED). They concluded that the system provided increased precision and higher rates of data acquisition, compared with traditional techniques. It was anecdotally expected that exposing dehulled lentils to light would result in a change in cotyledon color. Further, it was hypothesized that assuming lentil cotyledons did change color due to photodegradation, the presence of the seed coat would provide a protective effect, and this effect would vary with seed-coat characteristics. This paper presents a two-part study that used the BELT computer vision system to study these questions and provide a baseline for future work. The results from this study will inform lentil breeding programs and provide insights relevant to decision making for lentil processing, handling, and storage.

| MATERIALS AND METHODS
This study was conducted in two parts. The first part tested the hypothesis that lentil cotyledon color would change when exposed to light. The effects of different wavebands of light on different dehulled cotyledon colors were investigated. The second part of the study tested whether the seed coat provides the cotyledon protection against light-induced changes and if the level of protection differs between the seed coat colors. A grain testing mill was used for dehulling samples in various parts of the study (TM05, Satake Engineering Co., Hiroshima, Japan). Sample holders with partitions were designed and fabricated using a 3D printer. Each partition contained an array of depressions to hold individual seeds. This arrangement made it possible to consider the seeds individually by placing them at specific positions and in a particular order (the first part of the study). The partitions allowed the separation of the three cotyledon types and flipping over to expose both sides of the seeds to light. The compact arrangement helped to ensure that all seeds were exposed to equal intensities of light.
The BELT computer vision system (Halcro et al., 2020) was used to acquire color information about the sample seeds. This system was developed for acquiring high-resolution, color-calibrated imagery of individual seeds in a sample.

| Experimental design and light treatment
The first part of the study involved one-factor experiments on each of three colors of lentil cotyledon (red, green, and yellow). Light treatment was the factor at six levels (ultraviolet [UVA], blue, green, red, full-range visible, and control [dark]). The responses were the changes in CIE L*, a*, and b* color coordinates and overall color change (ΔE*) (Equations 1-4). Twenty seeds of each of the three cotyledon color classes were subjected to the light treatments at room temperature (nominally 23 C). Five light-treatment chambers were set up: UVA (Philips F40BLB T12 blacklight-blue, fluorescent tube, at 150 mm distance, full-spectrum visible (with flux density 30.12 W/m 2 ), red (with flux density 21.08 W/m 2 ), green (with flux density 9.04 W/m 2 ), and blue (with flux density 9.04 W/m 2 ). Dark control groups were kept in a wooden cabinet under ambient room conditions. Seeds were exposed for 14 days total and were turned over at the 7-day mark to expose both sides of the seed equally.
In the second part of the study, green cotyledon lentils with four seed coat classes (black, green, gray, and gray-zero tannin, respectively) and two conditions, dehulled and whole seed (non-dehulled) were subjected to three of the five treatments from Part 1: UVA, visible light, and dark control. The factors were combined based on the questions of interest to form five experimental groups: whole seedvisible (non-dehulled seeds exposed to visible light), whole seedcontrol (non-dehulled seeds kept under dark control), whole seed-UVA (non-dehulled seeds exposed to UVA light), dehulled-UVA (lentil cotyledons exposed to UVA light), and dehulled-visible (lentil cotyledons exposed to visible light). This was done in triplicate (60 samples total) with each sample comprising 10 seeds. Seeds were again exposed for 14 days total and were turned over at the 7-day mark.

| Color measurement
To determine the effect of light exposure, it was necessary to measure the color of the seeds before and after each light treatment. Each measurement involved a two-step process of image acquisition and image processing using the BELT system (image acquisition) and phenoSEED (image processing) software (Halcro et al., 2020).
The basic components of BELT include the imaging chamber, feeder, conveyor belt (for moving seeds across the imaging chamber for image acquisition), cameras, and collection funnel. For image acquisition, the seeds were placed on the conveyor belt and moved under the camera, triggering the camera via a broken-beam infrared emitter-detector pair (Halcro et al., 2020).
For the first part of the study, the seeds were tracked individually to facilitate pre-and post-analysis on a per-seed basis. This procedure was repeated with posttreatment imaging. For the second experiment, the initial color of the dehulled seed group was measured as previously described. It was assumed that the initial cotyledon colors of whole seed samples were the same as the initial colors of their dehulled counterparts; this made it possible to have estimates of the pretreatment color values of the whole seed group (i.e., the initial colors of the dehulled group were used as the reference). Color measurements were repeated posttreatment on the dehulled groups and on the whole seed groups after dehulling them. The need for massdehulling posttreatment necessitated looking at the color of the seeds in aggregate and not on an individual seed basis as in the first part of the study. Thus, each color data point represented the average for the group.
The phenoSEED software applied color and spatial calibrations to extract seed color and other properties. Color calibration and colorspace transformations (from RGB [red, green, blue] to CIEL*a*b*) were based on a neural network algorithm that used an X-Rite Col-orChecker Digital SG as the reference. The saved RGB images were processed to obtain equivalent CIEL*a*b* values using phenoSEED software (Halcro et al., 2020) for this purpose. PhenoSEED included a preprocessing step that applied the color correction to the image data

| Data analysis
The before-and after-treatment data were reformatted and combined into one comma-delimited file for analysis using the R program (R Development Core Team, 2011). For the first part of the study, the color change on individual seeds was computed as changes in L*, a*, b* values (ΔL*, Δa*, and Δb*), and the overall color difference ΔE*.
The R algorithms used for this computation were based on the color difference equations presented by Marcus (1998) as follows: Δb where L* is the lightness value of the sample, a* is the rednessblueness value, b* is the yellowness-greenness value, and the subscripts n and r indicate the color values are of the new (posttreatment) and reference (pretreatment) samples, respectively. The overall color difference, ΔE*, was calculated as follows (Marcus, 1998): The color differences were treated as continuous response variables, while light exposure was treated as a categorical explanatory variable.
For each cotyledon class, a general linear model (GLM) was fit to the data using the color changes (ΔL*, Δa*, Δb*, and ΔE*) as the response variables, and the treatment as explanatory variables. The GLM allows for directly comparing means of one treatment level of interest (set as the control in this case) to the means of the other treatment levels using t tests (Wickens, 2004). Generally, in a GLM summary, the "estimate" of the control represents its mean (the effect [change] on the control), while the estimate of the other treatments represents the difference between their respective means and the mean of the control. The p value of the control indicates if its mean is significantly different from zero while treatment p value indicates if its mean is significantly different from control.
For the second part of the study, the cotyledon color changes on seed sample groups were also computed using R algorithms based on Equations 1-4. It is important to note that each seed coat class represents a different lentil genotype; thus, it was not appropriate to directly fit a model to compare color change across seed coat classes.
The approach used here was to compare each treatment group with its corresponding dark control group. The effect size (magnitude of observed differences) and the statistical significance observed in each category could then be compared. For each cotyledon class (green, red, and yellow), GLM was fit to the data (Wickens, 2004). GLM ANOVA and multiple comparisons (GLM Tukey test) were used to compare the cotyledon color changes in the experimental groups.

| Effect of light exposure on color of lentil cotyledons
To determine the effect of the different light treatments on dehulled lentil seeds from green, red, and yellow cotyledon classes, the color changes in treated seeds were directly compared with the color changes in their corresponding control group. Figures 1-3  3.1.1 | Effect of light treatment on green lentil cotyledons Figure 1 presents the color changes measured in dehulled, green lentil cotyledons. In the control group, only changes in the lightness (L*) and overall (E*) indices were statistically significant. Although these were statistically significant, the differences in means were very small, and all control group changes were below the minimum perceptible difference level. In the light treatment groups, all changes were statistically significant with p values approaching zero. Some general trends are evident in these changes. Lightness (L*, gray boxes) increased under all treatments, but this change was only clearly perceptible under the blue and white-light treatments. All treatments had a red-shift in thered-green index (a*, red boxes), and a blue-shift in the yellow-blue Color change values of green lentils as a function of light treatment; * indicates that the group mean is significantly different (p ≤ 0.05) from the relevant control. For green lentils, all significant p values were <0.01. See Table 1 for means and p values index (b*, blue boxes). As with the L* changes, these shifts were most pronounced under blue-and white-light treatments. See Table 1 for the mean color changes and their corresponding p values.
The increase in lightness would be consistent with pigment breakdown generally. Chlorophyll absorbs light in both the red and blue portions of the spectrum; therefore, the breakdown of chlorophyll would increase the red and blue light reflected, compared with green.
Carotenoids also absorb strongly in the blue portion of the spectrum and have been observed in significant concentrations in green lentil cotyledons (Thomas, 2016 3.1.2 | Effect of light treatment on red lentil cotyledons Figure 2 shows the color changes in dehulled, red lentils exposed to the different kinds of light treatment. In the case of red lentils, there was generally much less variation between the treatments and control, compared with green cotyledon lentils. In the control group, changes in the lightness (L*), redness-greenness (a*), and overall color difference (E*) indices were statistically significant, albeit with very Interestingly, red lentils subjected to red light turned slightly redder to a significant degree. The effect sizes (mean color differences) show that seeds exposed to red light experienced the highest positive difference from the control and red light was the only treatment with a mean positive Δa* value (which means that the seeds became redder). Also, the greatest changes observed in red lentils were in the yellowness-blueness (b*) coordinate, and not the redness-greenness (a*) coordinate, where the change in the desirable red color would be of much concern. It is hypothesized that light-induced carotenoid breakdown was the major driver of this change.
The mean overall color differences and the minimum perceptible difference (MPD) threshold (ΔE* ≈ 2.3) indicate that the color differences were visually perceptible only under red and full-visible light treatments; however, from personal observation, these differences were difficult to see. Finally, although red, blue, green, and full-visible lights significantly affected the color of the red lentil cotyledon in one or more color coordinate (s), the effect sizes were generally small, compared with green cotyledon lentils.  yellowness-blueness (b*) and overall color change (E*). See Table 3 for the mean color changes and their corresponding p values.

| Effect of light treatment on yellow lentil cotyledons
Furthermore, UVA, blue, and visible light treatment caused a blue-shift (loss of yellowness) in the yellow lentil cotyledons. Finally, the effect sizes (mean color differences) were generally small and considering the mean overall color differences and the MPD threshold (ΔE* ≈ 2.3), the color differences were visually perceptible only under blue light treatment; from personal observation, these differences were difficult to see.  showed a significant Δb* change, the significance of changes in the other coordinates and the overall ΔE* measure differed between the varieties.

| Influence of seed coat presence and color on cotyledon color stability
Differences between dehulled and whole-seed groups under light treatments are presented on a per-color-channel basis. First, considering the changes in the lightness (ΔL*) values, Figure 4 shows that L*value changes in the dark control groups were large and unexpected (especially in the varieties with black, gray, and gray-zero tannin seed coats), unlike the variety (CDC QG-3) used in the first part of the study, where the L*-value changes were close to zero. However, there are other mechanisms for color change over time (e.g., oxidation) and it has been observed in other contexts (Conrad et al., 2005). This observation does suggest varietal differences in susceptibility to color changes due to factors other than light exposure may be in play. It also highlights the need for caution in making direct comparisons between the changes observed in different varieties.
Continuing with Figure 4, under UVA treatment, the ΔL* in the treated dehulled groups were not significantly different from those of treated whole seeds for all the seed coat types. Further, only the lentil variety with black seed coat showed a significant (p < 0.05) difference between the dehulled treated and the dark control seeds. The effect size was small and comparable with other varieties; it was probably significant due to the tight within-sample variation in the case of this variety. UVA light also did not affect the cotyledon of any of the whole green lentils.
For the visible light treatment, the ΔL* in dehulled-visible (D_VIS) light treated groups were significantly higher (p < 0.01) than those of whole (non-dehulled) control seeds in all the green lentil genotypes used for this test. Compared with the whole seeds under the same visible light treatment (W_VIS), the dehulled cotyledons (D_VIS) turned significantly lighter. This indicates that the presence of a seed coat reduces the effect of light on the cotyledon.
To explore differences in the effect of the different seed coat types, comparisons were made between whole seeds exposed to visible light (W_VIS) and whole seeds kept under control (Control). A significant increase in L*-values (p < 0.01) was observed in cotyledons having green and gray-zero tannin seed coats. There were no such differences in the case of gray and black seed-coat genotypes. This shows that gray and black seed coat types offered the best protection against lightening/darkening of green lentil cotyledon under the visible light treatment.
In the redness-greenness (a*) coordinate ( Figure 5), the dark control groups of varieties with gray and gray-zero tannin seed coats changed noticeably, while the control groups for the black and green seed coat types did not. Similar to the ΔL* results of Figure 4, this indicates that other factors for color change are in play and that there green seed coats only showed significant differences in Δa* between the dehulled treated group and dark control; the fact that the treated whole seeds experienced color changes that was not significantly different from the treated dehulled seeds suggested that the green seed coat offered limited or no protection. The dehulled treated group of varieties with gray and gray-zero tannin seed coat were not affected F I G U R E 4 Changes in L*-value in different seed coat classes and treatment groups; p values for significant (p ≤ 0.05) differences are indicated: p c indicates a comparison versus the relevant control, and p t indicates the significance of a within-treatment comparison between the whole and dehulled seeds. Control = untreated whole seed; W_UVA = whole seed UVA; D_UVA = dehulled UVA; W_VIS = whole seed visible; D_VIS = dehulled visible F I G U R E 5 Changes in a*-value in different seed coat classes and treatment groups: All symbols/annotations maintain their meanings as in Figure 4 by UVA; thus, in these cases, no observation could be made on the seed coat effect.
For a* results for the visible light treatment, Figure 5 shows that dehulled samples from all seed-coat genotypes had significantly higher (p < 0.01) Δa* values than both their treated and control whole-seed counterparts. This shows that exposure to visible light resulted in a reduction in the greenness of green cotyledon lentils. It further shows that the presence of the seed coat reduced this effect for all seed coat genotypes. In the case of the black seed coat genotype, no significant change was observed versus the control for the whole-seed group. In contrast, whole groups of the other types did show a significant (p < 0.01) reddening versus the control, albeit less than their dehulled counterparts. So although all seed coat types were observed to provide protection against changes in the a* channel, only the black seed coat appears to have provided complete protection.
Changes in the yellowness-blueness (Δb*) values are shown in Figure 6. The b*-values in the control groups tended to change in a F I G U R E 6 Changes in b*-value in different seed coat classes and treatment groups: All symbols/annotations maintain their meanings as in Figure 4 F I G U R E 7 Changes in E*-value in different seed coat classes and treatment groups: All symbols/annotations maintain their meanings as in Figure 4 positive (yellow) direction, unlike the variety (CDC QG-3) used for the first study, where the b*-values changes were close to zero. Exposure to light treatments tended to switch the color changes strongly in the negative (blue) direction. This indicates that in the absence of light, these varieties may become yellower over time, whereas exposure to light turns them bluer.
Under the UVA treatment, none of the tested whole seeds were affected compared with the control, although the dehulled seeds were highly susceptible, indicating that all seed coat types provided protection to the cotyledon against UVA-induced changes in the b* channel.
The visible light treatment caused significant negative changes in all of the dehulled seed coat genotypes tested, with respect to both the dark control and their whole-seed counterparts. This indicates that all seed coat types provided at least some level of protection against cotyledon color change in the b* channel. However, some significant changes were observed in the whole seed gray and green seed coat groups, whereas no significant changes were observed for the black and gray-zero tannin types. The latter result was unexpected because the zero-tannin seed coat exhibits higher light transmission than the tannin-containing types (Jackson, 2020); however, the overall effect ΔE* (Figure 7) did follow the expected trend for this genotype.
Finally, the total color differences, ΔE* are shown in Figure 7.
Overall, there were significant color change differences between dehulled visible light treated lentil seeds and whole seeds (both visible light-treated and control) for all the lentil varieties. The overall color changes on the control group were large and above the MPD threshold of perceptibility, unlike the variety used for the first study. The observed changes were largely contributed to by a change in the b*values, which was opposite to the negative changes due to light. The factors/phenomena underlying these observations are open to further investigation. UVA only affected the varieties with black and green seed coats when dehulled; the seed coats in the whole seed groups significantly reduced this effect, and the cotyledon of whole seeds was not significantly affected by UVA.
As reported in Section 3.1, exposure to visible light caused significant overall changes in the color of green-cotyledon lentils. When whole seeds were exposed to visible light, the cotyledons of lentils with gray, green, and zero tannin seed coats experienced significant overall color changes compared with their control groups, whereas those with black seed coats did not. The overall color changes in the three varieties were larger than the MPD threshold (ΔE* ≈ 2.3) and considered perceptible (Mahy et al., 1994).
The seed coat of green cotyledon lentils was found to offer some protection to the seeds against photodegradation, especially from UVA radiation. Of the four seed coat types used for this study, only the black seed coat offered complete protection, resulting in no significant color change in any of the metrics. Normal gray offered some protection that resulted in no significant change in the L*-values of green cotyledon lentil; however, the other coordinates and the overall color change were affected. Overall, the order of protective effect of lentil seed coat from least to highest was found to be as follows: grayzero tannin, green, normal gray, and black.

| DISCUSSION AND CONCLUSIONS
A computer vision system was successfully applied to quantify color changes in cotyledons of lentil seeds exposed to light of different wavelength ranges. The results from the first part of the study investigating the effect of light on lentil cotyledons showed that color changes in green lentil cotyledons exposed to all light treatments were significantly different from color changes in the control and had large effect sizes. The color changes were visually perceptible under all light treatments, both as indicated by the overall color change being much higher than the MPD threshold and from visual observation. Thus, it was established that exposure of green lentil cotyledons to light results in photodegradation, leading to color loss.
For red cotyledon lentils, the effect sizes were small, and not all the light treatments resulted in significant changes in all color coordinates, in contrast to the green cotyledons. However, red, blue, green, and full-visible light significantly affected the cotyledon color of the seeds in one or more coordinate(s). The effect sizes on yellow cotyledon lentil were also small, albeit with significant UVA, full-visible, and green light effects on the L*-value; blue, fullvisible, and green light on the a*-value; blue, full-visible, and green light on b*-value; and all treatments except red light on overall color change.
This degradative effect of visible light on lentil cotyledons is notable, as it is usually UV light that is considered to be the chief culprit for photochemical action in materials (SCENIHR, 2012).
The second part of the study assessed the protective effects of different lentil seed coat types. The results revealed significant color changes in cotyledons (with seed coats removed) under visible light (with large effect sizes) and UVA (with smaller effect sizes). This effect was reduced when the seed coat was present, especially under UVA radiation. However, of the four seed coat types used for the study (black, green, normal gray, and gray-zero tannin), only the black seed coat offered complete protection, resulting in no significant color change in any of the color coordinates or the overall color change.
Overall, the black seed coat offered the best protection, followed by gray, green, and colorless zero tannin, in that order. This suggests that breeding for seed coat protection may improve the overall quality of green cotyledon lentils.
This exploratory study has revealed that the abiotic factor, light, does affect the color of the cotyledon of lentils and that, for whole lentils, the severity of this effect depends on seed coat type/pigmentation. To fully understand if this phenomenon takes place in the field, further study may be carried out under real field conditions and in the presence of the pod. For a more generalizable understanding of the effect of room/storage lighting on the seeds, further studies may be carried out under real storage/supermarket room lighting and conditions. The results from this study will be informative to breeding programs that focus on enhancing and preserving the cotyledon color of lentils, as well as for making decisions regarding the dehulling of lentils and the design of dehulled lentil materials handling.