Development of a defect recognition algorithm for visual laser-induced damage detection

Laser-induced damage is defined as a permanent detrimental change in the characteristics of an optical element caused by a laser beam. This change can be observed by many different inspection techniques, of which optical and phase imaging microscopic techniques have superior sensitivity. However, such examinations conducted by human operators are relatively slow and subjective—so they cannot be used for online damage monitoring purposes, whereas automatic inspection systems have advantages in terms of sensitivity, reliability, and speed. In this paper we introduce a new method for the computer-aided recognition of damaged sites based on visual images taken from the sample surface by a CCD camera. The evaluation procedure is performed by a computer algorithm, which consists of exact, statistically established steps. It includes noise reduction by considering the statistical behavior of photon noise. Besides, it takes into account the spatial extent of a damage spot by nonlinear image filtering to separate damage-indicating intensity changes from random noise. This mimics the ability of the human eye to distinguish features from their surroundings. The evaluation algorithm is built of computationally less demanding mathematical operations to enable fast execution which is vital for monitoring at high repetition rates. The proposed method was tested on a sizeable dataset of images yielding 98.8% of damage detection efficiency. It was also compared to a generally used visual laser damage detection procedure, which has a success rate of 88.6%. This yields one order of magnitude reduction in the number of undetected damaged sites.


Introduction
The achievable peak power of laser systems is gradually growing. However, the finite power-handling capability of Original content from this work may be used under the terms of the Creative Commons Attribution 3.0 licence. Any further distribution of this work must maintain attribution to the author(s) and the title of the work, journal citation and DOI. optical components poses a serious limitation on this evolution. Beyond a certain irradiation level, the optics undergo an irreversible modification that can severely degrade their performance, which is collectively known as laser-induced damage (LID). The obvious consequences are beam distortion and increased diffuse reflection. Besides, more detrimental effects may occur due to light diffraction and intensification on the damage site. This can be hazardous to downstream optical components along the beam path. The latter phenomenon is also known as fratricide [1][2][3].
Nowadays optical components are routinely tested for their laser-induced damage thresholds based on a standard procedure [4]. Although the occurrence of LID cannot be ruled out as it is known to depend on numerous factors. These include spatial beam profile, pulse duration, and pulse repetition rateto name a few. Therefore, in-situ online monitoring of key optical components is important, especially for high energy applications, such as inertial confinement fusion or plasma physics (National Ignition Facility, Mercury Laser, Omega EP). Optical and phase imaging microscopic techniques have an advantage in sensitivity and reliability over other damage detection methods [5]. However, microscopic investigation is time consuming and subjective in nature if the images are evaluated by a human operator.
To overcome this limitation, the captured images are usually evaluated by a damage recognition algorithm [6]. The fundamental concept is the pixel-by-pixel subtraction of images taken before and after every single laser pulse, respectively [7,8]. Then the difference grayscale image is usually converted to a binary black and white image and after that, visible defects are discarded under a given size, as likely artifacts [9]. This procedure is well suited for automatic laser-induced damage testing of various optical elements. In such experiments, the location of the arising damage spot is known a priori, therefore a small field of view is sufficient where superior spatial resolution can be achieved. It was demonstrated that damage spots with a diameter of 1 µm can be readily detected at 20 Hz pulse repetition rate at 1-2 mm wide field of view [10]. On the other hand, for online damage monitoring applications, the whole aperture of the optical element needs to be observed simultaneously, which means the field of view needs to be larger by orders of magnitude. Therefore, the achievable spatial resolution would become significantly lower. For such cases, the above referred image evaluation procedure would be substantially less efficient as any defect would be covered by only a few pixels of the image.
However, the monitoring system does not necessarily need to resolve the defects themselves, it only needs to detect the light scattered from those defects [11]. This requires a high signal to noise ratio in order to clearly distinguish small defects from the intact surface area. A special complex edge illumination technique can be used for this task. If light is injected into the edge of the optic at the appropriate angle, it will be trapped due to total internal reflection, until the appearance of a flaw on the surface, which causes intense light scattering [12]. This allows the detection of damage spots with diameters down to half the size of the field of view of a pixel, whose size can also be estimated with precise calibration [13]. Albeit such sensitivity can only be achieved by specially designed optical mounts which include optical fibers used to couple light into the optic material. Therefore, its widespread application is very limited. There is another proposed evaluation algorithm called Local Area Signal-to-Noise Ratio (LASNR) segmentation [14] for spatially resolved defects. It calculates the strength of a signal of every pixel compared to the intensity variation of the neighboring pixels, thus it can effectively identify defect sites from the background. This procedure involves several computationally demanding steps, including calculations of local signal to noise ratios for different object sizes, finding the suspicious pixels that indicate the presence of LID spots and performing adaptive filling to determine the spatial extent of the defects. This makes it rather sensitive but also time-consuming to operate, which limits its application to single pulse laser systems.
In this paper we introduce an alternative approach to automatic image evaluation. The aim is to develop a machine vision tool which is capable of recognizing small damage spots while constantly monitoring a large area-comparable to the clear aperture of an optical element. That is, it shall have the potential for real-time monitoring of optical elements in an operating laser system, in order to identify performance limiting laser-induced defects. Unfortunately, the majority of conventional machine vision and object recognition algorithms are not suitable for this task, since damage spots generally do not have a well-defined shape, especially if inspected at low spatial resolution. Moreover, their small, amorphous appearance resembles certain types of common image noise. Therefore, many traditional noise filtering algorithms would remove such features as erroneous detections [15]. We aimed to develop a sensitive, yet relatively simple algorithm considering the peculiarities of visual damage detection. For the development and testing of the evaluation procedure, data was collected experimentally. The experimental setup is briefly addressed in the following section, while the evaluation algorithm is presented afterwards in detail. In the Results section we test the sensitivity and reliability of the method on a large dataset. Then we discuss the results comparing the sensitivity of the proposed method to a generally used image evaluation procedure and finally conclude the article.

