SolTrack: an automatic video processing software for in situ interface tracking


Stefan Griesser, Faculty of Engineering, University of Wollongong, Northfields Avenue, Wollongong, NSW 2500, Australia. Tel: +61 2 4221 5718; e-mail:


High-Resolution in situ observation of solidification experiments has become a powerful technique to improve the fundamental understanding of solidification processes of metals and alloys. In the present study, high-temperature laser-scanning confocal microscopy (HTLSCM) was utilized to observe and capture in situ solidification and phase transformations of alloys for subsequent post processing and analysis. Until now, this analysis has been very time consuming as frame-by-frame manual evaluation of propagating interfaces was used to determine the interface velocities. SolTrack has been developed using the commercial software package MATLAB and is designed to automatically detect, locate and track propagating interfaces during solidification and phase transformations as well as to calculate interfacial velocities. Different solidification phenomena have been recorded to demonstrate a wider spectrum of applications of this software. A validation, through comparison with manual evaluation, is included where the accuracy is shown to be very high.


In the past few decades a wide range of experimental techniques have been developed for the study of solidification phenomena and solid-state transformations of metals to improve the fundamental understanding of these processes. In situ experimental observations of solidification kinetics and morphologies have been hampered by the difficulty of obtaining high resolution images at elevated temperature. In an attempt to remedy this situation, new experimental techniques have been developed specifically to study in situ aspects of solidification and high temperature phase transformations. These techniques include transmission X-ray observation using a Bridgman furnace and high-temperature laser-scanning confocal microscopy (HTLSCM), which provide not only the ability to capture the solidification progress in real time and at high resolution, but also the opportunity to observe and measure the morphology and kinetics of phase transformations during or following solidification. However, the ability to analyze the outcomes of these innovative experimental endeavors has lagged behind and the analysis of valuable data often reverted to manual and very time-consuming manipulation. For this reason, an attempt was made to develop image processing techniques to enhance the ability to analyze data recorded in video mode on a HTLSCM. Before the details of this development, titled SolTrack, are discussed, pertinent background relating to the development and application of the HTLSCM technique is summarized very briefly since it is this technique that has been used to experimentally capture the solidification phenomena analyzed using the newly developed SolTrack software.

Conventional laser-scanning confocal microscopy (LSCM) was established by Minski (Minski, 1961) in 1961 and since then this technique has found widespread application in biological sciences. However, it was not until the 1990's when Emi and his colleagues (Chikama et  al., 1996) combined LSCM with an infrared image furnace (IIF), which renewed the interest in high temperature microscopy of metals. One of the unique features of this technique is that fine microstructural evolution can be studied in situ at high temperatures and in real time. Experimental studies conducted with this technique include the morphology of solidification and an analysis of the progression of delta-ferrite/austenite interface in low carbon steels (Chikama et  al., 1996Yin et  al., 1999;); inclusion agglomeration (Yin et  al., 1997), inclusion engulfment (Shibata et  al., 1998a; Shibata et  al., 1998b; Shibata et  al., 1998c); kinetics of the peritectic reaction (Phelan et  al., 2008; Phelan et  al., 2005; Shibata et  al., 2000; Arai et  al., 2005; McDonald & Sridhar, 2005) and the peritectic transformations (Phelan et  al., 2005; Shibata et  al., 2000; Arai et  al., 2005; McDonald & Sridhar, 2005; Phelan et  al., 2006b); dissolution of alumina inclusions in slag (Lee et  al., 2001; Monaghan and Chen (2006) and solidification phenomena (Phelan & Dippenaar, 2000; Phelan et  al., 2006a).

Materials and Methods


Low-carbon steel (Fe-0.05 wt.%C) has been used to study the migration over time of the liquid-solid interface, the rate of the delta-gamma phase transformation and the progression of Widmanstätten ferrite plates during the austenite-to-ferrite phase transition. In addition, a LCB titanium-alloy was used to measure the kinetics of growth of alpha-laths during the transition of alpha to beta in a Titanium-alloy.

High-Temperature Laser-Scanning Confocal Microscopy (HTLSCM)

The details of HTLSCM have been described in detail in the literature (Shibata et  al., 2000; Reid et  al., 2004) and there is no need to repeat the details. Briefly, and pertinent to the present discussion, a He–Ne laser beam with a wavelength of 632.8 nm is scanned two-dimensionally (15.7 kHz × 60 Hz) and directed through a beam splitter and an objective lens before hitting the surface of the sample. The sample is placed in a gold plated, ellipsoidal shaped infrared heating furnace under an ultra-high purity inert atmosphere (typically > 99.9999% Ar). A 1.5 kW halogen lamp located at one focal point of the ellipsoidal cavity heats the specimen positioned at the other focal point (Figure 1). The temperature is measured by thermocouples incorporated in the crucible holder and simultaneously recorded with the image at a rate of 30 frames per second.

Figure 1.

