Image Processing Techniques in Shockwave Detection and Modeling

Shockwave detection is critical in analyzing shockwave structure and location. High speed video imaging systems are commonly used to obtain image frames during shockwave control experiments. Image edge detection algorithms become natural choices in detecting shockwaves. In this paper, a computer software system designed for shockwave detection is introduced. Different image edge detection algorithms, including Roberts, Prewitt, Sobel, Canny, and Laplacian of Gaussian, are implemented and can be chosen by the users to easily and accurately detect the shockwaves. Experimental results show that the system meets the design requirements and can accurately detect shockwave for further analysis and applications.


Introduction
A shockwave is a strong compression wave existing in supersonic/hypersonic flow field.Across the shockwave gas pressure, temperature and density increases significantly as a function of flow Mach number.Near the nose area of a supersonic/hypersonic flight vehicle, strong shockwaves exist.Extreme heat fluxes and heat load to the vehicle surface requires strong thermal protection in the nose area.Additionally, the shock standoff distance varies drastically with the temperature for a non-ideal gas, causing large differences in the heat transfer to the thermal protection system and drag of the vehicle.Supersonic wind tunnel experiments are needed to provide insight into the physics of air flow at high Mach numbers.Knowing the location and shape of the shockwave is essential to the success of vehicle design.In general, optical imaging system can be used to capture shockwave shape, location and flow property changes near the test article in a supersonic wind tunnel.High speed video imaging system and Schlieren system will normally generate significant amount of images that need to be analyzed after the experiment.Image processing techniques can make this type of data analysis more efficient and precise, but there exists challenges on how to pre-process the obtained images according to the wind tunnel condition as well as dealing with large volume of data cap tured by high speed camera.Data acquisition is per-formed in wind tunnel, while data analysis will be completed by a powerful PC.

Shockwave Stand-off Distance Detection
A series of shockwave control experiments were conducted using a supersonic wind tunnel facility.The supersonic flow is created by a primary supersonic nozzle to provide supersonic speed up to Mach 4. The flow emerging from the nozzle is then exhausted as a free jet into a windowed low pressure test cabin with extremely low back pressure.Figure 1 shows the shockwave experiment setting and a typical experimental image captured by a high speed video camera for a Mach 4 shockwave control experiment.The test article basic diameter (perpendicular to the incoming flow direction) is 3cm and the nose is spherical.The length of the cylindrical part is around 7 cm with the total length of the model from nose tip to cylinder base is 10cm.The shockwave structure and location capturing device were captured by a high speed video imaging system with speed of 2000 frames per second at 512 x 512 resolutions.Around 8000 frames of image data was collected for each experiment.
To analyze the shockwave stand-off distance, a special shockwave shape and stand-off distance detection algorithm needs to be developed.This algorithm should be able to accurately capture the steady shape and unsteady shape change of the shockwave especially the shockwave stand-off distance along the stagnation line.Since the experimental image has built-in noise, a noise cancellation algorithm should be incorporated in the detection scheme.The detection algorithm should also be robust because the large amount of unsteady shockwave images has to be analyzed.The time history of the shockwave stand-off distance under control conditions has to be precisely captured.The current research focused on the development of a new shockwave standoff distance detection algorithm.To detect the shockwave shape and stand-off distance through the images, image processing techniques can be used to make this type of data analysis more efficient and precise.In the current research, a new interactive and user-friendly shockwave detection software was developed.This software can precisely detect the shockwave stand-off distance in front of the test article inside a supersonic wind tunnel.

Image Edge Detection Algorithms
Edge detection algorithm is the natural choice for detecting shockwave within the obtained high speed video sequences.Edges are local features of images, which are local regions with special properties.Edges are pixels with significant local changes of intensity-large gradient-in an image.Edges typically occur on the boundary between two different regions in an image (as shown in Figure 2).Because important features, such as corners, lines, curves, etc., can be extracted from the edges, edge detection algorithms are very important in computer vision applications.Edge detection is to detect the edges and to produce a line drawing of a scene from an image of that scene.
There are four steps for edge detection: (1) Smoothing: suppress as much noise as possible, without destroying the true edges.(2) Enhancement: apply a filter to enhance the quality of the edges in the image (sharpening).
(3) Detection: determine which edge pixels should be discarded as noise and which should be retained (usually, thresholding provides the criterion used for detection).( 4) Localization: determine the exact location of an edge Edge thinning and linking are usually required in this step.In mathematics, derivatives are used to describe changes of continuous functions.Applying this to 2D images, partial derivatives can be used to express the image intensity changes (e.g.edges).Edge points can be detected by detecting (1) the local maxima or minima of the first derivative and (2) the zero-crossing of the second derivative.For 1D discrete signals, the first derivative can be approximated as and the second derivative can be approximated as For 2D images, gradient can be used to describe edges.Gradient is defined as a vector provides the edge's strength information.For images, by using pixel-coordinate notation (e.g., for row number and for column number, and i j I for image signal), the gradient can be approximated as