Experimental conditions and limiting factors of imaging detectors
In order to develop a suitable damage recognition algorithm, a thorough data collection must be performed for comprehensive testing of the numerical evaluation method. Besides, a well-established independent measurement device is needed to validate the proposed approach. Our measurement was performed under the guidance of international standards regarding 1-on-1 LIDT measurement [4]. According to these, the latter requirement can be fulfilled by a Nomarski differential interference contrast microscope ( figure 1(b)). Besides, the number of the individual single shot tests was set sufficiently large to accurately determine the sensitivity of the data evaluation method as well as to get an estimation on the probability of false detection.
Our test setup was built around a Ti:Sapphire chirped pulse amplifier system as a damage inducing light source, emitting ultrashort pulses of 30 fs duration ( figure 1(a)). Pulse energies were monitored with a calibrated photodiode and adjusted using a variable reflective neutral density filter. Single pulses Reference measurement setup utilizing raster scanning by a slow but more sensitive Nomarski-type differential interference contrast microscope.
were selected from the pulse train by a synchronized optical shutter (Thorlabs SH05). Damage tests were performed using a 1-inch diameter dielectric mirror sample with appropriate coating for the damage inducing laser wavelength and incidence angle. It was placed at the focal plane of an achromatic lens focusing the beam waist to 0.25 mm. The sample was mounted on a translator stage in order to position the specimen in the XY plane between test shots. An objective lens with the spatial resolution of 2.9 µm (Optem zoom 70xl) mapped the image of the sample mirror to a CCD camera (Prosilica EC1380) possessing 1.4 million pixels. This optical arrangement had 0.5-inch-wide field of view while providing an image resolution of 10 µm pixel −1 . A coloured glass bandpass filter absorbing at the wavelength of the laser was inserted in front of the objective lens, to protect the detector from scattered light. A high power LED light source was aligned off-axis to provide darkfield illumination of the specimen. This way damaged sites appeared as bright spots in contrast to the dark background. This light source provided highly stable illumination over time, which is important in order to minimize the intensity fluctuations over the acquired images.
Beyond the detection setup, the capabilities and limitations of the camera have a significant impact on the sensitivity of detection. The sources of the noise present on a digital image can be divided into two main categories. The first one is generated by the detector itself and includes dark current, read out noise, amplifier noise and quantization noise [16]. Modern scientific cameras have low noise characteristic which can be further improved by cooling to suppress dark current. The second source is called photon noise, which is an inherited property of light owing to its quantized nature, which cannot be reduced by the detection technique. Photon noise is known to follow Poisson distribution, which results in brighter pixels with higher intensity variations. This means that darkfield images have a lower overall noise level compared to ones captured at brightfield illumination. Even if dark field illumination is applied, some bright pixels may be present on the image due to previous shots during an LID measurement procedure or scattered light from the edge of the sample. This is illustrated on figure 2(a) showing a typical image of the sample mirror obtained during the experiment. These bright areas undergo significant random intensity variations (see figure 2(b)) and may cause spurious detections.
To this end, the detected intensity changes of every pixel were compared to the expected fluctuations produced by photon noise during the evaluation procedure, as described in the next section.
To test the efficiency of the automated evaluation procedure, a reference measurement was performed, as mentioned earlier. The whole surface of the sample was scanned using a Nomarski differential interference contrast microscope (Nikon Eclipse Ti-U), utilizing a motorized stage (SCAN IM 120 × 100) prior to and after the experiments ( figure 1(b)). Microscopic images were acquired using a Retiga SRV CCD digital camera and Image Pro 7 image analysing software. This is the conventional standard procedure for offline laserinduced damage detection, featuring small field of view (0.5 mm × 0.5 mm) but high sensitivity. Every irradiated site was identified on the microscope images, both before and after the LID experiments. This comparison provided a highly reliable and independent reference.