Schematic illustration of the infrared image furnace and specimen setting (Cantor & O’Reilly, 2003).

An improved experimental technique, the so called concentric solidification, has been developed by Reid et  al. (Reid et  al., 2004) primarily to improve the quality of in situ observations during the solidification of metals. By this technique a centralized pool of liquid metal is formed in a thin disc, surrounded by a rim of solid under a radial thermal gradient. This configuration provides a number of experimental advantages over techniques previously used. Most important are the minimization of the meniscus of the melt, resulting in a larger area that is in sharp focus across the solid/liquid interface, and the elimination of a temperature gradient in the through thickness direction. Other benefits of this configuration are that solidification phenomena can be followed over long periods of time without the need for constant refocusing and that the observations made are not of surface effects only but are also representative of bulk behaviour. Due to all these benefits, this technique has been used to run several solidification experiments and generate the video files for the subsequent analysis.

Video Processing

Image Acquisition

The software presented in this paper is based on a frame-by-frame analysis of a specified video file and therefore each selected frame is extracted and loaded separately one at a time. This procedure adds efficiency and does not overcharge the workspace. The increment between the frames can be chosen in order to reduce the number of frames that have to be processed. This approach is specifically valuable when analyzing videos taken at low growth rates and hence, a large number of frames. The magnification used in the microscope to capture the video is read into the software in order to obtain the correct resolution (i.e. pixel to micrometer ratio).

Image Processing

The basic concept behind the technique is to find the first change in the pixel color intensity along a defined tracking path inline image. A tracking window with a user-defined height is extracted around the tracking path and the pixel intensity profile is measured. Because of the non-uniform illumination on the frames, the position of the interface is detected as a peak in the gradient of the intensity profile, which renders the detection independent of illumination changes. A schematic illustration of this procedure is shown in Figure 2.

Figure 2.

Interface detection along a user-defined tracking path on a concentric solidification experiment.

The tracking path (i.e. the growth direction of the interface) can be set for any orientation and the tracking window can be pre-filtered for better resolution. Also, local contrast enhancement for interfaces with a very low contrast can be imposed on the tracking window.

Radius Detection

A special feature designed for the concentric solidification experiment in the HTLSCM is the radius detection of the liquid pool since this is an important parameter to ensure the reproducibility of the experiments. First, the coordinates of the interface have to be detected in order to perform a circle fitting. Because the common edge detection algorithms (e.g. Canny, 1986) do not provide satisfactory outcomes as a result of the noisy nature of the frames, a special algorithm has been designed. Starting from the last known interface position, the pixel intensity profile is taken along the growth direction and the interface is detected as the first peak in the gradient of the intensity profile. This procedure is then repeated over the length of the interface.

Using the detected points x= (x1, x2) from the interface detection step, a least-squares fitting for circles, minimizing the geometric error is applied using the method proposed by Gander et  al. (Gander et  al., 1994). A circle in algebraic representation can be written as:


where a≠ 0 and x, b∈ℜ2. The center z= (z1, z2)and the radius r of a circle that fits best with minimum algebraic error is calculated as:


Minimizing the geometric distance is a nonlinear problem and be summarized as followes: To minimize the squares of the distances inline image with u= (z1, z2, r)T, the Jacobian defined by the partial derivatives ∂di(u)/∂uj is given by


In order to minimize the geometric error the Gauss-Newton method is used with the starting values z and r obtained from the algebraic fitting. The algorithm then iteratively computes the “best” circle. This procedure is applied to every frame and the center coordinates of the detected circle are stored for a later evaluation.

Video Stabilization

A video stabilization algorithm is introduced in order to eliminate the motion between the individual frames, resulting from the combination of a moveable stage and a static microscope. This situation is depicted in Figure 3. The starting point P1 and the endpoint P2 of a tracking path have absolute coordinates and hence, prior defined image features can be used as reference objects on a sequence of frames thereby eliminating the relative motion between them.

Figure 3.

Template matching with prior defined image features as reference objects (marked by white circles) on a sequence of frames with a relative motion between them. The coordinates of the tracking path (white arrows) are adjusted relative to the reference object in every frame.

One problem with videos taken of solidification experiments is that the liquid phase has no characteristic features that can be used as reference points in order to apply common video stabilization techniques. The best results in the current study have been obtained by using a normalized 2D cross-correlation for template matching of user defined reference objects on each frame.

The algorithm used can be summarized as follows (Lewis, 1995; Haralick & Shapiro, 1992):

  • 1Calculate cross-correlation in the spatial or the frequency domain, depending on the size of the images.
  • 2Calculate local sums by pre-computing running sums.
  • 3Use local sums to normalize the cross-correlation to obtain correlation coefficients.

This procedure returns a correlation coefficient γ (u, v) between the template and the frames,


where f is the image, inline image is the mean of the template and inline image is the mean of f(x, y) in the region under the template. Any motion detected is applied to the coordinates of the tracking path so that relative movement between the tracking path and the frame is prevented.