Roberts
The Roberts method finds edges using the Roberts approximation to the derivative.It returns edges at those points where the gradient of I is maximum.It was one of the first edge detectors and was initially proposed by Lawrence Roberts [1].The Roberts edge detector approximates the partial derivatives of the gradient as This approximation can be implemented by convolving the following masks 1 0 An example of Roberts edge detection is shown in Figure 3.

Prewitt
The Prewitt method finds edges using the Prewitt approximation to the derivative.It was proposed by Judith M. S. Prewitt [2].The Prewitt operator approximates the partial derivatives of the gradient as The approximation can be implemented by convolving the following masks 1 0 1 1 0 1

Sobel
The Sobel method finds edges using the Sobel approximation to the derivative.It was proposed by Irwin E. Sobel in 1970 [3].A little bit different from the Prewitt operator, the Sobel operator approximates the partial derivatives of the gradient as The approximation can be implemented by convolving the following masks 1 0 1 2 0 2 is possible an edge point, is the threshold.T

Canny
Also being a method which finds edges by looking for local maxima of the gradient of the image, the Canny algorithm, which was developed by John F. Canny in 1986 [4], introduces more steps to minimize the noise affection.To reduce the noise effect, a low-pass Gaussian filter, is applied to the image.By finding the derivative of the Gaussian filter, the gradient can be calculated After the gradient magnitude,  , is ob- tained, two more steps are performed to identify the edges.A non-maxima suppression algorithm is applied to find the local maxima of the gradient magnitude, and a hysteresis thresholding with two thresholds is applied to get rid of extra noise and retain the real edge points.This method is therefore less likely than the others to be fooled by noise, and more likely to detect true weak edges.An example of Canny edge detection is shown in Figure 6.

Laplacian of Gaussian
The Laplacian of Gaussian (LoG) method identifies edges by looking for zero crossings after filtering the image with an LoG filter [5].
In this method, a Gaussian low-pass filter as shown in Equation ( 1) is applied to reduce the noise effect.Previous discussion shows that edge points can be detected by detecting the zero-crossings of the second derivative.Here the Laplacian operator, is applied to find the corresponding second derivatives and ultimately the zero-crossings.It can be shown that Theoretically, the LoG function    

Shockwave Detection System and Results
To detect shockwave accurately and effectively, a MATLAB-based image processing software is developed.A user interface window is design to help users easily load and display shockwave image sequences, as shown in Figures 8-10.Different edge detection methods can be chosen to detect the shockwave.Edge detection thresholds can be specified by users or automatically chosen by the program.Users can select to display random frame or play the image sequence continuously.In either case, the edge detection results will be displayed at the same time.
Two sequences are tested using the software developed.Based on the edge detected using edge detection methods, shockwave thickness is measured, results can be seen in Table 1.From the results, we can see that, even though they are different from each other, the edge detection methods perform exactly the same.For se-quence #1, all methods measure the shockwave thickness as 10 pixels; while for sequence #2, all methods agree that the shockwave thickness is 9 pixels.Users can select edge detection method according to their applications or the characteristics of the image sequence.For example, if the sequence has a higher level of noise, then "Canny" or "LoG" can be used due to their noise resistance property.However, these two methods have higher computational complexities.For quick detection applications, the other three methods may be more suitable.Laplacian of Gaussian 10 9 a.All edge detection methods choose thresholds automatically.

Conclusions, Challenges, and Future Works
A shockwave detection system is built.The system utilizes image edge detection algorithms to easily and accurately detect shockwave.Based on the experimental results, the system meets the design requirements.However, there exists some challenges.The biggest challenge right now is how to deal with the large volume of data captured by high speed camera as well as the high computational complex image processing algorithms.To load the whole sequence in computer, 8 GB main memory is required.To accomplish real time processing, high-performance computer system is desired.The future works include testing this software system on the HPC system make the system more user friendly.

Figure 1 .
Figure 1.Aero-Test Article inside the wind tunnel and typical shockwave image near the nose are of the test article.

Figure 2 .
Figure 2. Image edge example: a scan line highlighted (left) and intensity along the highlighted scan line (right).
onto images.An example of Prewitt edge detection is shown in Figure 4.
images.An example of Sobel edge detection is shown in Figure 5.

Figure 5 .
Figure 5. Sobel edge detector: original image (left) and detected edges (right).Edge detection algorithms with Roberts, Prewitt, and Sobel operators share the same procedure in detecting edges.Main steps in edge detection with these operators: (1) calculate partial derivatives of the image through convolution, * x x I I I M x     and * y y I I I M y     ; (2)
infinite extent; for a practical implementation of LoG edge detection, however, it has to be truncated to a finite size.It can be shown that the width of the center lobe of around 99.7% of the energy of   , g x y .By convolving the image with the appropriate LoG mask then detecting zero crossings in the convolution output, LoG method offers better localization.An example of LoG edge detection is shown in Figure7.