Data evaluation procedure
In this section we introduce the proposed image evaluation algorithm. We took as a basis the widely used image subtraction method, where images acquired prior to and after the incident pulse are subtracted from each other pixel by pixel [8,10]. In an ideal case, this basic evaluation step highlights the changes the target has undergone. In practice, however, the intensity change caused by the damage spot needs to significantly exceed the noise level in order to be reliably attributed to a damage event. Therefore, faint damage spots cannot be readily detected. To overcome this limitation, we introduce additional steps to the evaluation workflow to extract additional information from the images. The basic idea is to identify spatial clustering of bright pixels in order to differentiate real features against random noise. Laser-induced defects appear as clustered bright pixels on the image, if the imaging system has sufficient spatial resolution. While 'noisy' pixels have stochastic spatial distribution across the image, thus it is unlikely to be adjacent to each other. By using a suitable spatial filtering mask, the contrast of real features can be greatly enhanced. Specifically, in the difference image the intensity of every 'suspicious' pixel is multiplied by those of its neighboring 8 pixels (3 × 3 spatial mask). The minimum number of adjacent pixels was used to maximize the spatial resolution. The filtering operation is flexible in that a faint but spatially extent defect can be detected as well as a spatially not resolved damage spot if it shows significant intensity change compared to the background.
We chose this computationally simple nonlinear filtering mask instead of mathematically more complicated morphological operations [15]. Keeping the necessary calculations to the minimum is important to facilitate quick evaluation, which is a crucial issue in online damage monitoring applications. Here, the computational steps of the evaluation algorithm are presented in order of execution, illustrated by figure 3.
(a) The noise of the recorded images is reduced by averaging several frames. Five images were acquired before and additional 5 after the incidence of damage-inducing laser pulse to the sample. Their respective averages are used in further evaluation steps ( figure 3(a)). During a damage monitoring application, a trigger signal can be used to track the incidence of the laser pulses and address which image was taken before and which after the irradiation. According to our test data, this step reduces the average noise level by 3 orders of magnitude. (b) In the second step the two averaged images taken before and after the incidence of the laser pulse are subtracted, on a pixel by pixel basis. We took the absolute values of the difference in pixel intensities ( figure 3(b)). This operation incorporates an important noise-reduction technique of dark-field subtraction, aiming to mitigate fixed pattern noise, such as defective 'hot' pixels. Therefore, further correction using dark frames was not performed to save image acquisition and evaluation times. (c) In the third step the algorithm selects the 'suspicious' pixels in the difference image that may indicate the occurrence of damage. Specifically, we only process those pixels in the following steps which showed more intensity change than the standard deviation of the brightness level. By restricting further calculations to only a relevant subset of pixels, computation times can be reduced and the signal to noise ratio can be improved. We assume that the random intensity fluctuations of the image are dominated by photon noise. Photon noise is known to follow Poisson distribution (standard deviation is equal to the square root of the mean value). Calculating a square root value is computationally less expensive than computing the standard deviation of a set of values. With such approximation, a faster execution of the algorithm can be achieved ( figure 3(c)). (d) The next step of the evaluation procedure applies nonlinear image filtering for contrast enhancement. This operation multiplies the intensity of the previously selected 'suspicious' pixels of the difference image with those of the directly adjacent 8 pixels. This approach allows to discriminate real damage features from random intensity fluctuations. Multiplication of intensity values from even a small faint defect will result in a high numerical value compared to image noise (figures 3(d) and (e)). (e) In the final stage the pixel grey values-that were modified in the previous step-are summarized across the image.
We will refer to their sum as Damage Indicating Value (DIV). This numerical value is an indicator of the total observable modification to the sample. This originates from two sources: sample degradation by laser-induced damage and detection noise. During the evaluation procedure, DIV values are compared to a pre-defined critical level to decide whether the sample is damaged or not. The next paragraph deals with critical level assignment in detail.
The critical level is related to the noise level. The magnitude of noise can be estimated by performing the above evaluation procedure on a statistically significant number of images that were recorded in identical circumstances as the rest of the measurements-with the exception that no laser pulse should fall onto the target. By performing a series of these 'fake' measurements, one will obtain the distribution of the effective noise level. Besides, different critical levels can be selected depending on the required confidence level of the measurements. The higher this level is, the less likely that we obtain a false positive damage detection (i.e. the algorithm indicates damage without any physical change to the sample).
On the other hand, increasing the critical level will lower the sensitivity of the detection, since small observable changes will be omitted. The critical level can be assessed using Chebyshev's inequality, which is a general rule for probability distributions. It states that no more than a certain fraction of values can be more than a certain distance from the mean. It has the advantage that it can be applied to arbitrary distributions, provided they have a known finite mean and variance. If the critical level is selected to be equal to the average noise level (µ) plus k times its standard deviation (σ), the possibility of false detection will be less than 1/k 2 [17,18]: Here P stands for probability and x is a random variable with a given mean (µ) and standard deviation (σ). For example, if the confidence level is chosen to be 99% (= 1 − 1/k 2 ), then k equals 10, therefore the critical level (the upper bound of the confidence interval) is µ + 10 σ. The values of µ and σ can be derived from the measured noise distribution.

