{'fraction_non_alphanumeric': 0.025247462723969428, 'fraction_numerical': 0.00776845006891367, 'mean_word_length': 5.053469852104665, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Non-destructive Detection for Irradiated Apple using Image Processing

This paper proposes a nondestructive method for detecting irradiated apple rather than the previous destructive method known before such as analytical methods; Chemical, Physical and Biological methods. Image processing technique was applied for rapid and nondestructive detection of irradiated apples. Color intensities, smoothness and uniformities were extracted and analyzed to correlate these color features of apple samples with its values before radiation. ANOVA analysis showed significant differences between both irradiated and un-irradiated apples sample. Linear discriminant analysis (LDA) was utilized for HSV data analysis. Results indicated that it was possible to detect irradiated food with good accuracy using imaging processing technique with an overall success rate of approximately 85%. The proposed method is cheap and less complicated which in turn saves time and effort. Consequently, it overcome the disadvantages of other analytical methods that are complex, costly and destructing the samples.


INTRODUCTION
In fact, radiation is invisible, has no smell, and makes no sound so it cannot be detected by any of human senses [1]. On the other hand, the quality and safety are indispensable factors among the evaluation criteria that evaluate the consumable fresh fruits and vegetables. The food quality includes external factors such as appearance (size, shape, color, gloss, and consistency), texture (firmness, crispness and toughness), flavor (sweetness, sourness) [2], while the safety includes using the irradiation to improve the microbial safety.
Irradiation of food is a technic for dominating spoilage, removing the foodborne pathogens and killing hurtful bacteria, parasites and pests. Therefore, the irradiation process minimizes the microbial contamination grade of food, which in turn leads to enhance the shelf life and to maintain their freshness [3]. The ionizing radiation (i.e. X-rays, gamma rays and electron beams) is the energy source which is used for destroying the microbes during the irradiation process via exposing the approved foods to that energy at suitable radiant level [4]. Since 1963, the Food and Drug Administration considered the irradiated food to be safe, while not all consumers approve it. Moreover, some other countries approve irradiation only on particular products [5].
In order to check that the food irradiation process comply with situated regulations, there must be a method for identifying the irradiated foods. This will open the opportunity for the consumers to freely choose what they believe it is good to use. Besides, the existence of such detection methods will facilitates the foods international trade. [6].
The existing detection methods for irradiated food could be categorized as three classes, which are the physical, chemical and biological methods Error! Reference source not found. [6,7].
Last years, the evaluation of food quality can be accomplished using image processing techniques with great potentials such as ensured consistency maintained accuracy and reduced need for manual inspection of foods [2,8].
Also, image processing can be efficiently used as a nondestructive technique for damage identification and sorting of fruits. Apple is the common fruit have been used by major researchers since it can be considered as a strategic fruit in fruits and vegetables market [9][10][11][12]. From the basic features of the gamma-ray it does not change the external shape of the fruit after exposure to radiation. Therefore, this paper proposed a non-destructive method for detecting apple exposure to radiation based on the apples' color evolution and grading using RGB cameras. To the best of our knowledge, there is no published study about discrimination of irradiated apple using the standard imaging system (RGB) rather than our non-published master thesis [13]. Afterward, a noninvasive method for discriminating E-beam irradiated shrimp is introduced in 2016 [14]. That method depend on textural properties of images acquired from multispectral imaging system.
The main contribution of this paper is to develop a rapid and noninvasive framework that could be utilized for irradiated apple discrimination with regular imaging system which we believe that it is highly desired. The paper targeted to investigate three fundamental issues were to: (1) studying the effect of exposure the apple to different doses of gamma rays on the textural property; (2) study the practicability of regular imaging systems to capture essential properties that enable the distinguishing the irradiated apples from the non-irradiated ones; (3) finding out if this experiment data are significant and sufficient by using ANOVA test. This paper has proved the changes between the color intensity of the sample before and after exposure to radiation dose in the same day. The experiments are done on apple images before and after different doses of gamma rays. Statistical calculation is utilized for extracting the color changes and converting them into features vectors. Also, it has showed the capability of the proposed technique for using the same set of samples to sort apples corresponding to irradiation conditions. The paper is organized in 6 sections as follow: section 1 introduces the problem and recent researches in the field. Section 2 explains the proposed algorithm, while section 3 shows the sample acquisition system and experiment environment and design. Section 4 demonstrates the experiments and used techniques, then section 5 presents the acquired results. Finally section 6 concludes the main paper results and recommendation. Fig. 1 shows the algorithm flow chart indicating the steps followed in this experiment. The algorithm consists of five main steps:

PROPOSED ALGORITHM
Step 1: Image Acquisition to gather the images from 3CDD camera before and after radiation at different doses of gamma rays.
Step 2: Image enhancement to prepare image for deep analysis.
Step 3: Object extraction to separate the object from the background.
Step 4: Color Feature Extraction using different color models.
Step 5: Classification using extracted color feature to detect the irradiated apple

MATERIAL METHOD 3.1 Sample Acquisition and Gamma Ray Irradiation
Golden apples areobtained from local markets and stored at regular refrigeratorwith temperature (4°C). Each individual apple, showsdifferent color variations which may resulted from different environmental growth conditions causing variations in ripeness and pigmentation. Thirty two apples; without any visually identifiable physical defects, were randomly selected for imaging. In order to constitute a range of the natural color variations.The fifteen apples were organized in six groups. The safety [15] The different groups are irradiated with 0kGy, 0.5kGy, 1kGy, 1.5kGy, 2kGy and 2.5kGy respectively Error! Reference source not found. [16]. being 0 kGy the non-irradiated, the control sample.The experiment is performed at the "Gammaray Research Units" with the "National Center for Research and Radiation Technology" (NCRRT) where the Cobalt-60 is used as radiation source.

Experimental design
Each group consists of three apples and each apple is labeled with a sticker indicating its number and radiation dose group as shown in Fig. 2. An imaging system was assembled for gathering apple samples, which is shown in Fig. 3. The system consists of a high performance three Charged Coupled Device (3CCD) camera (Sony cyber-shot W200).

EXPERIMENT
Three images are captured for three different sides, right and left and behind the label of each apple. So there are nine apple samples for each group, with total 45 different apple sample image. For each apple, the image sample is taken before and after radiation. The image was saved in RGB model with 2048*1536. Visually there is no difference between apple samples, so an image processing method is used to detect the coloring profile changes.

Preprocessing and Object extraction:
Firstly, the image sample is enhanced to prepare the image for further operation by removing the noise using Median filtering.
Secondly, the saturation mask is used to extract object (i.e. apple) from background using saturation mask as shown in

Figure 4 Object Extraction
The image histogram is plotted for the extracted apple image before and after radiation in the same day. As shown in Fig. 5. The horizontal axis of the graph represents the tonal variations, while the vertical axis represents the number of pixels in that particular tone Error! Reference source not found.. The left side of the horizontal axis represents the black and dark areas, the middle represents medium grey and the right hand side represents light and pure white areas.
The histogram acts as a graphical representation of the color distribution in an apple image. It plots the number of pixels for each tonal value. By looking at the histogram for a specific apple image before and after radiation, the entire tonal distribution is changed by a significant difference. The histogram gradient difference of irradiated apple than nonirradiated apple is occurred due to color degree gained from radiation, which isn't noticed visually.
The maximum intensity occurred at lighter color in "apple before radiation" histogram while the maximum intensity occurred at darker color in "apple after radiation" histogram. The histogram of the irradiated apple appears as left shifted of the non-irradiated apple. This shift is increased with the radiation dose.
In other words the radiation change the color intensity value of the apple by making the color value more contrast due striation process resulted from radiation. The color gets more contrast with increase the radiation dose.

Feature Extraction
A classification algorithm must be described to separate the radiated from non radiated apples. This algorithm is depending on color intensity change.
There is a need to ensure that changes in the apple image come only from the radiation process not from the illumination of the associated imaging process Error! Reference source not found.. Unlike RGB imaging, HSV imaging separates the image intensity from color information.
In computer vision, there is often a need to separate color components from intensity for various reasons, such as robustness to lighting changes, or removing shadows. Besides the HSV color space, where the intensity component is only considered, the imaging process will occur in dark place depending only on the Camera flash as source of light.
Specifying the color intensity change of the apple image is an important step towards building mathematical models. The intensity variations in an image which characterize texture are generally due to some underlying physical variation in the scene.
Modeling this physical variation is very difficult, so image is usually characterized by the variations in the intensities present in the image, using a statistical approaches Error! Reference source not found..
Some image parameter was chosen Error! Reference source not found. and calculated using 45 apple image. These parameters are mean intensity, smoothness and uniformity which are described in equations (1, 2 and 3) respectively. (1) Where I is the mean intensity, zi is random variable denoting intensity, P(zi), i = 0,1,......,L-1, is corresponding histogram, L is the number of distinct intensity level, S is the smoothness, and U is uniformity. Equations (4 and 5) describe the variance (σ2 ) and the mean (µ). These color features, (mean intensity, smoothness and uniformity), are calculated using saturation component of HSV color model for the two species. These two species are the apple sample before and after exposed to radiation dose. A 3D subspace of the features space is shown in Fig. 7, which presents a clear separability with slight overlap between the two species and small error rate.

Discriminant Analysis
Linear discriminant analysis (LDA) was used for classifying HSV data of the apple images by the groups indicated in section III. Leave one-out cross validation method was considered to validate the classification model. Each time, one sample was taken out and LDA was established for the remaining samples, and the model was then used to predict the sample left out. Thereafter, the sample was placed back into the model, and another sample was left out. This procedure was repeated until all samples had been left out once.

RESULT AND DISCUSSION
The average intensity values of each sample are presented in 2-d view versus the group (Fig. 8). Color evolution is represented by a clear tendency in the average intensity values. The values of intensity were in the range from 8.2×10 4 to 10.4×10 4 , being the higher values from the apples that exposed to radiation.

Statistical analysis of measurement results
Before carrying out any further analysis, the numbers of different groups of the experiment were evaluated by ANOVA, an analysis of whether or not the means of defined groups are all equal. ANOVA is used to determine significant differences between treatments and intensity regression, to evaluate the radiation dose-response. All data were reported as mean, standard deviation and statistical significance was judged at the level P≤0.05 as shown in Table 1. As the analysis was statistically significant, LDA Test was used to test mean separations among mean values of each treatment.
ANOVA table contains the estimates of the S among , which is calculated by sum of squares.S within , which is calculated by mean of square and F-value. The test statistic for an ANOVA is called an F-value. The F-value for an AVOVA is calculated using thefollowing formula: Where a is the number of groups and n is the number of observations within each group.The decision rule again depends on the level of significance and the degrees of freedom (D.F.). The F statistic has two degrees of freedom P-value ranges from 0 to 1, and it is the probability of calculating a given test statistic assuming that the means of your groups are identical. The larger the test statistic is, the lower the chance (P) that an observed difference among groups is due to chance environmental variation, and the greater the chance that a difference has biological causation.

Classification of apples samples according to color
LDA is a tool that provides automatic object classification Error! Reference source not found.. It finds optimum boundaries among classes by maximizing the ratio of between-class variance and minimizing the ratio of withinclass variance. Color intensity of saturation values from HSV images were used as input to LDA. Table 2 shows the classification results in the form of a confusion matrix ( Table  2).  The numbers of correctly classified groups are shown on the diagonal, whereas off-diagonal numbers denote misclassifications. Percentage of correctly classified samples of the model was is approximately 85%.

CONCLUSION
RGB models developed showed firstly that color evolution during radiation process can be quantified in apples with RGB digital cameras; and secondly that color evolution is changed with the increase the radiation dose.
The ANOVA test shows statistical significance difference between multiple sample means before and after radiation process. The irradiated apples could be classified from nonirradiated apple with approximately 85% correctly classified samples.
The qualitative power of the technique joined to the possible quantitative analysis will have to be considered in the future. The conclusions reached by this study promote further research in order to evaluate discriminative potential in case of bigger and more variable set, that is, different varieties (two color and one color apples), longer storage periods, and ontree conditions, with even less stable light condition, including other quantitative parameters