3.1. Intensity Enhancement and Binarization
The first step in determining the characteristics of the most porous part of irradiated fuel pins is to isolate it from the less porous solid part, which can be performed through different types of image thresholding. A typical grayscale radiography image is shown in
Figure 2.
It can be seen that all fuel pins in this image have a varying degree of visible porous structure formed at the top. Also, four out of six pins in
Figure 2 have visible cracks, as well as other radiation-induced defects such as bending. The pixel’s intensity for grayscale images ranges from 0 (black) to 255 (white), and the intensity bar on the right shows the intensity scale of the image. The x- and y-axes on the image show the image dimensions in pixels. In addition to the images of the pins, the original image also contains a dark background as well as some auxiliary information such as a ruler, a plaque with pin numbers, and a logo in the bottom left corner. The ruler and pin numbers are relevant information; however, pixel-wise, they represent noise. The first step in image processing is to isolate regions of porosity on top of the fuel pins from the solid part of the pins. A very valuable tool for image analysis is an image histogram, which represents the distribution of pixels according to their gray-level values. Based on the histogram, the pixels’ intensity can be adjusted, and image contrast can be improved. The top panel A of
Figure 3 shows the image cross-cut along the magenta line in
Figure 1 for the raw and intensity-adjusted images. The pixel’s positions are plotted from left to right, with position zero corresponding to the top of the image in
Figure 2. Most pixels in the raw image have intensities between 200 and 250, and they correspond to the solid part of the fuel pin.
The dip in intensity close to the pixel’s position 6865 in panel A corresponds to a crack in the fuel pin. The pixels in the positions between 0 and 1000 in panel A of
Figure 3 correspond to the porous section of the fuel pin. The first step of analysis is to segregate the solid section, which accounts for the pins’ irradiation swelling, from the porous section, which is of interest for this study. This segregation process is called image segmentation and is usually accomplished using a preset threshold for pixel intensity values such that pixels with intensities higher than the threshold are counted as one object while pixels with lower values are counted as a different object. While it is obvious from panel A of
Figure 3 that setting the segmentation threshold at around an intensity value of 200 will separate the solid section from the porous one, the exact value of such a threshold is debatable. The segmentation thresholds are usually set by analyzing the image histogram [
16]. If an image contains pixels of different intensities belonging to different objects, those objects will be manifested as different modes on the image histogram. The histogram of the original image in the yellow rectangle cutout in
Figure 2 is shown in panel B of
Figure 3. Notice the log scale of the y-axis for the histogram plot. The histogram of the original image clearly has three modes: the high-intensity pixels with a mode value of around 230, the low-intensity pixels with a mode around 42, and the middle-intensity pixels with a smaller mode of around 130. The low-intensity mode corresponds to dark background pixels; the high-intensity mode is the bright pixels representing the solid part of the fuel pin, while the middle range mode is the gray pixels, the majority of which are the porous matter on top of the fuel pin. The edges between dark background pixels and bright pin’s pixels are also represented by gray pixels. The goal of the segmentation is to isolate the pins from the porosity on top.
Based on the histogram of the original image, the threshold selection is problematic as there is no clear cutoff pixel value that would separate the solid part of the fuel pin from its porous part. Applying automated threshold selection algorithms such as the Otsu method [
17] to the histogram of the original image results in the threshold value of 134, which places the threshold squarely in the middle of the histogram. To facilitate the segmentation, the process of intensity adjustment is applied to the raw image, which attempts to increase the separability of different objects by mapping pixels’ intensity values to new values such that the new intensity values are further apart. The middle panel B in
Figure 3 shows the effect of applying linear intensity adjustment to the part of the image shown in a yellow rectangle in
Figure 1. The bottom panel C of
Figure 3 shows the intensity-mapping function used to produce an intensity-adjusted histogram in panel B. For this study, a linear piece-wise intensity-mapping function was used, which requires selecting two cutoff values. The first is the low-intensity threshold below which the pixels’ intensity is set to 0 (black); the second one is a high-intensity threshold above which the pixels’ intensity is set to 1 (white). The pixels’ intensities between these two thresholds are mapped linearly into new values, as shown in panel C of
Figure 2. For this study, the low-intensity threshold was set to 128, which is around the middle-intensity mode shown on the original image histogram of panel B in
Figure 3.
The threshold was selected based on the desire to preserve pixels corresponding to the porosity as well as edge pixels from the pins. The threshold’s value was set after analyzing numerous histograms of raw images. The high-intensity threshold was set to 204, which corresponds to the flat portion of the image cross-cut shown in panel A of
Figure 3. The intensity adjustment can be considered as a “soft” thresholding as there is a range of intensities that are neither mapped into zero nor into 255. The histogram of the intensity-adjusted image is shown in panel B of
Figure 3. It can be seen that the intensity-adjusted histogram is stretched to the extreme values of intensity values, and it clearly has two modes: the lower mode placed at an intensity value of 0 and the upper mode placed at an intensity value of 255. This histogram stretching improves the image signal-to-noise ratio and allows the next step in image processing to be performed: image binarization. Image binarization is contrast enhancement taken to the extreme. Instead of using “soft” thresholding when some gray-level pixels are mapped with a linear function, image binarization applies hard thresholding to intensity values, values below the binarization threshold are set to zero, and values above the threshold are set to 255. The binarization threshold can be selected using the histogram of the intensity-adjusted image obtained in the previous step. Based on the analysis of intensity-adjusted histograms of radiographic images used in this study, the binarization threshold was set to 218 and applied across all images. An alternative approach is to apply multiple thresholds to the original image without the additional step of intensity adjustment. This process is known as image quantization. The effects of applying intensity adjustment, binarization, and quantization to a radiography image are shown in
Figure 4.
As can be seen from the two leftmost images in
Figure 4, the gray areas on the top of the fuel pins representing low-density and disintegrated fuel were blacked out by setting the corresponding pixels to zero, while the solid areas of the fuel pins were set to one. The rightmost image in
Figure 4 represents the effect of the application of two thresholds selected by the Otsu method. The two thresholds selected by the Otsu method had intensity values of 73 and 164. These thresholds parse image histograms into three sections: below 73, between 73 and 164, and above 164. Pixels with intensity values less or equal to 73 are assigned label 1, pixels between 73 and 164 are assigned label 2, while pixels with intensity values higher than 164 are assigned label 3. Having a labeled image allows the image to be displayed with different shades of gray, as shown in the rightmost image in
Figure 4. While the multi-thresholding segregates pins from the background and the fluff, it also creates problems, such as relegating many areas to the fluff label. The white color on the rightmost image in
Figure 4 is assigned to pins and has label 3; label 2 pixels are shown with a gray color, while the background pixels assigned label 1 are shown in black. It can be seen that along with fluff regions, the gray-colored label 2 is assigned to some auxiliary parts of the image, such as the ruler on the left. Some of those gray areas can be eliminated by cropping the image; however, the gray pixels on top have some features that will be very difficult to segregate from the fluff, such, for example, as wiring running along the pins and visible on top of the pins. For this reason, the two-step approach of contrast adjustment and subsequent binarization was adopted in this paper.
While image binarization is an effective tool for eliminating gray areas in the image, it cannot deal with small, isolated areas of high intensities, as shown in the center image in
Figure 4, where small bright areas are circled in yellow. Since those areas have pixel values higher than the binarization threshold, they will survive the operation of binarization, and their removal requires an additional step based on the size of the areas rather than pixel values. The pixels set to high intensities in these images are called foreground or object pixels, while the pixels set to low intensities are called background pixels. Finding connected areas of foreground and background pixels is the subject of connectivity analysis.
The connectivity analysis is used in this paper to achieve two goals: (1) identify and remove small, connected areas of high-intensity pixels from the image and (2) identify parts of the image representing the same fuel pin. The connectivity analysis algorithms used in this paper are described in [
18,
19].
In image connectivity analysis, two major pixel neighborhood connectivity diagrams are used: 4-connectivity diagrams and 8-connectivity diagrams, as illustrated in
Figure 5. For 8-connectivity analysis, the pixel is counted as connected to its neighboring pixels if the pixel is a foreground pixel and touches its neighboring foreground pixels along the edges or on the corners. If any neighboring pixel is a background pixel, it is considered disconnected from the pixel of interest.
The application of connectivity analysis to radiography images is described in our previous paper [
20]. The output of connectivity analysis is regions of pixels labeled as belonging to a single object. The value of each region labeling for the purpose of removing small areas of bright pixels is that after each labeled region is found, the total area of the region can be calculated, and the regions with areas smaller than a preselected threshold can be set as the background. The threshold was selected by analyzing the histogram of area sizes and set to 20 K pixels (i.e., all regions with a total area less than or equal to 20 K pixels were set as the background). The histogram of the area sizes demonstrated a bimodal nature, with one mode representing large regions and the other mode representing small regions. The 20 K threshold was in the valley separating those two modes and was selected as a cutoff value. It should be pointed out that the algorithm is not sensitive to increasing the values of the area threshold as the area of the pins is significantly larger than the area of the “fluff”. The results of applying area thresholding to the binarized image are shown in
Figure 6. As can be seen, the small high-intensity regions shown with yellow circles have been removed from the binary image, while the resulting image represents only the solid parts of the six fuel pins. In summary, image thresholding involves a selection of four thresholds: low and high thresholds for intensity adjustment, binarization threshold, and area-size threshold or morphological opening threshold. The first two thresholds are selected based on the analysis of the raw image histograms, as shown in
Figure 3; the binarization threshold is selected based on the analysis of the histogram of the intensity-adjusted image, as described above. Finally, the threshold to perform morphological opening is selected based on the analysis of the histogram of area sizes. After extracting the fuel pins from the image, we can now isolate individual pins using the same connectivity analysis and region labeling previously applied to the binarized image. The goal of this analysis is to isolate separate pins from each other and identify regions belonging to the same pin. A detailed description of this step is given in [
20].
3.2. Pins Localization
The output of the pins’ identification step is an image with bounding boxes for all pins and their parts. A bounding box is a rectangle that completely encompasses an image region and is used to describe a region’s location on the image. It is based on the extreme coordinates of an image region, and those coordinates are byproducts of the region labeling algorithm. Having identified bounding boxes for the fuel pins, we can also identify bounding boxes for the porosity region on top of the pins, as shown in
Figure 7. The porosity regions’ bounding boxes are simply extensions of fuel pins bounding boxes to the top edge of the image.
Figure 7 also has numeric labels for different identified pin regions. Due to pins cracking, some pins consist of disjoined regions; for example, pin T492, fourth from the right, has three different regions, while pin T408 consists of a single region.
Figure 6 shows a zoomed-in part of the top of
Figure 7 for a more thorough inspection of the bounding boxes. As can be seen in
Figure 8, the porosity’s bounding boxes start at the top edge of fuel pins boxes and protract vertically until the very end of the original image. Some original images have a white border around the image. If that border is part of the porosity’s bounding box, it is removed prior to further analysis. As can be seen, the original image in
Figure 8 has a border on top of the image. Horizontally, the widths of the porosity’s bounding boxes are the same as the widths of the pins’ bounding boxes. Some of the pins in
Figure 8 have their bounding boxes in the upper part wider than the pins themselves. This is because pins are not always placed perfectly vertically when radiographed and also due to pins’ irradiation deformations. In
Figure 8, the third and fifth pins from the right are distorted and have wider bounding boxes. Since the porosity’s bounding boxes are just extensions of pins bounding boxes, further image processing is required to extract pixels corresponding to the porous matter from the porosity bounding boxes.
3.4. Porosity Parameters
Arguably, the most important characteristic of the emerged porous matter is its span or length. Analysis of
Figure 9 and
Figure 10 reveals that the porosity consists of regions of different sizes and shapes represented as white pixels in
Figure 9. The leftmost pin T446 in
Figure 9 and
Figure 10 has a single porosity region occupying about one-third of the bounding box. On the other hand, the rightmost pin T447 has two large distant disjoint regions with a smaller porous blob between those regions. Other pins have porous regions of various sizes and spans. In view of these different appearances, two different measures of the length can be used. Both measures first find the porous region, which is the furthest from the bottom of the bounding box. Only regions passing the area threshold test are eligible for consideration.
After such a region is identified for each bounding box, the center of the mass of this region is determined using a centroid-finding algorithm. If each pixel is assigned a mass of unity, then the standard formula for a center of mass of a two-dimensional shape can be written as:
where
and
are coordinates of the center of mass,
is the total number of pixels in the region, and
and
are coordinates of
pixel. These coordinates are used to determine the length of the span of the porous matter within the bounding box for each pin. The length is measured as the pixel distance between the bottom border of the bounding box and the centroid’s
coordinate. The distance measured in pixels is converted to centimeters using the ruler present in each original image. This length can be called centroid length. On the other hand, the length of the porosity span can be measured as the distance between the bottom of the bounding box and the furthest pixel of the most distant porosity region. This distance is called extrema distance. The two distances can be different, as evident from
Figure 11.
The yellow lines in
Figure 11 are drawn through the extrema coordinates of the furthest porosity region, while white lines are drawn through the centroid coordinates. Notice that the centroid coordinates are always lower than the extrema coordinate, as expected. The largest difference between the two measurements is for the leftmost pin, T446. This pin has a single porous region extending from the bottom of the bounding box to the y-pixel coordinate of about 600. In this situation, the coordinates are far apart and produce significantly different results. On the other hand, all other pins have two different measures close to each other. The advantage of using the extrema coordinates is that they always measure the longest span of the porosity. However, it can also slightly overestimate the span when the furthest region is small, as in pins T486 and T408 (second and third from the left). Another reason for using two measurements for the length of the porosity is to provide a “sanity” check for calculations. While the two measures can be different, they must be highly correlated, and one of them must be consistently lower than the other. Such verification is very useful, as the sheer volume of processed images and pins does not allow for a detailed visual inspection of calculated results.
While being the most important characteristic of porosity, its span does not fully quantify such properties as volume, solidity, and shape. To account for these properties, the following parameters presented in
Table 2 were calculated for each pin separately.
While many parameters in
Table 2 are self-explanatory, the calculations involving the convex hull and extent may benefit from further clarification.
Figure 12 shows pin T447 with porosity regions, their corresponding bounding boxes, and a convex hull.
The total area of the porous matter is the area occupied by white pixels in
Figure 12. The convex hull is the gray area, which includes all the porosity regions. The bounding boxes for each porosity region are shown in yellow. For small regions, the bounding boxes look like yellow dots in
Figure 10. The area of the black rectangle is the area of the bounding box for all porosity regions. This is the box shown in green in
Figure 5 and
Figure 6. The second parameter in
Table 2 is the area covered by gray pixels, which also includes all white pixels. Solidity is the ratio of the white area to the gray area. Extent is the ratio of the porosity region’s area to the area of its bounding box, as shown in yellow. For example, for the porosity region in
Figure 10 with a y-coordinate around 400, the extent parameter is calculated as the ratio of the white area inside the yellow rectangle to the total area of the yellow rectangle. The extent is calculated for each porosity region separately, and the average value is taken to report as the extent parameter for a pin. The calculated porosity parameters were studied as functions of fuel composition, cladding temperatures, fuel expansion, and fuel burnup.