Results
Here we present the results of applying the above described evaluation method on our test images. The results of automatic damage recognition were compared to the reference measurements using Nomarski microscopy. In figure 4 the derived Damage Indicating Values are plotted against laser peak fluence for each individual measurement. As the fluence increases, more drastic deteriorations take effect on the sample and the damage spots become larger, resulting in an increasing tendency in DIV. Damage Indicating Values are plotted in two colours: dark green dots indicate those cases where damage occurrence was confirmed by posterior microscopic observations. Those occasions where the absence of sample degradation was proved are marked with light blue triangles. The two groups are well separated from each other, so the observations were properly categorized with the exception of a few occasions. The average noise level is indicated in purple and its standard deviation is shown as an error bar. In this example we set the confidence level to 99% and the critical level is denoted by a dashed line. As it can be seen on the figure, the vast majority of DIV ratings connected to the proved damage occurrences exceeds this limit. This means that the algorithm has successfully detected the presence of the damage to the sample mirror. However, three dark green symbols are located below the selected critical level, which shows that damage recognition was inadequate in these cases. Numerically, a total of 260 instances of LIDs were recognized out of the 263 cases that were visible through the Nomarski microscope. This yields a 98.8% damage detection probability. Besides, at 37 test shots the sample did not suffer any impairment. All of these cases were correctly classified as non-damaged by the evaluation algorithm.
To illustrate the feasibility of our proposed image evaluation procedure, figure 5 shows the appearance of the smallest defect captured by the algorithm, as seen through a Nomarski microscope and as it appears on the image recorded by the camera in the online setup. Note that this small damage spot caused a brightness change of a maximum of 3 ADU in the latter image. However, there are on average 45 pixels per image which show at least that much intensity change due to detection noise (see figure 2(b)). Even though by the noise mitigating techniques and the weighting by the local surroundings of the bright pixels, the algorithm was able to discriminate this small damage spot from random intensity fluctuations.

