Explosives may be characterised by describing a pressure curve as a function of specific volume. One such equation of state is the Jones-Wilkins-Lee (JWL) pressure – volume expansion relationship [1]:
![]()
A common method to test and characterise the JWL equation for a specific compound involves packing it into a copper cylinder. The pressure expansion is intialised at one end of the cylinder and tracked using an ultra high speed camera. The rotating mirror camera used for this specific project captures snapshots at 1032258 frames per second. The frames are not automatically aligned as a result of the rotation needed for high frame rate capture. For this reason there are markers placed in the shot, used to later align the images.
The cylinder expansion is captured for a specific compound in 32 frames. The raw image stack below:

Aligning the baseline image
The sequences of cylinder test images are now registered to a template image so that they all line up. This is done using the Frangi [2] filter in the scikit-image [3] python module. The Frangi filter is used because of its ability to capture higher lever detail and edges. The filter applied to the first frame of a different experiment (left) results in the gradient image in on the right.

If all of the images in the stack are registered to the first frame, it is important that the first frame be symmetrical. To accomplish this the first frame is registered to its own vertical mirrored image. The rigid transform (rotate and translate) that results in the smallest norm should the pixel intensities of the marker sides be subtracted from its mirrored value is found using the downhill simplex algorithm in the scientific python module [4]. If the mirrored Frangi filtered image above is subtracted from the original, the resulting image is displayed below:

Here, the intensity value of grey is zero, white is one and black negative one. A rigid transformation is done to best match the marker locations on either side of the cylinder. The transform resulting in the best fit between the marker sides of the original and mirrored image gives the symmetrised Frangi filter comparison image:

All of the images in an image stack is now registered in the same way to the baseline (symmetrised original image) allowing first rigid and then affine transformations to allow for possible minor scale variations. The registered and enhanced compound image stack is finally obtained:

From the registered image sequence, automated sub-pixel edge detection is now used to track radial expansion (needed to characterise the JWL equation of state according to the method of Elek et al [5])
Edge detection

References
[1] Dobratz BM and Crawford PC (1985) LLNL Explosives Handbook: Properties of Chemical Explosives and Explosive Simulants. University of California, Lawrence Livermore National Laboratory, Report UCRL-5299, Rev.2.
[2] Frangi AF, Niessen WJ, Vincken KL and Viergever MA (1998) Multiscale vessel enhancement filtering . In: LNCS, vol. 1496, pages 130-137, Germany, Springer-Verlag.
[3] Van der Walt S, Schönberger JL, Nunez-Iglesias J, Boulogne F, Warner JD, Yager N, Gouillart E, Yu T and the scikit-image contributors (2014) scikit-image: Image processing in Python. PeerJ 2:e453.
[4] Jones E, Oliphant E, Peterson P et al. (2001-) SciPy: Open Source Scientific Tools for Python . http://www.scipy.org/
[5] Elek PM, Dzingalasevic VV, Jaramaz SS and Mickovic DM (2015) Determination of Detonation Products Equation of State from Cylinder Tests: Analytical Model and Numerical Analysis , Thermal Science, 19(1):35-48.