Growth rates

Four different solidification or phase transformation phenomena with different shapes and features of the interface have been analyzed using the software developed in the current study. The orientation of the tracking paths in these instances is shown in Figure 4. Two different types of interfaces, planar and a needle- or lath-shaped, respectively, as shown in the figure, have been analyzed. Figure 4a shows a delta-to-gamma phase transformation in the Fe–C alloy where the planar interface has very low contrast compared to a planar liquid-solid interface shown in Figure 4c. Figure 4b shows a bright needle-shaped alpha-titanium plate growing into the beta matrix, but with low contrast with respect to the surrounding matrix. Conversely, a dark lath-shaped Widmanstätten ferrite plate growing into an austenite matrix appears as an interface with high contrast with respect to the matrix as shown in Figure 4d.

Figure 4.

Tracking paths indicated as white arrows for a planar interface of the delta-to-gamma phase transformation in an Fe–C alloy (a), an alpha-titanium lath rowing into the beta matrix (b), a planar solid/liquid interface (c) and a Widmanstätten ferrite plate growing into the austenite matrix (d).

The progression of the four interfaces referred to above are presented in Figure 5. The frame numbers are related to time as the video recording is made at 30 frames per second. Notwithstanding the fact that the growth of an alpha-titanium plate, Figure 4b, has the lowest coefficient of determination (R2), calculated using a third degree polynomial fitting, a reliable measurement of the growth rate can still be made as shown in Figure 5b. The scatter of the data points is due to the very low contrast of the blurry interface with respect to the matrix. The other three types of interface show a linear progression with very little scatter of the data points. Even though the contrast is very low in the case of the delta-to-gamma transformation (Figures 4a and 5a) the planar delta/gamma interface allows for a wider tracking window around the tracking path, resulting in a clearer peak in the intensity profile and therefore a higher coefficient of determination.

Figure 5.

Position of the interfaces (black squares) in a sequence of consecutive frames with a third degree polynomial fitting (full gray lines) for the delta/gamma phase transformation (a), an alpha-titanium lath (b), a solid/liquid interface (c) and a Widmanstätten ferrite plate (d).

Radius detection

Figure 6 shows an example of the radius detection technique designed for the concentric solidification experiment. The black dotted line represents the detected radius of the liquid/solid interface. The x- and y-coordinates of the center of the detected circle are plotted as histograms in the lower left corner of the figure, showing the center calculation to be accurate within +/- 50 pixels.

Figure 6.

Solid/liquid interface in a concentric solidification experiment and the detected radius (black dotted line). The two histograms in the lower left-hand corner show the distribution of the calculated center coordinates in each frame with a standard deviation within about ±50 pixels.


In order to validate the calculation above, a comparison was made between the calculated velocity using SolTrack of a austenite/liquid interface of a peritectic steel and a manual calculation previously reported by Phelan et  al. (2006) as shown in Figure 7. In this exercise the same video file was used and the good agreement between calculated and manually tracked velocity is evident. Additionally, much more data points are generated by using the software which enables a much more sensitive analysis of the deviation of the interface velocity over time.

Figure 7.

Comparison of the manually tracked velocity of the austenite/liquid interface in a peritectic steel (Phelan et  al., 2006) and the calculated velocity using SolTrack.

Discussion and Conclusions

SolTrack has been developed to reduce the time and resources expended for the measurement of growth velocities of propagating interfaces in in situ high-temperature microscopy. Video files with thousands of frames can be analyzed quickly and efficiently. The basic functionality of the software has been demonstrated by the analysis of interfaces with different shapes and features. This represents a major improvement compared to a manual evaluation, since only small changes in the contrast across an interface are necessary for the automated detection of this interface, which is a very difficult process in a manual investigation. A radius detection technique for the application to concentric solidification experiments in HTLSCM has been developed and the accuracy of such calculations has been demonstrated. SolTrack has been validated by a comparison with a manual calculation and the accuracy of the calculations has been verified. The material being studied has no influence on the quality of the calculations and hence, the automated analysis using the developed software is material independent and can be applied in other branches of science.


Financial support by the Austrian Federal Government (in particular from the Bundesministerium für Verkehr, Innovation und Technologie and the Bundesministerium für Wirtschaft und Arbeit) and the Styrian Provincial Government, represented by Österreichische Forschungsförderungsgesellschaft mbH and by Steirische Wirtschaftsförderungsgesellschaft mbH, within the research activities of the K2 Competence Centre on ‘Integrated Research in Materials, Processing and Product Engineering’, operated by the Materials Center Leoben Forschung GmbH in the framework of the Austrian COMET Competence Centre Programme, is gratefully acknowledged.

The authors would also like to thank Mr. Suk-Chun Moon and Mr. Tjark van Staveren for providing some of the video files that had been analyzed in this investigation.