# Real-Time Detection of Overloads on the Plasma-Facing Components of Wendelstein 7-X
## 3 Image Analysis
### Image Processing Pipeline  
Prior to the analysis of the thermographic images, the acquired images have to be calibrated. This includes applying a non-uniformity correction (NUC), bad pixel interpolation, and temperature conversion, using Planck's Law to convert from photon flux to temperature. This conversion requires the true emissivity value of the imaged surface. The scene model provides for each pixel the nominal emissivity value of the target PFC. The nominal emissivity, however, has to be corrected during operation because of the erosion and re-deposition of the target material or deposition of other impurities. An emissivity correction map provides this correction factor. Initially, it will be updated every week, but we may adjust this periodicity depending on how fast the emissivity changes significantly. We can perform the measurement of the new emissivities when the machine is in thermal equilibrium by observing the differences in the apparent temperature of the surfaces. This correction procedure can also be triggered automatically if these differences in the apparent temperature are above a certain threshold.  
Figure 6: An MTCA-based (Micro Telecommunication Computing Architecture) frame grabber acquire the infrared images and synchronizes them with the W7-X universal time. The raw images are transferred to the Image Analysis System, a set of real-time computers, one for each camera, that calibrates and analyses the infrared data. The video streams are analyzed through computer vision techniques to detect overloads. When the integrity of the PFCs is compromised, the system triggers the Interlock. We will implement some of these algorithms on a GPU to speed up computation. The detected overloads and alarms are sent to the Thermal Event Monitoring system in the control room and registered into a database, the Archive, and the Logbook for future reference.  
The overload detection algorithm then analyzes the calibrated images (see Section 3.3 for in-depth details). This algorithm evaluates the risk of overload for each PFC considering the current heat flux, the maximum operational temperature of each component (also provided by the scene model), and the presence of surface layers. If there is a risk of overload, the interlock is triggered.  
Because of carbon erosion, thin surface layers can develop on the PFCs because of re-deposition. They show as high-temperature hot spots because of their low thermal capacity and their poor thermal connectivity to the bulk of the tile and the cooling system. They do not pose a risk to the PFCs integrity but they may be a source of false alarms [12]. We update periodically a surface layer map to aid in the thermal event risk evaluation. We construct the surface layer map from dedicated discharges with special modulated heating. A train of pulses can be used to measure the time evolution of the surface temperature. The different hot spots respond differently because of their different thermal capacities and conductivities. The normalized temperature decay time is a discriminative feature that it is used to detect surface layers and delaminations [13].  
We summarize the image analysis pipeline from the image acquisition to the interlock activation in Figure 8.  
Figure 7: The scene model is a multi-channel image matching the camera field of view, each channel providing different PFCs properties for each pixel: identifier, material, emissivity, heat flux limit, temperature limit and pixel resolution.