
Atomic Defect Detection
Video analysis of a heat-treatment simulation
ABSTRACT
In this project, I will attempt to identify regions of defects in lattice structures. By using techniques like Delaunay triangulation and Voronoi tessellation, I will estimate the coordination number and coordination sphere to pinpoint the areas of defects.
Introduction
Given the image of a lattice structure, it might be easy to visually detect some of the glaring defects present in the material, but it’s not always so easy to pinpoint some of the areas of fault. It becomes even more difficult to do this algorithmically.
The problem becomes easier for humans to detect these defects if a video of the heat-treatment process is provided, as we are able to better pinpoint areas that change significantly over time.
In this blog post, I’d like to showcase one of the methods I used to attempt this problem.
Source Material
For the problem, an excellent video by Steve Mould1 came across my YouTube feed.
In this video, Steve Mould shows what happens when a material is heat-treated and how the amount of defects present in a material can be reduced through this process.
He used a bunch of ball bearings that were contained between two sheets of glass to represent a 2D cross-section of the material. The gap between the glass sheets was just slightly bigger than the diameter of the ball bearings to allow movement of the bearings while keeping it tight enough so that the ball bearings do not move significantly perpendicular to the 2D plane.
To simulate the heat-treatment process, a small vibrating motor was attached to one of the corners of the setup. This added energy to the system, which simulated the thermal energy each atom possessed. The motor could control the amount of vibration, which in turn helped him control the temperature of the model.
I’ve used a small snippet from the video for my analysis.
Initially, a high temperature (more vibrations) is set, which is gradually decreased, simulating the heat-treatment/annealing process of materials. From his video, it was easy to see that the amount of defects, be they point or line defects, were reduced gradually as the treatment progressed.
Taking this video, I’d like to do some processing to make it easier to pinpoint the areas of defects in the material.
1. Finding the Centers
The first step was to find the locations of all the atoms in the video. In the model, the model was illuminated from the back, which created shadows and dark regions wherever an atom was present.
1.1 Conversion to B/W Image
To find the location (of the center) of an atom, I first used a threshold and converted the image into a black and white image. The regions where the atoms were present created dark regions.
However, there are some artifacts on the ball bearings due to the reflections on their shiny surface, which kept the regions from being circular and instead created highlights on each ball bearing.
1.2 Gaussian Blur
To identify the centers, instead of using this black and white image, I used a Gaussian blur effect on the image.
Gaussian blur averages the values near a pixel, weighted using the Gaussian distribution
The radius of the Gaussian filter was set to a value of the magnitude of the diameter of the atoms in pixels. This created unique minima in the shadow region, which we could identify as the “center” of the atom.
Due to the artifacts identified before, there was some offset between this identified center and the true center of the atom. As correctly identifying the offset was challenging, and the offsets were small, I chose to ignore the offsets.
An important thing to note is that this does not work near the edges of the image. If an atom was only partially visible in the image, the minima would still indicate the center of the dark region instead of the entire shadow of the atom. This can be fixed by completing this center-finding process and then ignoring all the centers identified that were less than a diameter away from the border. I have skipped this step in order to keep the entire image file, but it will be important to note the edge effects and focus on the region away from the borders for analysis.
2. Coordination Number
The coordination number represents the number of bonds each atom has. By analyzing the coordination number, we can identify regions where the coordination deviates from the global median, indicating potential defects in the material.
One strategy could be to use the centers identified earlier and consider all the atoms within a distance of 1.5 times the diameter as neighbors. However, this approach is not practical, as it assumes a perfect crystalline structure and would not work effectively near regions of defects.
2.1 Delaunay Triangulation
Delaunay triangulation is a mathematical technique that takes in a set of points and returns a set of triangles formed using these points. In our context, we can identify the edges of these triangles as “bonds” between the atoms.
2.2 Estimating the Coordination Number
We can estimate the coordination number to be the number of neighbors of the atoms. Furthermore, we can interpolate the coordination number for each pixel in the image. Any significant deviation in the coordination number on this plane can be identified as a region of defect.
2.3 Shortcomings of this method
While the Delaunay triangulation method provides valuable insights, the estimates are not always accurate. For instance,
- In the case of point defects, the interpolation will correctly identify these defects, but there isn’t a unique Delaunay triangulation. This lack of uniqueness can cause the coordination number to change rapidly between frames, leading to flickering we can see in the above video.
- For defects where a line of atoms is slightly displaced, the coordination number will remain the same as in defectless regions, which can result in the entire region being incorrectly identified as defectless.
3. Coordination Sphere
The coordination sphere refers to the region of influence of each atom, and its deviation in volume (or area) can be used to identify regions of defects. At the regions of defects, due to suboptimal packing, the area will increase, alerting us about the defect.
3.1 Voronoi Tessellation
Voronoi tessellation is a method that defines Voronoi regions based on a set of points. It has a duality with Delaunay triangulation, meaning that for every Delaunay triangulation, there is a corresponding Voronoi diagram.
The computation of Voronoi regions involves partitioning space into regions around the centers. Each point in our 2D plane is assigned to the region of the atom closest to it.
3.2 Estimating the Coordination Sphere
We can use the area of these Voronoi regions as an estimate of the area of the coordination sphere. By interpolating the areas of these regions, we can effectively identify regions of defects, as deviations in area can indicate irregularities in atomic arrangements.
Improvement on Coordination Number Estimation
- One of the advantages of using Voronoi tessellation is that the area of a Voronoi region changes slowly between frames, which helps to resolve flickering at these regions while still correctly identifying where exactly the point defect is located.
- In regions of line defects or dislocations, the area of the Voronoi regions increases as the centers are further apart. This allows us to correctly identify this type of defect.