Discussion
As briefly described in the introduction section, other mathematical image evaluation procedures have been reported in the literature [6][7][8][9][10]14], aiming to recognize laser-induced damage spots on camera images. The basic idea in many of these approaches is the subtraction of images taken before and after the incidence of the damage-inducing laser pulse. To compare and quantify the sensitivity of our proposed evaluation method, the most widely used evaluation algorithm was tested on our images. The sensitivity of this image-recognition procedure was also compared to the detection capability of the Nomarski microscope scan. A typical image-subtraction method utilizes the following steps [8,9].
(a) The image taken after the incidence of the laser pulse is subtracted from the image taken before it. (b) The obtained difference grayscale image is converted to a binary image. (c) The binary image is filtered to remove small clusters of bright pixels as these are possible artefacts. (d) The remaining bright pixels of the resultant image are considered to be real damage spots.
These steps were applied on the images that were captured in the online experimental setup at full field of view ( figure 1(a)). For unbiased comparison we used the same averaged frames as input (step (a) of our procedure).
Step 'a' is the same as step (b) of our algorithm. In step 'b' grayscale images can be transformed into binary images by setting the pixel values to 1 or 0 depending on whether they are above or below a predefined threshold [15]. be seen that on average, 1 ± 1.3 pixels per image show intensity changes of at least 4 ADU. Therefore, if at least 5 pixels show intensity changes exceeding 4 ADU, one can attribute this to a damage event with high confidence (3 σ = 99.7%). Accordingly, pixels having intensities of at least 4 ADU are converted to foreground (intensity = 1), while the rest is set to background (intensity = 0) in step 'b'. This way, if a binary image contains 5 or more bright pixels, it is considered as an indication of a damage event (step 'c' and 'd').
The result of the well-known image evaluation procedure [7][8][9][10] was compared to an offline Nomarski microscope investigation (figure1(b)) to address its sensitivity by an independent detection method. This shows that the conventional algorithm could detect laser-induced damage in 88.6% of the cases, while it showed no erroneous positive detections. This means that it fails to identify a damage spot in 11.4% of the cases, whereas our proposed evaluation procedure proved to be much more reliable, with a failing probability of only 1.2%. Note that the current results are conservative because in a real monitoring application the optical component will not bear surface flaws from previous damage tests, which are the by-products of LID test measurements. Thus, the noise level is expected to be lower.
In many automatic image evaluation applications it is common practice to convert the recorded pictures into black and white binary images to separate relevant foreground objects from the background [7,10], as in step 'B' of the above procedure. It has the benefit that two-level images require less memory space and further computations can be performed much faster using Boolean operations. On the other hand, selecting appropriate threshold values for binarization can be difficult and often arbitrary, which may yield biased results. Moreover, the true intensity values possessed by grayscale images are lost, which information otherwise could be used to enhance the damage recognition capability of the procedureas demonstrated by the proposed evaluation method.
The Nomarski method still has superior sensitivity at this magnification compared to algorithmic image evaluation, at the cost of small field of view. Thus the sample surface needs to be raster-scanned, which is a time consuming procedure. Therefore, this approach cannot be readily applied to online monitoring of the full aperture of an optical element that is built in an operating laser system. This is a clear benefit of the computer-aided image evaluation procedures over offline microscopic scanning. In our experiments a 1.4 Mpx resolution CCD camera was utilised which monitored a 0.5 inch × 0.5 inch area of the sample surface. The relatively low resolution camera was used only to test the viability of the method. The algorithm was implemented in Matlab and it can be executed in 0.4 s using a PC with an i5 processor on the images acquired during a single-shot experiment. For larger optics and/or better spatial resolution, multi-megapixel cameras are nowadays commonly available, and calculation speeds can be improved by implementing the code in a more optimal software environment and by using dedicated hardware, such as field-programmable gate arrays (FPGA).

Conclusions
In this paper we introduced an advanced visual defect recognition algorithm for automatic laser-induced damage detection. One addition to the conventional detection method is a noise mitigation subroutine, designed to suppress photon noise without eliminating any visible real features of the sample. Secondarily, a nonlinear image filtering mask is used which multiplies the intensity change of the central pixel by the intensity changes of the directly adjacent pixels.
As a reference measurement, the sample was inspected by a Nomarski-type differential interference contrast (DIC) microscope [4]. The images evaluated by our proposed algorithm yields 98.8% damage recognition efficiency compared to Nomarski microscopy. Besides, a widely used image evaluation procedure was tested on the same set of images, and it was able to detect the laser-induced defects in 88.6% of the cases. This means a 1.2% chance of failure in detection efficiency of the algorithm presented herein versus the 11.4% failing probability of the conventional algorithm. We provided a statistical estimation on the probability that a given defect could be detected, as well as on the likelihood of false recognition. By the choice of a higher confidence level, the possibility of false detections can be reduced at the cost of lower sensitivity and vice versa (see equation (1)). This gives the method the flexibility to tailor its sensitivity versus reliability for the needs of the application at hand.