A FEASIBILITY STUDY ON THE THREE-DIMENSIONAL RECONSTRUCTION OF HIGH VOLTAGE AND LIGHTNING DISCHARGE CHANNELS USING DIGITAL IMAGES Yu-Chieh (Jessie) Liu A dissertation submitted to the Faculty of Engineering and the Built Environment, University of the Witwatersrand, Johannesburg, in fulfilment of the requirements for the degree of Master of Science in Engineering. Johannesburg, 2012 Declaration I declare that this dissertation is my own, unaided work, other than where specif- ically acknowledged. It is being submitted for the degree of Master of Science in Engineering in the University of the Witwatersrand, Johannesburg. It has not been submitted before for any degree or examination in any other university. Signed this day of 2012 Yu-Chieh (Jessie) Liu To my loving parents for allowing me to spread my wings. To Tim, my supportive and unwavering rock. iii Abstract The work presented extends and contributes to research in the visualisation of discharge channels with an expectation to extend to lightning channels. Although previous work in this area has produced three-dimensional (3D) information of discharge channels, there has not been a method to visualise the channel and the characteristics of its shape in a 3D environment. In the research presented, photographed discharge channels are reconstructed in a virtual interactive 3D envi- ronment. It is found that single-channelled discharges produce models that correctly follow the inferred channel paths from the photograph datasets. Single-channelled discharges have also been verified in the controlled laboratory environment, providing confi- dence in the two-image reconstruction algorithm. The algorithm is shown to fail for an angular separation of cameras less than 15◦, which produces thicker channel segments. It is further shown that branched discharge channels can produce models that correctly follow the channel paths. If images are not accurately normalised for lens correction and slight camera tilts, missing segments and duplication of reconstructed branches are evident in the models. Furthermore, it is shown that the algorithm also fails for image perspectives with angular separations less than 15◦, additional redundant branches are produced in addition to thicker channel segments. iv Acknowledgements I would like to thank Dr. Ken J. Nixon for his enthusiasm, guidance and constant mentorship throughout the duration of this work. I would also like to extend my heartfelt gratitude to Prof. Ian R. Jandrell for providing me with so many great opportunities. Last but not least, I would like to thank the High Voltage and Lightning EMC Research Groups and the staff of Genmin Laboratory for their neverending support and encouragement. The following organisations are gratefully acknowledged for funding and supporting the High Voltage and Lightning EMC Research Groups: • CBI-Electric for direct support and funding the Chair of Lightning at the University of the Witwatersrand. • Eskom through the Tertiary Education Support Programme (TESP). • The National Research Foundation (NRF). • The Department of Trade and Industry (DTI) for Technology and Human Resources for Industry Programme (THRIP) funding. vContents Declaration i Abstract iii Acknowledgements iv Contents v List of Figures x List of Tables xvi List of Symbols and Notation xvii Abbreviations xix Nomenclature xxi 1 Introduction 1 2 Background 4 2.1 The Lightning Discharge . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.1.1 Cloud-to-Cloud (CC) Lightning . . . . . . . . . . . . . . . . . 6 2.1.2 Ground Lightning Flashes . . . . . . . . . . . . . . . . . . . . 6 2.2 Lightning Photography . . . . . . . . . . . . . . . . . . . . . . . . . . 10 2.2.1 Challenges of Lightning Photography . . . . . . . . . . . . . . 10 2.2.2 Existing Research: Photography of Lightning . . . . . . . . . 11 2.3 Lightning to Tall Structures . . . . . . . . . . . . . . . . . . . . . . . 12 2.3.1 World-Wide Lightning Research of Tall Structures . . . . . . 13 2.3.2 Towers in Johannesburg, South Africa . . . . . . . . . . . . . 14 2.4 3D Lightning Modelling Methods . . . . . . . . . . . . . . . . . . . . 17 Contents vi 2.4.1 Scientific Lightning Simulation Methods . . . . . . . . . . . . 17 2.4.2 Rendered Applications . . . . . . . . . . . . . . . . . . . . . . 18 2.4.3 Existing Research: 3D Channel Reconstruction . . . . . . . . 19 2.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3 Approach Taken 22 3.1 Problem Statement . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.2 System and Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.3 Contribution of this Dissertation . . . . . . . . . . . . . . . . . . . . 24 3.3.1 Main Contribution . . . . . . . . . . . . . . . . . . . . . . . . 25 3.3.2 Possible Extension to this Work . . . . . . . . . . . . . . . . 26 4 System Design 27 4.1 System Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 4.2 Photographic Equipment . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.2.1 Data Filtering: Optical . . . . . . . . . . . . . . . . . . . . . 28 4.2.2 Cameras . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.2.3 Camera Operation . . . . . . . . . . . . . . . . . . . . . . . . 31 4.2.4 Camera Safety in Laboratory Environment . . . . . . . . . . 32 4.2.5 Camera Limitations in Functionality . . . . . . . . . . . . . . 33 4.2.6 Network and Communication . . . . . . . . . . . . . . . . . . 36 4.2.7 Data Formats . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.3 Data Conditioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 4.3.1 Pre-Processing of Discharge Channel Images . . . . . . . . . 38 4.4 Three-Dimensional Reconstruction Algorithm . . . . . . . . . . . . . 46 4.4.1 Limitations of Model Reconstruction . . . . . . . . . . . . . . 47 4.4.2 Two-Image Reconstruction . . . . . . . . . . . . . . . . . . . 50 4.4.3 Three-Image Reconstruction . . . . . . . . . . . . . . . . . . . 51 4.5 Testing Framework . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 4.6 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 5 HV Laboratory Investigation 58 5.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 5.2 Experiment A-1: General Investigation . . . . . . . . . . . . . . . . . 60 5.2.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . 60 5.2.2 Reconstruction Results . . . . . . . . . . . . . . . . . . . . . . 61 5.2.3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 63 Contents vii 5.3 Experiment A-2: Single-Channelled Verification . . . . . . . . . . . . 64 5.3.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . 64 5.3.2 Reconstruction Results . . . . . . . . . . . . . . . . . . . . . . 65 5.3.3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 5.4 Experiment A-3: Branched-Channel Evaluation . . . . . . . . . . . . 67 5.4.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . 67 5.4.2 Reconstruction: Part 1 . . . . . . . . . . . . . . . . . . . . . . 68 5.4.3 Reconstruction: Part 2 . . . . . . . . . . . . . . . . . . . . . . 69 5.4.4 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 69 5.5 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71 6 Physical Lightning Investigation 73 6.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 73 6.2 Experiment B-1: Single Channel (Tuscon) . . . . . . . . . . . . . . . 74 6.2.1 Experimental and Setup . . . . . . . . . . . . . . . . . . . . . 74 6.2.2 Reconstruction Results . . . . . . . . . . . . . . . . . . . . . . 75 6.2.3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 6.3 Experiment B-2: Multiple Channels (South Dakota) . . . . . . . . . 77 6.3.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . 78 6.3.2 Reconstruction Consideration . . . . . . . . . . . . . . . . . . 80 6.3.3 Reconstruction Results: Part 1 . . . . . . . . . . . . . . . . . 80 6.3.4 Reconstruction Results: Part 2 . . . . . . . . . . . . . . . . . 82 6.3.5 Reconstruction Results: Part 3 . . . . . . . . . . . . . . . . . 83 6.3.6 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 85 6.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 88 7 Discussion and Future Work 89 7.1 Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 89 7.2 Single-Channelled Investigation . . . . . . . . . . . . . . . . . . . . . 90 7.2.1 Laboratory Discharges . . . . . . . . . . . . . . . . . . . . . . 90 7.2.2 Lightning Discharges . . . . . . . . . . . . . . . . . . . . . . . 91 7.2.3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 7.3 Multiple-Channelled Investigation . . . . . . . . . . . . . . . . . . . 92 7.3.1 Laboratory Discharges . . . . . . . . . . . . . . . . . . . . . . 92 7.3.2 Lightning Discharges . . . . . . . . . . . . . . . . . . . . . . . 93 7.3.3 Discussion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93 Contents viii 7.4 System Evaluation . . . . . . . . . . . . . . . . . . . . . . . . . . . . 94 7.4.1 Reconstruction Framework . . . . . . . . . . . . . . . . . . . 94 7.4.2 Image Pre-Processing . . . . . . . . . . . . . . . . . . . . . . 94 7.4.3 Reconstruction Algorithms . . . . . . . . . . . . . . . . . . . 95 7.4.4 Testing Model Accuracy . . . . . . . . . . . . . . . . . . . . . 96 7.4.5 Future Work on Image Data . . . . . . . . . . . . . . . . . . 97 8 Conclusion 100 References 102 A Discharge Channel Photography 106 A.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 106 A.2 Possible Camera Solutions . . . . . . . . . . . . . . . . . . . . . . . . 106 A.3 Summary of Camera Settings . . . . . . . . . . . . . . . . . . . . . . 107 A.4 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 109 B Motivation for Three-Dimensional Study of Lightning 110 B.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 B.2 Paper Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . 110 C Ground-Work for System 117 C.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 C.2 Paper Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . 117 D High Voltage Testing on Large Channel Paths with Discontinuities124 D.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 D.2 Paper Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . 124 E Small-Scale Investigation on Reconstruction with Cameras at Dif- ferent Elevations 130 E.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 E.2 Paper Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . 130 F Preliminary Testing on One Image Perspective of Lightning 136 F.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 F.2 Paper Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . 136 G Single-channelled Lightning Testing 142 Contents ix G.1 Preamble . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 G.2 Paper Description . . . . . . . . . . . . . . . . . . . . . . . . . . . . 142 xList of Figures 2.1 Cloud to ground (CG) lightning in the same frame as Cloud-to-Cloud (CC) lightning. (a) In one event, a downward CG lightning strike in the distance (left) preceeds a CC lightning event along the base of the clouds, branching towards the camera position. (b) Downward negative lightning flash as a CG strike (left) with CC activity in the same frame (right). . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2 Cloud-to-cloud (CC) lightning. (a) Possible intercloud lightning, (b) Cloud-to-air lightning. . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 Negative downward lightning, the most common type of CG lightning usually portrayed by downward branching. . . . . . . . . . . . . . . . 8 2.4 Upward lightning on Brixton tower visually characterised by branch- ing in the upward direction. . . . . . . . . . . . . . . . . . . . . . . . 9 2.5 Brixton (237 m) and Hillbrow towers (270 m tall) are indicated as the highest points in the Johannesburg skyline to date, laterally separated by approximately 4.8 km. . . . . . . . . . . . . . . . . . . . . . . . . 14 2.6 Negative downward flashes on Brixton tower, appearing to originate from overhead the location of the surveillance camera. Flash occur- ring on (a) 1 January 2011 at 15:44:56.980s (b) 8 February 2011 at 17:56:12.100s. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 2.7 Possible flash to Hillbrow tower photographed from surveillance loca- tion of the tower. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.8 A basic representation of the reconstruction method. . . . . . . . . . 20 3.1 Time series of a tortuos lightning channel with unknown spatial distribution taken on 19 December 2010 at 02:52:42−0.930 s. (a) CC preceeding ground flash (Reference time: +0 s) (b) CG discharge (+0.100 s) (c) +0.210 s (d) +0.330 s (e) +0.660 s (f) +0.770 s. . . . . 23 3.2 Demonstration of downward negative flashes that appear to be inter- cepted by upward leaders from the ground. This is demonstrated by a sharp change of direction in the channel path. . . . . . . . . . . . . 25 List of Figures xi 4.1 Block diagram demonstrating the three-dimensional reconstruction system overview and flow. . . . . . . . . . . . . . . . . . . . . . . . . 27 4.2 Discharge image acquisition using optical filters and cameras. . . . . 28 4.3 Comparison of lightning images with different optical filter combina- tions. These images are taken from separate lightning events with the same camera. (a) No filters (b) Cross-polarised filters. . . . . . . . . 29 4.4 Comparison of high voltage discharge images with different optical filter combinations. These images are taken from separate lightning events with the same camera. (a) Cross-polarised filters (b) Cross- polarised and infrared filters (c) Cross-polarised, infrared and violet filters. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.5 Image splicing for Axis 207W. Two subsequently occurring discharges are captured between a frame change, Marker 1 indicates the bottom portion of the first flash, and Marker 2 indicates the top portion of the second flash. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 4.6 Image splicing and pre-buffer induced corruption of information for Axis M1344. Images are taken of the same discharge, 94◦ laterally separated. (a) Vertical image splicing, (b) Vertical image splicing and pre-buffer corruption. . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.7 Overexposure for Axis 207W with the use of optical filters. (a) Over- exposed frame (b) Normal frame of overexposed flash 20 ms after (a) is photographed. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 4.8 Channel reflections recorded on an image taken with the Axis 207W. The number of the reflections depend on the intensity of the illumi- nosity, either one or three reflections. Marker 1 indicates the original channel, Marker 2 indicates the first reflection (more common), Mark- ers 3 and 4 indicate reflections of 1 and 2, respectively. . . . . . . . . 37 4.9 Channel isolation using image pixel difference comparisons with an image occurring several frames before the channel is photographed. Marker 0 indicates the fixed image, Markers 1 − 3 indicate images identified with significant pixel difference. . . . . . . . . . . . . . . . 40 4.10 Image difference of a lightning event occurring on 8 February 2011 at 18:13:47.900. (a) Original image (b) Difference image with a mismatch of 40, 063 pixels (of 600× 480 image resolution). . . . . . . 41 4.11 Black and White Boolean filter using threshold values between (0 − 255) implemented for sample images used in Figure 4.10. (a) Thresh- old value of 70 (b) Threshold value of 100. . . . . . . . . . . . . . . . 42 List of Figures xii 4.12 Smooth Bool process. . . . . . . . . . . . . . . . . . . . . . . . . . . 43 4.13 Smooth and Boolean filter iterations (a) Original image with focus area labelled with Marker 1 (b) First iteration of Smooth filter with scatter constant set to 5 (c) First iteration with Boolean filter with threshold at 90 (d) Second iteration of Smooth filter with scatter con- stant set to 20 (e) Second iteration with Boolean filter with threshold at 80. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 44 4.14 Isolated images amalgamated in a single image to reduce timing issues. 45 4.15 A simple branched channel generated as an example to illustrate the image placement in the reconstruction environment. (a) Re- constructed model about environment origin surrounded by images contributing to its reconstruction (b) Zoomed view illustrating the stacked nature of the model design. . . . . . . . . . . . . . . . . . . . 47 4.16 Camera 1 — Timing inconsistencies capturing different levels of infor- mation, in particular, Frame 2 producing branching information not evident in any other frame of the event. (a) Frame 1, (b) Frame 2, (c) Frame 3, (d) Frame 4, (e) Frame 5, (f) Frame 6. . . . . . . . . . 48 4.17 Camera 2 — Matching lightning event captured 34◦ from Figure 4.16 at a lower image resolution. (a) Frame 1, (b) Frame 2, (c) Frame 3. . 48 4.18 Basic channel reconstruction algorithm for single-channelled discharges, resolving channel segments by a series of two-dimensional geometric problems. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 4.19 Redundancies for branched channels from images. (a) Two branches are assumed as part of the channel, and two are assumed by be redundant (b) Resolving channel branch redundancies using a third image. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 4.20 Algorithm for constructing channel segments from three images to resolve channel redundancies, using the third image as verification (a) Construction of C1 using I1 for verification (b) Construction of C2 using I2 for verification (c) Construction of C3 using I3 for verification. 53 4.21 Channel segment constructed from resolved channel segments C1, C2 and C3 from Figure 4.20 if first detect option is true. . . . . . . . . . 54 4.22 Testing procedure comparing pixel mismatching of two images (a) Cir- cle (represents original Boolean image) (b) Square (represents image of model at same perspective) (c) Difference between the two images indicated by white pixels. . . . . . . . . . . . . . . . . . . . . . . . . 56 List of Figures xiii 5.1 Experimental setup for laboratory Experiment A-1 to determine the optimal camera positions for reconstruction — Current camera configuration at 45◦. . . . . . . . . . . . . . . . . . . . . . . . . . . . 61 5.2 Three-camera angular separations for Experiment A-1 (a) Camera separation of 30◦ (b) Camera separation of 45◦ (c) Camera separation of 60◦ (d) Camera separation of 120◦, and (e) Camera separation of 90◦. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 5.3 A set of images samples taken in the high voltage laboratory inves- tigation with three camera perspectives at eye level (a) Camera 1 at 0◦ (b) Camera 2 at 120◦ (c) Camera 3 at 240◦. . . . . . . . . . . . . 65 5.4 Reconstructed model from Figure 5.3. Input data can be seen behind the model channel, to match the accuracy of reconstructed channel path and shape for Cameras 1 and 2. (a) Camera 1 at 0◦ (b) Camera 2 at 120◦ (c) Perspective of reconstructed model at 240◦. . . . . . . . 66 5.5 Verification through comparing third photographed image from Cam- era 3 at 240◦, not used as an input for the model reconstruction. (a) Original image (b) Boolean image (c) Reconstructed model at corresponding angle (background underlay of channel shape of origi- nal channel, for direct comparison). . . . . . . . . . . . . . . . . . . . 66 5.6 Reconstructed model of branched HV discharge channel using two input images. In each pair, shows the resulting Boolean image (left), and corresponding perspective of the reconstructed model (right) (a- b) Perspective 2 at 45◦ (c-d) Perspective 3 at 90◦. . . . . . . . . . . 68 5.7 Reconstructed model of branched HV discharge channel. In each pair, shows the resulting Boolean image (left), and corresponding perspective of the reconstructed model (right) (a-b) Perspective 1 at 0◦ (c-d) Perspective 2 at 45◦ (e-f) Perspective 3 at 90◦. . . . . . . 69 5.8 Image of the two-image reconstructed model at an arbitrary perspec- tive indicating inaccurage branching definition. (a) Full length with marked focus (b) Zoomed image of marked focus. . . . . . . . . . . . 70 5.9 Image of the three-image reconstructed model at an arbitrary perspec- tive indicating duplicated channels per branch and missing segments. (a) Full length with marked focus (b) Zoomed image of marked focus. 71 6.1 Images taken of a lightning flash in Tuscon USA in 2007 for two dif- ferent perspectives approximately 34◦ apart. (a) Camera S1 (b) Cam- era S2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 List of Figures xiv 6.2 Reconstructed model of a single channelled lightning flash. (a) Cam- era S1: Boolean image (b) Camera S1: Reconstructed image (c) Cam- era S2: Boolean image (d) Camera S2: Reconstructed image. . . . . 75 6.3 Original image from Camera S1 perspective indicating area of interest for demonstrating errors in resolution in the reconstructed model. . . 76 6.4 Zoomed in area of interest showing resolution errors on the recon- structed lightning model from Camera S1 perspective. (a) Original image (b) Boolean image (c) Corresponding image of reconstructed model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 6.5 Camera W1 perspective of upward lightning leader propagation of a branched flash photographed at multiple perspectives. (a) Multiple channels (b) Return stroke. . . . . . . . . . . . . . . . . . . . . . . . 77 6.6 Upward lightning leader propagation of a branched flash photographed from Camera W2 to Camera W5. (a) Camera W2 (b) Camera W3 (c) Camera W4 (d) Camera W5. . . . . . . . . . . . . . . . . . . . . 78 6.7 Fully branched channel Boolean images of upward flash return stroke; cropped to include mutually inclusive data of the channel (a) Cam- era W1 at 0◦ (b) Camera W2 at 12◦ (c) Camera W3 at 15◦. . . . . . 81 6.8 Reconstructed lightning channel of the fully branched channel of the upward flash return stroke using two images (a) Reconstructed per- spective of Camera W1 (b) Reconstructed perspective of Camera W2 (c) Reconstructed perspective of Camera W3 (d) Triple duplication of a channel. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 81 6.9 Two-branched channel Boolean images of upward flash return stroke; cropped to include mutually inclusive data of the channel (a) Cam- era W1 at 0◦ (b) Camera W2 at 12◦ (c) Camera W3 at 15◦. . . . . . 82 6.10 Reconstructed lightning channel of the two-branched channel of the upward flash return stroke using two images (a) Reconstructed per- spective of Camera W1 (b) Reconstructed perspective of Camera W2 (c) Reconstructed perspective of Camera W3 (d) Extent of the full model. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 83 6.11 Single branched channel Boolean images of upward flash return stroke; cropped to include mutually inclusive data of the channel (a) Cam- era W1 at 0◦ (b) Camera W2 at 12◦ (c) Camera W3 at 15◦. . . . . . 84 6.12 Reconstructed lightning channel of the single branched channel of the upward flash return stroke using two images (a) Reconstructed per- spective of Camera W1 (b) Reconstructed perspective of Camera W3. 84 List of Figures xv 6.13 Reconstructed lightning channel of the single branched channel of the upward flash return stroke using three images (a) Reconstructed per- spective of Camera W1 (b) Reconstructed perspective of Camera W2 (c) Reconstructed perspective of Camera W3. . . . . . . . . . . . . . 85 6.14 Channel thickness distortion modelled in the reconstruction due to acute angles. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 6.15 Verification process for redundant channels at acute angles. (a) Iden- tification of cylinder centers and respective points (marked with ’x’) to calculate radii (b) Virtual cylinders with radii determined by the averaged distances of ‘x’ points (c) Third image verification incor- rectly identifying all cylinders as valid. . . . . . . . . . . . . . . . . . 87 7.1 Camera views on Brixton tower indicating an approximate 70◦ sepa- ration between the two sites. . . . . . . . . . . . . . . . . . . . . . . 98 7.2 Two camera sites providing vastly different camera elevations observ- ing Brixton tower. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 99 xvi List of Tables 4.1 Camera safety capabilities for operation in either the high voltage laboratory or phyical lightning investigations. . . . . . . . . . . . . . 32 4.2 Image processing filters using basic implementation of existing VTK classes. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 4.3 Three-image reconstruction algorithm steps to reconstructing channel segments for first detect option. . . . . . . . . . . . . . . . . . . . . . 53 4.4 All seven algorithm options available for individual reconstruction cases for two or three image reconstructions. . . . . . . . . . . . . . . 55 5.1 Visual evaluation of all laboratory datasets providing number of re- constructed images containing the listed characteristics. . . . . . . . 63 5.2 Reconstruction configurations for branched HV discharge channel evaluation using two- and three-image algorithms. . . . . . . . . . . 68 6.1 Geographic information of cameras in relation to a flash photographed on a tower in South Dakota. . . . . . . . . . . . . . . . . . . . . . . . 79 6.2 Configurations for cameras participating in the photography of the flash occurring on the South Dakota tower. . . . . . . . . . . . . . . 79 7.1 Summary of all experiments performed for reconstruction of discharge channels under various algorithm configurations. . . . . . . . . . . . 90 7.2 Geographic information for Brixton tower and the relative camera locations. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 98 A.1 General camera settings configured for the laboratory and/or physical investigation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 108 xvii List of Symbols and Notation Physical Quantities Ad Collection area of isolated structure, m2 Cd Factor taken into account for location of structure Heff Effective height Hs Height of tall structure, m ND Annual number of downward flashes to a structure, flashes/year NF Annual number of flashes to a structure (all flashes), flashes/year Ng Lightning ground flash density, flashes/km2/year Pu Upward probability of flashes to a structure R Gap geometry and spacing (nature and dimensions of ground elec- trodes), m Re Effective radius, m Req Equivalent radius, m Td Annual number of thunderstorm days, days Ulc Continuous leader inception voltage potential, kV Software Quantities εpm Pixel mismatch error, pixels Epm Percentage mismatched pixel error, % Ih Height of image, pixels In(center) Center normal of an 1-pixel high white band from an image, where n denotes image number, pixels In(left) Outer left normal of an 1-pixel high white band from an image, where n denotes image number, pixels In(right) Outer right normal of an 1-pixel high white band from an image, where n denotes image number, pixels Iw Width of image, pixels List of Symbols and Notation xviii r1 Radial distance from segment center to normal I1(center) intersection with normal I2(right), pixels r2 Radial distance from segment center to normal I1(center) intersection with normal I2(left), pixels r3 Radial distance from segment center to normal I2(center) intersection with normal I1(right), pixels r4 Radial distance from segment center to normal I2(center) intersection with normal I1(left), pixels Rcs Radius of a 1-pixel high channel segment, pixels xix Abbreviations 2D two-dimensional 3D three-dimensional C++ Cplusplus CC Cloud-to-Cloud CG Cloud-to-Ground CN Canadian National CSIR Council for Scientific and Industrial Research DUT Device Under Test fps frames per second FTP File Transfer Protocol HV High Voltage IC Intra-Cloud IP Internet Protocol JPEG Joint Photographic Experts Group - Image file format LAN Local Area Network LDN Lightning Detection Network Abbreviations xx MKV Matroska video RAM Random Access Memory SALDN South African Lightning Detection Network SD Secure Disk VTK Visualisation Tool-Kit xxi Nomenclature Boolean image An image of black and white pixels, where a white pixel (colour value: 255) is regarded as a TRUE representation of discharge channel information, and a black pixel (colour value: 0), a FALSE representation, therefore containing redundant information. Filter Terminology used by VTK for a process that accepts inputs, makes necessary changes according to func- tionality, and produces an output with changes. Final jump The intersection between the downward stepped leader and the connecting upward leader, which deter- mines the striking or termination point of the lightning flash. Model A schematic description of a system, theory, or phe- nomenon that accounts for its known or inferred properties and may be used for further study of its characteristics. — TheFreeDictionary.com Modelling verb of model. Negative discharge A discharge initiated by a negative leader, indepen- dent of direction of leader propagation, (classical definition). Positive discharge A discharge initiated by a positive leader, independent of direction of leader propagation, (classical defini- tion). Nomenclature xxii Reconstructing verb of reconstruction. Reconstruction (Reconstruct) To re-create in the mind from given or available information. — Dictionary.com Return stroke A surge of electrical current travelling back through the channel defined by the leader paths. Simulation The representation of the behaviour or characteristics of one system through the use of another, esp. a computer program designed for the purpose. — Dictionary.com Striking distance The height of a downward leader tip above ground at which an upward connecting leader is initiated. 1Chapter 1 Introduction Lightning models form a large basis of research into further investigating the physical construction and progression of the meteorological phenomenon [1]. These models have a significance into understanding the nature of discharge channels through the examination of the shape, tortuosity, span, factors affecting its formation, risk involved with Cloud-to-Ground (CG) events and provides a scope for minimising such dangers. The software simulation of lightning channels have become a necessity for analysing an otherwise fast, intangible and non-repeatable event. This study provides a investigation into the feasibility of reconstructing lightning discharge channels, which is compared with data produced from High Voltage (HV) laboratory investigations. Multiple digital images photographed of discharges are used as the fundamental datasets in conjunction to camera positions relative to the discharge locations. These reconstructed discharge channel models are examined within a three-dimensional (3D) virtual environment to visualise the channel using pan, tilt and zoom user capabilities. A system is designed to capture two-dimensional (2D) images of a discharge channel and represent the discharge as a 3D model within a 3D interactive environment. Two key investigations are conducted in the form of small-scale HV laboratory and large- scale physical lightning experiments. The investigations provide two fundamental channel shapes involved with discharge channels: single-channelled and multiple- channelled discharges. The use of image data on each of these shapes will provide verfication on the algorithms used to reconstruct the channels. The results from these investigations are compared to determine the feasibility of reconstructing lightning discharge channel models using digital images. Chapter 2 discusses the background information associated with lightning, the Chapter 1 — Introduction 2 photography of lightning, lightning modelling methods and 3D modelling methods. A review on existing research associated with this work is also identified. Chapter 3 evaluates the approach taken on the proposed solution to determining the feasibility of reconstructing a 3D model of a lightning discharge channel. The assumptions and constraints are presented to determine the necessary approach concerning the problem statement. The motivation behind the undertaking of this research is provided with its significance in the field of lightning research. Chapter 4 provides an overview on the system design . The system is discussed from its photography of discharge channels, to the production of the reconstructed model. A discussion of the photographic equipment used for the investigations is provided, including the operations and limitations involved. Data conditioning of the images is discussed to isolate discharge channel information in each frame, and prepare Boolean images as inputs into the modelling framework. Reconstruction algorithms are discussed for the reconstructing both single- and multiple-channelled discharges. The testing methodology in determining the accuracy of reconstructed models is also discussed. Chapter 5 investigates the reconstruction of discharges in a small scale HV labo- ratory environment. This investigation allows for the controlled simulation of the camera positioning which can be compared to the physical scenario with regards to natural lightning. Several tests are performed to evaluate the performance of the algorithm configurations and provide verification of reconstructing single-channeled and multiple-channelled discharges. Chapter 6 investigates the reconstruction of natural lightning discharges in the large, uncontrolled, physical lightning environment using a limited set of photographed images. Single-channelled and multiple-channelled discharge channels are recon- structed. Chapter 7 summarises the results of the laboratory and physical investigations. A discussion of the project feasibility and the future work of reconstructing single-channelled and multiple-channelled discharges and an evaluation of the system is provided. All results are provided with respect to the reconstruction system discussed in Chapter 4. Chapter 8 discusses the final findings of the system and its investigation scenarios and provides a conclusion to the work. Chapter 1 — Introduction 3 Appendix A summarises additional information on cameras and camera options for the photography of discharge channels. Appendix B presents a paper published and presented at a peer-review conference, to provide a background and motivation for this research investigation. Appendix C presents a paper published and presented at a peer-review conference, to provide ground work on the system and preliminary testing performed in the HV laboratory. Appendix D presents a paper published and presented at a peer-review conference, providing an investigation into larger discontinuous laboratory gaps. Appendix E presents a paper published and presented at a peer-review conference, to provide preliminary laboratory work into investigating reconstructions of discharges if cameras are placed at different elevations. Appendix F presents a paper published and presented at a peer-review conference, providing confidence in reconstructing branched lightning discharge channels with no 3D definition. Appendix G presents a paper published and presented at a peer-review conference, producing a reconstruction of single-channelled lightning discharge. 4Chapter 2 Background Lightning research started with ground-level observations [2]. These fast, almost instantaneous events (durations of µs) are typically recorded in a two-dimensional (2D) capacity. With the development of camera technology, more information has been resolved through faster camera framerates and monitoring techniques. Simulated lightning models take it a step further to understand its statistical nature. Through the advancement of computer technology, new exciting ways to represent the lightning event have been made possible, whether for research or entertainment media purposes. By combining the two technologies, the possibility for recon- structing three-dimensional (3D) lightning discharge channels using photographs of a lightning event can be achieved. Existing research which provides insight into the development of this work is sum- marised in four parts. Firstly, the lightning phenomenon is discussed and classified. Secondly, the photography of the fast transient discharge events is defined. Then, research relating to lightning attachment to or extending from tall structures is discussed and two towers in Johannesburg are introduced and evaluated. Finally, several different ways of representing lightning by means of models are discussed, which leads to the options available for 3D modelling methods. In particular, a 3D reconstruction method for modelling High Voltage (HV) discharge channels that was developed in 2008 is briefly discussed [3]. This study extends the real application to lightning discharge channels using the same system basis developed in 2008. A full discussion of the system is presented with additional adjustments. Section 2.1 provides a brief discussion on the lightning discharge is presented to cover the lightning terminology that is used in this document. Section 2.2 discusses the challenges of lightning photography ; this includes an Chapter 2 — Background 5 overview of current solutions and a discussion of possible camera solutions for this work. Section 2.3 investigates the interaction between lightning and tall structures. This is conducted by introducing some notable ground-work on this topic by Eriksson in 1978 [4], and then identifying tall structures around the world that are currently platforms for lightning research. Two tall towers in Johannesburg, South Africa are introduced: Brixton tower and Hillbrow tower. Section 2.4 discusses the existing three-dimensional modelling methods for lightning. The simulation of lightning is not new or uncommon. However, the reconstruction of lightning discharge channels of known, photographically recorded events is a relatively new topic and not extensively documented. Therefore, ex- isting methods that closely resemble the basis of this study are reviewed and the reconstruction of lightning or HV channels is discussed in the existing research. 2.1 The Lightning Discharge (a) (b) Figure 2.1: Cloud to ground (CG) lightning in the same frame as Cloud-to-Cloud (CC) lightning. (a) In one event, a downward CG lightning strike in the distance (left) preceeds a CC lightning event along the base of the clouds, branching towards the camera position. (b) Downward negative lightning flash as a CG strike (left) with CC activity in the same frame (right). This section introduces simple terms that relate to the lightning discharge, which is addressed in the rest of this document. In Figure 2.1, a sample of the two common types of lightning are demonstrated, the downward negative Cloud-to-Ground (CG) Chapter 2 — Background 6 lightning strike, and Cloud-to-Cloud (CC) lightning. Each of these lightning types are discussed in more detail. Lightning Nomenclature In different contexts, there are several defining nomenclature for lightning termi- nology that is used. This document refers to classical definitions of lightning terminology; in particular ‘negative discharge’ and ‘positive discharge’ is defined below: Negative discharge: A discharge that is initiated by a negative leader, independent of direction of leader propagation. Positive discharge: A discharge that is initiated by a positive leader, independent of direction of leader propagation. 2.1.1 Cloud-to-Cloud (CC) Lightning The more commonly occurring type of lightning is referred to as Cloud-to-Cloud (CC) or Intra-Cloud (IC) lightning. Two examples of these types of lightning discharges are illustrated in Figure 2.2. This is a blanket-term for the following types of discharges [1]: • Intracloud (from one charge center to another charge center in the same cloud), • Intercloud (from one charge center in a cloud to another charge center in a different cloud) and, • Cloud-to-air discharges (from a charge center in a cloud to a charge pocket in the air). 2.1.2 Ground Lightning Flashes The ground flash is the type of lightning discharge that engineers in the lightning field of research are mostly concerned about, and is commonly termed the Cloud-to- Ground (CG) for downward discharges, and ground-to-cloud for upward discharges. Chapter 2 — Background 7 (a) (b) Figure 2.2: Cloud-to-cloud (CC) lightning. (a) Possible intercloud lightning, (b) Cloud-to-air lightning. Lightning ground discharges are initiated by charge separation in a cumulonimbus cloud, forming a charge center in the cloud [1, 5]. From this charge center, a charge column or stepped leader is created, comprised of positive or negative charge carriers. The stepped leader is a self-sustaining process and can also split into branches that propagate towards the ground, depending on the leader polarity. The electric field is increased on the ground due to the approaching stepped leaders. Therefore, upward connecting leaders are initiated from higher points on the ground of the opposite polarity that travel upwards to meet with the approaching downward stepped leader. The intersection between the downward stepped leader and the connecting leader, also called the final jump, determines the striking or termination point of the lightning flash. The point of intersection from the ground termination location is called the striking distance. At the point of intersection, a return stroke travels up the channel back to the cloud. The return stroke illuminates the channel such that the naked eye can observe the lightning event, and is usually synonomous with CG lightning. A large majority of ground flashes contain several strokes, where subsequent strokes occur due to the remaining charge in the charge center of the cloud travels down the path of the initial return stroke channel, causing the flickering visual characteristic of lightning. A lightning flash can be made up of multiple strokes with the same, or sometimes unique termination points. Chapter 2 — Background 8 (a) (b) Figure 2.3: Negative downward lightning, the most common type of CG lightning usually portrayed by downward branching. Downward Negative CG Lightning The most common type of CG lightning flash is a downward negative discharge, believed to account for approximately 90% of all CG flashes [1]. Negative downward lightning is visually characterised by the appearance of multiple downward branching in the channel propagation towards the ground, as demonstrated in Figure 2.3. This type of lightning discharge is initiated by the generation of negative charge centers near the bottom of the cloud [1, 5]. From this charge center, a negatively charged stepped leader is created and often splits into branches that propagate towards the ground. Downward Positive CG Lightning Positive CG discharges are less common than its negative counterpart, and is believed to account for approximately 10% of all CG flashes [1]. Early studies of this lightning type produced some confusion and misclassification. However, attention was brought to continued research of positive flashes due to several characteristic properties, which includes high recorded currents, being the dominant type in cold seasons (most notable in Japanese winter storms). Visual characteristics of positive CG flashes include: 1. Mostly single strokes (per flash) 2. Long continuing currents (tens to hundreds of milliseconds) Chapter 2 — Background 9 3. Return stroke preceeded by cloud activity 4. Long horizontal channels (tens of kilometers) These positive CG flashes have been reported to occur at the beginning or towards the end of a thunderstorm, once most of the negative charge has been depleted from the clouds [1]. It is believed that the flashes are initiated in the upper positive region of the thundercloud, although there is also evidence of long horizontal discharges initiated from other layers (such as the layer near the 0◦ isotherm). Upward Lightning (a) (b) Figure 2.4: Upward lightning on Brixton tower visually characterised by branching in the upward direction. Upward lightning mostly propagates from points on the ground which produce a concentrated electric field [1, 4]. The field is often enhanced by higher ground or structure geometries with relative heights of approximately 100m. Higher objects tend to produce a higher probability of initiating upward discharges. Upward lightning is visually characterised by the appearance of upward branching in the channel propagation, as demonstrated in Figure 2.4. Upward lightning can also be classified by polarity; the classical definition defining the polarity according to the initiating leader from the ground, and the newer definition defined by Rakov and Uman defines the polarity according to the charge lowered to the ground [1]. This document uses the classical definition of lightning polarity. Chapter 2 — Background 10 2.2 Lightning Photography Early observations of lightning started with open-aperture photography. Lightning is only visible within several microseconds and each flash takes on a unique channel path. Despite these challenges, lightning photography has helped to immortalise lightning flashes and assisted researchers to identify common characteristics of the different types of lightning. Further information is provided in Appendix A. Hoffert and Walter obtained the first useful photographs around 1889 − 1902 that showed the seperate strokes of a lightning flash [2]. This was achieved by manually rocking an ordinary camera on a set axis with an open lens exposure. Due to this manual nature, the time intervals between strokes could not be accurately determined. Later, the Boys camera played an important role into providing some additional understanding in the temporal nature the lightning strokes and subse- quent strokes, measuring of time intervals between strokes to a few microseconds. With the advancement of technology, high speed cameras with aperture speeds ranging to 50, 000 frames per second (fps) or more, have provided opportunities to observe phenomena surrounding lightning flashes that have yet to be discovered. Despite the development of cameras reaching speeds of approximately 700, 000 fps, the camera framerates are limited by the image resolution. As speeds get higher, image resolutions are subsequently traded off. 2.2.1 Challenges of Lightning Photography To reconstruct a lightning discharge channel, photographs of an actual lightning flash event must be captured. The difficulties involved with capturing images of a lightning flash are listed below. Some of these difficulties also apply to the photography of general HV channels. • Event duration • Intensity of the light discharged • Unpredictability (or statistical nature) of the event occurrence • Lack of verification methods Chapter 2 — Background 11 The short duration of the discharge event presents a difficulty with conventional photography techniques, and requires a specific choice in the image capture device or specialised techniques. The intensity of the light emitted from the event may need to be considered to more photosensitive devices; this varies with the camera placement from the targetted event. The unpredictability of the event refers to two specific factors: its position and its time of appearance. This makes the photography of lightning flashes a statistical problem. From a research point of view, in order to reconstruct an object, verification needs to be performed with the original object. This becomes an issue with a lightning or HV discharge channel, due to its unique discharge path. For the scope of this work, the use of multiple camera perspectives is essential in capturing the same discharge channel. Several difficulties arise with a multiple camera system, which include the synchronisation of the camera devices and the triggering mechanisms involved, suitable placement of cameras around a known lightning attachment region and accompanying permission for access, and varying distances and elevations of camera locations. 2.2.2 Existing Research: Photography of Lightning There are several researchers that make use photography of lightning, and often lightning occurring at tall structures. These researchers investigate lightning dis- charge attachments to tall structures using 2D digital images from conventional video cameras, or high-speed cameras. These studies provide valuable insight into the photography of lightning discharges in relation to physical current measurements taken at the instrumented tower. No mention of a 3D model is included in these papers, although some produce images from multiple capture devices to provide a sense of spatial distribution. Additional discussion on lightning photography is covered in Section 2.3.1. In 1978, Eriksson examined lightning flashes to a 60-m tall mast using two cameras spaced approximately 90◦ apart [4]. Eriksson’s investigation is discussed in more detail in Section 2.4.3. In 2008, Cummins et al provided some preliminary experimental results that could ultimately lead to producing a time-resolved 3D model of CG lightning discharges [6]. The paper describes an experimental design, equipment used, and experimental logistics for photographing lightning discharges from different perspectives, citing Chapter 2 — Background 12 the challenges in ensuring synchronised camera operation of different perspectives at remote sites. The preliminary results provide 2D time-resolved images of negative and positive flashes, and recoil leaders. In 2008, Saba et al produced research on lesser-documented characteristics of positive leader using high-speed video photography [7]. A combination of high-speed cameras were used in conjunction with Lightning Detection Network (LDN) data for analysis of storms in Brazil and USA. 2.3 Lightning to Tall Structures Lightning study observations of frequently struck structures have formed an impor- tant component of lightning research [4, 8, 9, 10]. Since lightning has a tendency to terminate to (or initiate from) the tallest object in its immediate area — these structures are typically tall or isolated. It has also been found that structures taller than 60 meters have the ability to initiate upward lightning [4]; the higher and more slender the structure, the higher the probability of initiating upward lightning. In 1978, Eriksson devised equations to determine the lightning incidence to towers; these equations are still largely being used in the present day [4]. The set of emperical equations defined the following: 1. An effective height of a structure taking into account the slenderness ratio; 2. The total structure incidence given the ground flash density and the height of the structure; and 3. A probability based calculation for upward vs downward flashes from/to the structure. Eriksson’s equation in Equation 2.1 provides the expected incidence of the tall structurem, given the effective height of the structure, Heff in m and the ground flash density of the surrounding area, Ng in flashes/km2/year [11]. Additionally, Eriksson and Meal’s equation in Equation 2.2 determines the percentage of upward incidence to a tall structure [12], where Pu is the percentage of upward incidence, and Hs is the height of the structure in m. Chapter 2 — Background 13 N = 24× 10−6 ×H2.05s ×Ng (2.1) where N = Lightning incidence, flashes Hs = Height of structure in m (or Heff ) Ng = Ground flash density, flashes/km2/year Pu = 52.8ln(Hs)− 250 78 < Hs < 518 (2.2) where Pu = Upward probability of flashes to a structure, % Hs = Height of structure (or Heff ), m 2.3.1 World-Wide Lightning Research of Tall Structures Many tall towers, wind turbines and chimneys have been under observation for studying lightning and its characteristics. Notable tall structures include: • Canadian National (CN) tower in Toronto (553 m tall) [1, 8, 13, 14, 15], • Peissenburg tower in Munich (160 m tall on 288 m high mountainous ter- rain) [1], • Gaisberg tower in Salzburg (100 m tall +1287 m above sea level) [1] • Council for Scientific and Industrial Research (CSIR) mast in South Africa (60 m) [4], • Ten-tower configuration in South Dakota (various heights) [16, 17] and • Fukui Chimney in Japan [18]. CN tower, Peissenburg tower and Gaisburg tower have the advantage of being the tallest object in the immediate area. Since these towers (or their effective heights) are so tall, they have a high probability of triggering upward lightning and tower tips are often situated too high up for optical recordings due to cloud cover or mist. Chapter 2 — Background 14 These towers are therefore limited in their observed lightning types and photographic observations to upward flashes. Each of these towers measure lightning on the tower tips by means of Rogowski coils and electromagnetic sensors. The CSIR mast was designed to attached downward lightning flashes to its tip and as of present day, has been decommisioned. Although, an example of a site with a wider range of lightning observations is in Rapid City, South Dakota, USA, which consists of ten towers with heights ranging from 91 m to 191 m situated on a ridge approximately 180 m above the surrounding terrain [16, 17]. This site observes both upward and downward lightning using a combination of high speed, normal speed (60 fps) and still cameras, and electromagnetic field sensors. 2.3.2 Towers in Johannesburg, South Africa Johannesburg is a city in South Africa, situated in the southern hemisphere with a high ground flash density region of approximately 7.5 – 12 flashes/km2/year [19, 20]. By considering the Johannesburg skyline in Figure 2.5 and with the high ground flash density in mind, two towers are identified as good candidates to observe lightning attachment: Brixton tower and Hillbrow tower. Both towers have been historically common subjects for lightning research in Johannesburg [9, 21]. Brixton Tower Brixton tower is commercially known as Sentech tower, and formally known as Hertzog tower [21]. Its construction was completed in 1962. It is approximately 237 m tall and stands quite prominently as the tallest structure in the immediate 2 km radius area. The expected lightning incidence to the tower is found to be 23.72 flashes/year, Figure 2.5: Brixton (237 m) and Hillbrow towers (270 m tall) are indicated as the highest points in the Johannesburg skyline to date, laterally separated by approximately 4.8 km. Chapter 2 — Background 15 using Eriksson’s equation in Equation 2.1. Given the height of the tower, Eriksson and Meal’s equation in Equation 2.2 determines a 61.53% probability of triggering upward lightning. This means there is an approximate 40% probability of downward lightning leaders being intercepted by upward propagating leaders initiated from the tower. This is a much higher probability than most of the world-wide structures mentioned in Section 2.3.1. Therefore, Brixton tower has a larger variety of upward flashes and downward lightning interception occurring at its tip. (a) (b) Figure 2.6: Negative downward flashes on Brixton tower, appearing to originate from overhead the location of the surveillance camera. Flash occurring on (a) 1 January 2011 at 15:44:56.980s (b) 8 February 2011 at 17:56:12.100s. In 1969, Malan observed lightning activity flashing to the tower; noting some strange thunderstorm behaviour around the tower [21]. The extracts have been taken from the paper as a reference: It came as a surprise to find that the 770 ft Hertzog Tower is practically never struck by lightning when an active thunderstorm passes overhead. ... Very rarely one of the 2 km distant flashes to ground has been observed to produce a long horizontal branch which ends on the Tower. – D.J. Malan (1969) [21] Similar ‘long horizontal branch(es)’ ending on Brixton tower have been observed in the onset of this study. Such long horizontal channels, specific to downward negative lightning attaching to the tower, appear to originate in a cloud charge center located overhead the building housing one of the surveillance cameras, located approximately Chapter 2 — Background 16 2 km from the tower. Sample images of such cases illustrating the discharges channels terminating on the tip of Brixton tower is shown in Figure 2.6. Appendix B presents a recent study on lightning observed with relation to Brixton tower, which also serves as a motivation for studying lightning in 3D [22]. This paper attempts to determine the position of a lightning strike with an unknown termination point. A ‘third’ dimension is obtained using matched LDN data. Hillbrow Tower Hillbrow tower was previously known as the JG Strijdom Tower, named after a former South African prime minister [23]. Hillbrow tower is 270 m tall, which makes it one of the highest human made structures in Africa. Its construction was completed in April 1971. It is located approximately 4.8 km east of Brixton tower. In Figure 2.7, a possible lightning flash to Hillbrow tower is presented, where the tower tip is concealed by the tree top. Figure 2.7: Possible flash to Hillbrow tower photographed from surveillance location of the tower. Chapter 2 — Background 17 2.4 3D Lightning Modelling Methods The concept of three-dimensional modelling is not conventionally associated with the reconstruction of lightning discharge channels. Although this topic is primarily based on the reconstruction of 3D models, a broad overview of lightning modelling is presented. This overview includes the scientific simulation of lightning, in its various applications, and graphic simulation of lightning in digital media. Existing research directly related to this research topic is discussed more exten- sively. These works include the computational reconstruction of lightning or HV discharge channels using discharge channel information from photographed images. A complete overview of these solutions is provided, from theoretical studies to reconstruction of actual discharge events. Definitions The term ‘modelling’ is understood as a term used when a physical quantity is represented in a different medium; in the modern day, usually consisting of com- puter based representation. In this document, the terms ‘model’, ‘simulation’, and ‘reconstruction’ are used with the following definitions in mind: Model: A schematic description of a system, theory, or phe- nomenon that accounts for its known or inferred prop- erties and may be used for further study of its character- istics. — TheFreeDictionary.com Simulation: The representation of the behaviour or characteristics of one system through the use of another, esp. a computer program designed for the purpose. — Dictionary.com Reconstruction (or Reconstruct): To re-create in the mind from given or available informa- tion. — Dictionary.com 2.4.1 Scientific Lightning Simulation Methods In the scientific field of lightning research, CG lightning leader propagation is most simply simulated by a straight downward propagating leader [24]. This kind of Chapter 2 — Background 18 assumption is usually based from research involving the final jump and striking distances – in the case of a downward negative leader connecting to a positive upward leader. Similar assumptions are made in the study of the effects of the return stroke [25]. This simplified representation of a straight downward propagating leader is, of course, not the case for natural lightning, but has its merits in the study of fundamental processes. In 1990, the notable lightning leader propagation simulation was developed by Dellera and Garbagnati [26, 27]. This research provided insight into the statistical nature of simulated lightning paths. In 2009, Gulya´s and Szendenik presented a preliminary mixed physical-probabilistic 3D model to simulate downward negative lightning in relation to ground topogra- phy [28]. The purpose of this solution is, as discussed by the authors, to simulate the likely lightning termination points in a given ground topography and provide a performance evaluation of simulated lightning protection on affected areas. This computer simulation tool is based on a 2D solution, which combines concepts based on physical and probabilistic lightning simulation modelling methods. The development of the proposed 3D simulation model is intended to provide a more realistic scenario of the ground geometry (i.e. spatial distribution of buildings), and the resulting lightning termination points of the CG downward strikes. 2.4.2 Rendered Applications Lightning simulations have mostly been rendered for visual purposes. This includes digital art, video media (animation) and gaming. The simulation of 3D lightning is mostly used within the gaming industry. Several solutions to simulating a lightning channel have been accomplished within the computational application of visualising lightning channels. In 1994, Reed and Wyvill were the first to visually simulate lightning using con- ventional ray-tracing techniques in the computer graphics field [29]. Their method referred to Dellera and Garbagnati’s paper on scientifically simulating the light- ning stroke leader progression, by means of probabilistically determining the leader progression using particle systems [26, 27]. Their simulation was used to render a realistic looking lightning model for animation purposes, so their solution included background scenery and using the model as a light source to provide a glowing effect on nearby objects. Chapter 2 — Background 19 In 2001, Dobashi et al used Reed and Wyvill’s lightning simulation method to determine the scattering effect of the lightning light source on surrounding clouds and atmospheric particles [30]. These solutions have one major flaw; there is no deterministic way of knowing what lightning actually looks like. By using Dellera and Garbagnati’s lightning simulation method, these computational solutions only simulate theoretical lightning, which is what many people have come to believe is the physical appearance of lightning. This research seeks to reconstruct lightning channels from actual events, as opposed to merely simulating the phenomenon using probabilistic methods. 2.4.3 Existing Research: 3D Channel Reconstruction This section reviews the past published methods that have been used to reconstruct the channel shape of the lightning flash, or HV discharge channels for various different applications. These methods include a brief description of the environment in which the discharge channel was photographed, the camera considerations and subsequent geometries, and the reconstruction methods. These works provide more relevant background information to reconstruction mod- elling applications, as most other lightning modelling techniques (determined in Section 2.4) consider a set of emperical equations and computationally determine a theoretical propagation path of the lightning channel. Eriksson’s Three-Dimensional Lightning Reconstruction In 1979, Eriksson investigated the striking distances of downward negative discharges striking the CSIR mast in Pretoria, South Africa using a 3D analysis of lightning photographs [31]. This methodology is described in further detail in this section. Two image perspectives were obtained at an angular separation of 109◦ for seven flashes. Cameras were placed facing up towards the mast tip at different inclined angles (depending on distance from mast and location of the camera), such that corrections needed to be made through geometrical anyalsis. These corrections were performed by a computer tool (termed Flash), which was developed by the National Research Institute for Mathematical Sciences. Both cameras were fitted with a Chapter 2 — Background 20 graticule grid in front of the lens which provided a scaling measurement with respect to the focal point of the camera. The lightning channel information from the images was extrapolated to a 2D Carte- sian plane, transformed and superimposed onto a (y-z)-x Cartesian plane where the y and z axis extends upwards in the same direction and the origin is defined as the mast tip. This transformation was also performed by Flash. Eriksson defines an overall error in the reconstruction procedure of 3%, citing that the main errors are determined by input errors and the digitisation process of the images. Of the seven flashes recorded by the two cameras, only three were classified as downward negative, and were therefore candidates for reconstruction to determine striking distances. Liu and Rapson’s Reconstruction Method In 2009, Liu and Rapson established a preliminary system to produce a 3D model of a discharge channel in a controlled laboratory environment [3]. This paper reference has been provided in Appendix C, but the method is discussed briefly in this section. It should be noted that this method is the basis of the reconstruction method used in this study. Multiple digital images were taken using three surveillance cameras of a discharge channel from a large HV air-insulated rod-rod gap within a laboratory. The images were filtered and processed to render a 3D model of the discharge channel using an application built from open-source software for cross-platform capabilities. y x z (a) (b) Figure 2.8: A basic representation of the reconstruction method. Chapter 2 — Background 21 Figure 2.8 illustrates a simplified representation of functionality of the algorithm [3]. The reconstruction method was based on recreating the laboratory scenario in a virtual environment, as shown in Figure 2.8a. The 3D problem is reduced to a series of 2D geometric calculations, by extending normals from the image to the center, and creating a pixel-high cylinder where the normals meet, as shown in Figure 2.8b. Gu et al’s Reconstruction Method In 2011, Gu et al devised a method to reconstruct a long air discharge channel to study the tortuosity of the channel [32]. A 2-meter long positive switching impulse gap was investigated in the study. A set of geometric equations were presented which infer the three-dimensional information of images taken from two orthoganally placed cameras that have been normalised to boolean images, and channel height. 2.5 Conclusion This chapter has described four parts that pertain to the foundation of this work: the lightning discharge; the photography of lightning, lightning research to tall structures and general 3D modelling and reconstruction methods in representing the lightning discharge. The following chapter defines the problem statement to this work. The approach taken to accomplish this work is outlined through a discussion of the system de- signed to produce 3D recnstructions of discharge channels and methods used for its evaluation. 22 Chapter 3 Approach Taken An overview of the work addressed in this study is discussed in this chapter, providing the problem statement, the methodology, and the con- tribution of this work. The methodology used to perform the feasibility study is provided in the context of the system designed to reconstruct three-dimensional (3D) discharge channel reconstructions, and the test data used to perform an evaluation of the system performance. 3.1 Problem Statement Despite advances in lightning research, there are still many questions left unanswered about the topic of lightning. It is well known that lightning often takes on very unique channel shapes, as illustrated in Figure 3.1. It is often very difficult to per- ceive the channel shape and path with a naked eye or even with the use of expensive camera equipment without the third spatial dimension. With multiple perspectives of a specific lightning flash, it is still difficult to perceive its 3D characteristics if no processing steps are undertaken to represent the channel in three dimensions. Therefore, the digital reconstruction of a 3D model would provide researchers with an additional dimension with which to analyse lightning flashes. By obtaining a 3D representation of a discharge channel (lightning or high voltage discharge) the channel can be properly analysed in an interactive 3D visualised space, with options to zoom, tilt and pan. A system is designed to photograph multiple two-dimensional (2D) images of a discharge channel from different spatial perspectives and represent the discharge as Chapter 3 — Approach Taken 23 (a) (b) (c) (d) (e) (f) Figure 3.1: Time series of a tortuos lightning channel with unknown spatial distribution taken on 19 December 2010 at 02:52:42 − 0.930 s. (a) CC preceeding ground flash (Reference time: +0 s) (b) CG discharge (+0.100 s) (c) +0.210 s (d) +0.330 s (e) +0.660 s (f) +0.770 s. a 3D model. Two investigations are conducted and compared in order to determine the feasibility of reconstructing lightning discharge channel models using digital images. 3.2 System and Evaluation A system is designed and developed to accept digital images and associated camera positions to render a 3D reconstructed lightning model. The scope of the study includes testing the system against images obtained from laboratory-generated and natural lightning discharge channels. The two investigations provide the test infor- mation to determine the feasibility of the system for practical implementation on a 3D reconstruction of natural lightning attachment to tall structures. The study is scoped to follow three distinct components. 1. System design (Chapter 4) 2. Testing: HV laboratory investigation (Chapter 5) 3. Testing: Physical lightning investigation (Chapter 6) Chapter 3 — Approach Taken 24 The High Voltage (HV) laboratory investigation provides appropriate test data for determining the validity of the system within a controlled environment and indicates a preliminary small-scaled example of some difficulties in the setup of necessary equipment. The nature of the controlled investigation provides the means of a preliminary study to determine and correct for different camera positions. This provides a small scale solution to the topic at hand. The physical lightning investigation includes the reconstruction of two lightning flashes to produce an accurate and usable reconstructed model. This investigation includes more complication than the controlled laboratory environment in terms of camera logistics, storage, and statistical predictability. This therefore limits the number of discharges that can be reconstructed. A feasibility study is developed from the individual investigations, for both single- channelled and branched discharges. The success of the laboratory investigation can potentially produce a 3D reconstructed discharge channel with acceptable error margins from an image dataset obtained in a controlled environment. This acts as a small-scale solution to the approach. The success of the physical investigation produces a 3D reconstructed discharge channel from data captured from a naturally occurring lightning strike. A comparison arising from the success criteria of the two investigations allow for determining the feasibility of extending the system to a real-world applications. 3.3 Contribution of this Dissertation By obtaining a 3D representation of a discharge channel — either a HV discharge or lightning, the channel can be properly analysed in 3D visualised space. The motivation behind this research stems from the fact that lightning research has previously been limited to 2D representations. Most 3D lightning models are based from theoretical knowledge based on the work of Dellera and Garbagnati [26, 27] or created for aesthetic purposes for digital media such as 3D games, movies and flight simulators [29, 30, 33]. Chapter 3 — Approach Taken 25 3.3.1 Main Contribution Due to the fast transient nature of the lightning event; a strike is difficult to fully perceive with a naked eye; let alone in a 3D perception. Even with the photography of certain strikes, the physical distribution and dimensions of the lightning channel can only be assumed by channel or branch luminosity, which may differ depending on the amount of charge associated with the branch in question. A single photographed images only provides information in 2D, which limits eval- uations of specific case studies, such as mentioned in Appendix B [22]. Current research discussed in Section 2.2.2, consists of conventional 2D image capture of lightning discharge channels for specified studies, which does not provide an accurate spatial distribution of the channel. This generates a need to develop a system that is capable of reconstructing a discharge channel within 3D space, providing a more accurate spatial distribution of a channel, which is able to encompass its directional data and split branches. This research serves to be a stepping stone toward the reconstruction of 3D lightning models. By constructing a 3D model of a discharge channel, a better understanding of how the path of a large HV discharge channel or lightning flash develops its pattern in a more comprehensive manner, which can provide more information to better model the lightning channel. In the case of lightning, a better understanding of the termination points, and the (a) (b) Figure 3.2: Demonstration of downward negative flashes that appear to be inter- cepted by upward leaders from the ground. This is demonstrated by a sharp change of direction in the channel path. Chapter 3 — Approach Taken 26 striking distances can be evaluated. If a 3D model can be constructed of the lightning flashes in Figure 3.2, the actual striking distance can be determined from the sharp change in path direction, without inferring a distance based on its 2D representation. 3.3.2 Possible Extension to this Work The use of 3D reconstructions of HV and lightning discharge channels provides comprehensive details on the channel path over its duration. There are several applications expected for reconstructed 3D discharge channels. This includes channel tortuosities, as described in Gu et al’s application in which channel tortuosities are calculated from a series of positive switching discharge channels [32]. Applications also include the evaluation of striking distances of lightning flashes to tall structures as discussed in Eriksson’s work [31]. This study can also be extended to electromag- netic field simulations of a the propagation of the lightning path, given the known 3D co-ordinates of the lightning channel. Lastly, further extension can be applied to time resolved lightning leader propagation provided several assumptions made about the stepped leader lengths. The following chapter defines the system designed for perform 3D reconstructions of discharge channels. The photography of discharge channels and processing of images is included as part of the system. The system also includes the reconstruction algorithms used to produce models of a 3D nature from images and the relative positions of cameras obtaining the images. 27 Chapter 4 System Design A system is developed to capture images of High Voltage (HV) and light- ning discharge channels at multiple perspectives and process the images to render a reconstructed three-dimensional (3D) model of the discharge channel. This chapter discusses the components of the system, including the photography of the discharges, image processing to identify channel information, extrapolation of 3D channel information, and testing and evaluation methods. 4.1 System Overview Figure 4.1: Block diagram demonstrating the three-dimensional reconstruction system overview and flow. An overview of the system and general flow diagram is presented in Figure 4.1. The system includes the photography of discharges, image storage methods, synchroni- sation issues, processing of images and relevant discharge information, and finally rendering the data to a 3D model. The processing stages are presented, from image insertion to producing a 3D model in an interactive user environment. For further information on the ground-work for this system, refer to Appendix C [3]. The testing of discharge channel image data used to validate the system capabilities is presented in Chapters 5 and 6. Chapter 4 — System Design 28 4.2 Photographic Equipment The capture of image data takes into consideration the acquisition of image data through a variety of cameras and optical filtering. This process includes the choice of cameras used for discharge channel photography, management of the resulting image data and optical filters that are required. Each subsection discussed in the image capture component is described in Figure 4.2, which applies to all discharge environments: HV or lightning discharges. Figure 4.2: Discharge image acquisition using optical filters and cameras. 4.2.1 Data Filtering: Optical Photographed images require only the intense light of the discharge channel in the captured frame. For the purpose of this study, only wavelengths of the visible light visible spectrum (380 to 750 nm) are required for modelling the discharge [34]. The insignificant data needs to be filtered out; this includes the experimental environment and additional glare occurring due to the discharge. Optical filters are used to obtain usable data in the images. A combination of cross-polarised filters and camera configurations provide images that can be used for the reconstruction. The use of the filters is also widely dependent on the camera lens control capabilities. The images in Figure 4.3 display the different captured image variation using differ- ent layers of optical filters. It may be assumed that all images presented in this study are filtered with any combination of these filters, unless otherwise stated. Figure 4.3a shows the image captured of a lightning discharge channel without optical filters. Chapter 4 — System Design 29 (a) (b) Figure 4.3: Comparison of lightning images with different optical filter combinations. These images are taken from separate lightning events with the same camera. (a) No filters (b) Cross-polarised filters. (a) (b) (c) Figure 4.4: Comparison of high voltage discharge images with different optical filter combinations. These images are taken from separate lightning events with the same camera. (a) Cross-polarised filters (b) Cross-polarised and infrared filters (c) Cross- polarised, infrared and violet filters. It can be observed that the image is extremely overexposed. Two linearly polarised lenses are placed perpendicularly to construct a cross-polarised filter, which reduces the glare and intensity of light entering the lens. The image captured from this filter is illustrated in Figure 4.3b. In a HV laboratory environment, an additional combination of filters are used, due to the close proximity of cameras to the discharge channel location. Figure 4.4a demonstrates how cross-polarised filters do not sufficiently reduce the light entering the lens. Additional infrared filters are used to reduce a portion of visible light Chapter 4 — System Design 30 spectrum to the capture device. By using the infrared filter, the light in the infrared spectrum is allowed through the filter. The image captured from this filter is illustrated in Figure 4.4b. The violet filter is used to further reduce the light wavelengths to the capture device. By using the violet filter, only the lower end of the light spectrum is allowed to pass. The image captured from this filter is illustrated in Figure 4.4c. A disadvantage to using optical filters is the possible loss of image detail brought about by damaged lenses but this is neglected for the purpose of this experiment. The optical filters have also shown to produce reflections on some recorded images, as shown in Figure 4.8. 4.2.2 Cameras The traditional camera specifications are discussed in Section 4.2.3, in relation to settings chosen for discharge channel photography. These cameras are disadvantaged in the fact they they need to operate in unusual electromagnetic environments, and these issues are discussed in Sections 4.2.4 and 4.2.5. Additional cameras features are discussed in Sections 4.2.6 and 4.2.7. It should be noted that the camera settings mentioned in this section are not all inclusive of the camera functionality, but merely the configurations used for the purposes of this study. A range of relatively low-cost Internet Protocol (IP) surveillance cameras from Axis® Communications have been chosen [35]. The cameras have various advan- tages regarding its configuration flexibility and additional features that standard camera technology lack. Additional features include networking capabilities; remote storage and triggering options, providing the capability to automate photography of discharge channels [36, 37, 38]. A combination of four different Axis models (of varying quantities) are used in a variety of applications. The four camera models are listed below: • Axis 207W • Axis 207MW • Axis M1011 • Axis P1344 Chapter 4 — System Design 31 This section discusses the cameras that have been used in this system, describing the operation of each camera model and providing a summary of the camera usage and status to date (refer to Table A.1 in Appendix A). It should be noted that the use of different camera models may produce some differences in image quality and captured information, therefore presenting mismatching information when comparing two or three images of the same event. This may impact on the quality of reconstructed models resulting from the system, but image processing steps are discussed in Section 4.3 to minimise these image differences. 4.2.3 Camera Operation All the camera models measure framerates in frames per second (fps), and have a maximum framerate of 30 fps, although becomes limited with the use of an image pre-buffer (described below). The 207W model has a maximum resolution of 640× 480, although the 207MW, M1011 and P1344 have options for higher resolutions in the mega-pixel range. The cameras operate according to the settings as shown in Table A.1 in Appendix A, but are described in further detail in this section. An advantage to using a surveillance camera includes the ability to manage the cam- era feeds from a single processing unit, specifically a laptop. The commununication options are discussed further in Section 4.2.6. The cameras all have web interface capability, which provides a live view of the camera feed and possibility of remote triggering, assuming cameras are being monitored at the time. The camera settings enable options for a timer pre-buffer and a post-buffer, which limits the amount of data recorded. The pre-buffer function is essential for external triggering, as it is only activated once the discharge has occurred. Since the 207W model was the original camera model used, and the most limited in functionality, many operational settings were callibrated according to this camera model. The 207W Random Access Memory (RAM) limits the duration of the pre- buffer to 2 s, which then operates at a framerate of 10 − 15 fps. The frame rate is therefore used to optimise the buffer setting. For most discharges, it is expected that only one image would capture the channel, but lightning discharges can have durations lasting several microseconds, and therefore, being captured over several frames. To reduce the number of steps that need to be taken on image processing, the images are set to record in greyscale, since only the intense white light from the discharge is Chapter 4 — System Design 32 required. This option is readily available in all camera models except for the P1344 model. 4.2.4 Camera Safety in Laboratory Environment The main concern with operating electronics in a high electromagnetic environment (transients in particular), is shielding and electrical isolation of the circuits. This is due to the transient behaviour of the discharge, which may introduce surges in the circuit. With this in mind, fragile electronics, such as processing units need to be protected from the surrounding area of the discharge. This is particularly important to consider when operating a camera in the HV laboratory environment. Therefore, this has an effect on the power options, data storage and general communications to the camera. The specific operations of camera safety is discussed in this section, and a summary of the camera safety capabilities is provided in Table 4.1. Table 4.1: Camera safety capabilities for operation in either the high voltage laboratory or phyical lightning investigations. Camera Communications Power Operation Model Isolation Isolation Location Axis 207W yes − lightning Axis 207MW yes − lightning Axis M1011 − − lightning Axis P1344 yes yes HV/lightning Electrical Isolation of Communications The wireless option in the 207W and 207MW models provides an advantage in the network connection through electrical isolation in the communications link. This is important since the cameras do not have onboard memory, and need to store recorded data to an external source. Therefore, by using the wireless option, these cameras are unaffected by the transients through its communications link. Chapter 4 — System Design 33 The M1011 operates much like the 207 range cameras, without wireless functionality. The camera communicates only through an ethernet Local Area Network (LAN) cable and stores to an external source, and therefore cannot be used within a laboratory environment. The P1344 cameras have on-board storage, through the use of a removable Secure Disk (SD) card slot, and all components of the sensitive camera electronics are enclosed in a metal casing. Electrical Isolation of Power Supply Using electrically isolated camera setups in the HV laboratory investigations are necessary to adequately protect cameras from electromagnetic transients and stray capacitances. All the camera models have an external input power option, with additional ports for external triggering. Isolated power supplies have been used for each of the camera models, depending on its model specifications, and limitations and results are presented. The 207 camera range and the M1011 camera have an input voltage with a small range of variance of 5 ± 2% V [36]. Through an attempt to isolate the circuit with a 5 V regulated power supply, it is found that the cameras require a high start up current; which cannot be readily provided by a simple LM7805 regulator. The M1344 cameras have variable input voltage range of 8 − 20 V. This allows the usage of a common 12 V lead acid battery connected directly with the input terminals to power an single camera in a HV laboratory. Small lead acid batteries are used for portabilty of cameras to remote sites. 4.2.5 Camera Limitations in Functionality It is important to note the limitations in the functionality of each camera model, in relation to photographing discharge channels, as the images have a direct propor- tionality to the quality of models that are produced. Common disadvantages of using these cameras are that images get spliced and overexposure (or even underexposure) of the lens with the use of an optical filter. The 207 and M1011 camera ranges have additional limitations, in particular with the photography of HV discharge channels in image quality, fixed iris and the Chapter 4 — System Design 34 requirement for a network connection to record images. The use of the M1344 cameras reduce all the additional limitations. Image Corruption Due to the fast nature of a lightning flash, the shutter speed of the cameras become significant. Although the cameras operate at 15 fps, which is considered a relatively slow frame rate, the camera is often capable of capturing a full flash without encountering an image splice produced by the shutter speed of the image refreshing process. However, the shutter speed is shown to be finite with respect to the lightning discharge event through the evidence of horizontal image splicing. Figure 4.5: Image splicing for Axis 207W. Two subsequently occurring discharges are captured between a frame change, Marker 1 indicates the bottom portion of the first flash, and Marker 2 indicates the top portion of the second flash. In Figure 4.5, two subsequently occurring downward negative discharges are pho- tographed in one frame, indicated by Markers 1 and 2. Each discharge is missing information due to the finite shutter speed with respect to the speed of this discharge event. The offset of the shutter can be seen in the band between Markers 1 and 2. In addition to the image splicing caused by the shutter speed, the P1344 model has another process of corrupting the images as shown in Figure 4.6. From experimen- tation, the cameras often record corrupted image data mostly in the pre-buffered data. It is assumed that this has to do with file format encoding, and can only be resolved through updating the camera firmware – at present this problem has not been resolved in the firmware updates. Chapter 4 — System Design 35 (a) (b) Figure 4.6: Image splicing and pre-buffer induced corruption of information for Axis M1344. Images are taken of the same discharge, 94◦ laterally separated. (a) Vertical image splicing, (b) Vertical image splicing and pre-buffer corruption. Overexposure The cameras are intended for the purpose of capturing graphical discharge informa- tion occurring at a set point, i.e. tower terminations. Discharges occurring in the surrounding region of the termination point are often photographed by the cameras, and can either be underexposed, or overexposed. The use of optical filters are used to optimise the photography of discharges at the intended termination point. (a) (b) Figure 4.7: Overexposure for Axis 207W with the use of optical filters. (a) Overex- posed frame (b) Normal frame of overexposed flash 20 ms after (a) is photographed. Chapter 4 — System Design 36 However, the exposure of the lens during a lightning event will be discussed with re- gards to surrounding flashes. The overexposed frame occurs occasionally, and whites out the channel definition to unusable image information, as shown in Figure 4.7a. A comparison of an overexposed frame with a normally exposed frame is shown in Figure 4.7a and b. These images occur 20µs apart using the same camera. Discharges that are underexposed may not provide enough of a change in pixels to trigger the motion detection functionality in the cameras, and therefore not recorded. These events may be assumed to be a little concern in this study. Image Obstructions The camera was situated indoors, behind a glass window, which would explain some of the light distortions in some of the frames due to rain droplets. An example of this can be observed in Figure 4.7b, indicated by the three rings of light close to the position of the flash. Additionally, the cameras are occasionally placed in positions where physical ob- structions can be observed in the frame. It can be seen that in these cases, portions of the lightning flash are obscured, and therefore limit the extent of the potential models which can be reconstructed. Surface Reflections On some occasions, the images are corrupted by reflections of the channel. The re- flections are either caused by windows (of indoor setups or outdoor camera housings) or the optical filters place in front of the lens. Most images that obtain reflections have a single ghosted reflection of the original channel. A double reflection is rarely recorded on the image, as shown in Figure 4.8. In total, there are three resulting reflections of the original channel, indicated by Markers 2, 3 and 4. 4.2.6 Network and Communication Being IP cameras, the range of cameras all have an ethernet LAN connection for communicating with the cameras from an external processing unit. This is the most Chapter 4 — System Design 37 Figure 4.8: Channel reflections recorded on an image taken with the Axis 207W. The number of the reflections depend on the intensity of the illuminosity, either one or three reflections. Marker 1 indicates the original channel, Marker 2 indicates the first reflection (more common), Markers 3 and 4 indicate reflections of 1 and 2, respectively. basic form of communication used with all the cameras for configuration, general setup and maintenance. External Storage The 207 camera range, and M1011 require a connection to a network to operate as required. In the HV laboratory, the 207 cameras are connected wirelessly to the network. Cameras upload and store the recorded image feed through a File Transfer Protocol (FTP) server to a specified directory on the network. On-Board Storage Cameras with on-board storage provide the opportunity for the camera to operate without a network; i.e. server or dedicated processing unit. This means that cameras can operate in remote areas, and only require a constant power supply. The P1344 cameras have an option to use the on-board SD card slot. Maintenance regarding the collection of data from SD cards is therefore dependant on the amount of motion activity in the area and the size of the memory card. Chapter 4 — System Design 38 4.2.7 Data Formats The 207 range of cameras have an option to save its recorded feed to individual Joint Photographic Experts Group - Image file format (JPEG) image files. Although JPEG file formats tend to be more lossy than others, it serves the purpose that is required of this study. This option allows for quicker file processing; as relevant files can be readily identified and the modelling framework accepts JPEG formats as inputs. Although the M1344 cameras also have the same option to save individual JPEG files, the usage of the on-board storage to SD card has limited the saved file formats to a short video Matroska video (MKV) format. Therefore, all feeds from the M1344 require video-to-image conversions; and are converted to JPEG files for consistency. 4.3 Data Conditioning The images needed be to filtered further so the channel information could be isolated. Due to the greyscale ambiguities from the photographed images, digital filtering was required. Once the images were filtered to explicit black and white images, the relevant data was extrapolated from the images and conditioned to provide a reconstructed model. 4.3.1 Pre-Processing of Discharge Channel Images The application requires black and white images to extract the relevant pixels from the image. By imitating a typical image of a discharge channel in its surrounding environment, the lighter pixels represent the channel information, and the darker pixels are regarded as redundant information. To ensure that the automated pro- cesses involved with channel reconstruction do not encounter grey-pixel ambiguities, the images are transformed into a Boolean image, where a white pixel (colour value: 255) represents a TRUE, and a black pixel (colour value: 0) represents a FALSE. The image processing methods are programmed in Cplusplus (C++) for automata- tion – with the use of Visualisation Tool-Kit (VTK) open-source libraries. The documentation for VTK provides terminology that is used in this study [39]. The term ‘filter’ is used to describe a process that accepts image inputs (single or multiple Chapter 4 — System Design 39 images, depending on functionality), performs a task to change the input data, and produces output images (single or multiple images) as a result. The image processing filters are developed in an object oriented scheme. The digital filtering (or image processing) provides a means to isolate the channel information. The images are reduced in size for improving the processing efficiency of the rendering. Five filters are used according to Table 4.2. Table 4.2: Image processing filters using basic implementation of existing VTK classes. Filter Name VTK Class Implementation Channel Identification vtkImageDifference Black and White Boolean vtkImageThreshold Smoothing vtkAnisotropicSmoothing2D Merge - Resize - Tracking and Cropping vtkImageResize Some images are manually processed, and then filtered again in the application. Manual processing includes highlighting of certain qualities in images that may be lost in the automated filtering processes. Digital filters are implemented before the modelling stage to provide usable data for rendering a 3D model. Channel Identification Filter If a discharge channel is identified in a series of sequential images, shown in Fig- ure 4.9, the series images is isolated and categorised by date and event number. Two images before significant pixel change define the beginning of the series, and two images after the pixel change defines the end. A sample of the resulting difference image produced by the filter is shown in Figure 4.10. The first image in the series, labelled by Marker 1 in Figure 4.9 is used to compare iteratively with the rest of the series. This method of obtaining image comparisons is due to the fact that thunderstorms can have durations of a few hours and ambient environmental conditions may change significantly to cloud cover patterns or the position of the sun. By implementing the comparison of images with an image Chapter 4 — System Design 40 Figure 4.9: Channel isolation using image pixel difference comparisons with an image occurring several frames before the channel is photographed. Marker 0 indicates the fixed image, Markers 1−3 indicate images identified with significant pixel difference. several frames before the occurrence of the lightning event, these environmental changes can be ignored, and will not affect the identification of the lightning channel. The difference filter produces a count of the number of pixels with a different colour value. If a significant pixel difference is detected (as determined by the operator), the resulting difference image is saved for further processing, as would be the case for Markers 1− 3. Black and White Boolean Filter Once the difference image is produced, identifying the lightning channel still requires some processing, since the channel is usually surrounded by a gray scatter. This filter can also be known as the discharge channel isolation filter, as the purpose of this filter is to provide the Boolean image as the input to reconstruction framework. General images of discharge channels – in particular, lightning channels – range from having very faint gray-scale channel definition to overexposure of the frame. A pixel threshold level between 0 and 255 can be used to identify the lightning channel information, where 0 represents black pixels and 255 represents white pixels. This filter changes the image pixels to monochromatic shade, operating as a Boolean filter, where any pixel above the selected threshold is changed to white pixel, and below the threshold is changed to black. Figure 4.11 demonstrates the use of the Black and White Boolean filter using Figure 4.11a threshold value of 70 and Figure 4.11b threshold value of 100. It can be seen that the lower the threshold values, the larger scatter noise that is introduced into the image, as depicted in right channel of Figure 4.11a. Although the higher threshold value, produces images with more limited channel information Chapter 4 — System Design 41 (a) (b) Figure 4.10: Image difference of a lightning event occurring on 8 February 2011 at 18:13:47.900. (a) Original image (b) Difference image with a mismatch of 40, 063 pixels (of 600× 480 image resolution). Chapter 4 — System Design 42 (a) (b) Figure 4.11: Black and White Boolean filter using threshold values between (0−255) implemented for sample images used in Figure 4.10. (a) Threshold value of 70 (b) Threshold value of 100. Chapter 4 — System Design 43 Figure 4.12: Smooth Bool process. when the channel is thinner, as depicted in the right channel of Figure 4.11b. Smoothing Filter From Figure 4.11, it is seen that the hard threshold value produces an image with specked channel definition for certain threshold values. This filter is designed to smooth out the edges of the channel definition (according to an operator defined scatter constant). In addition to smoothing out channel edges, this filter can diffuse stray white pixels not connect to the channel. The use of this filter may require a few iterations, depending of the quality of image that is photographed. The process involved with using this filter is illustrated in Figure 4.12. The drawback to using this filter includes the possible introduction of image errors through the attempt to optimise the quality of image, such as introducing thicker channel widths, or lost channel information. It is also a manually intensive process that requires trial and error for optimising the channel quality. An example is shown of the Smooth and Black and White Boolean filter combination used to optimise channel definition in Figure 4.13. These images provide two iterations to illustrate the purpose of the filter. The alternative to using this filter is through manual processing of images, using an image processing tool. This process is time-consuming and defining the channel shape and definition is very subjective. However, manual image processing provides a level of intelligence in determining channel shape, and can help to ensure that no information is lost. Chapter 4 — System Design 44 (a) (b) (c) (d) (e) Figure 4.13: Smooth and Boolean filter iterations (a) Original image with focus area labelled with Marker 1 (b) First iteration of Smooth filter with scatter constant set to 5 (c) First iteration with Boolean filter with threshold at 90 (d) Second iteration of Smooth filter with scatter constant set to 20 (e) Second iteration with Boolean filter with threshold at 80. Chapter 4 — System Design 45 Figure 4.14: Isolated images amalgamated in a single image to reduce timing issues. Merge Filter Some recorded events have limited time-resolved channels, which presents issues with matching camera timing of different perspectives. To resolve this, all images of the event are amalgamated into one single image. The resulting images would be similar to an image captured if the camera exposure is kept open for the duration of the event. The functionality of this filter is only used where necessary. Once the series of images have been filtered to a Boolean image, the images are loaded into a merge filter. Since input images are already in Boolean format, if a pixel is represented by a value of 255 (white), it needs to be presented in the final image. Each pixel is checked in each input image. If there is a white value in any one of the pixels, the discrete output image map sets the corresponding pixel position with a value of 255. The initial value for all each pixel in the output map is set to 0 (black). A simple demonstration of the function of this filter is shown in Figure 4.14. Resize Filter This filter is required to ensure that the channel information for each perspective is sized correctly. The placement of cameras and the differing camera resolutions result in images photographing discharge channels are different resolutions. This resize functionality is performed manually in an image processing tool. This step is important for the 3D reconstruction, as no intelligence is included in the algorithm to account for mismatched channel sizes in different perspectives. The heights of the white channel pixels are adjusted to the size of the image with the largest channel resolution. Chapter 4 — System Design 46 Tracking and Crop Filter This is the last filter which is used as part of the data conditioning process and requires all the input images for one channel reconstruction to perform its function. This filter tracks the channel information from the images, and ensures that all channel heights are the same. If they are not, the filter scales the images to fit the largest channel height. To reduce on computing memory and processing time, the set of images are sent through the cropping filter. This is accomplished by reducing each image to an identical size for the reconstruction process. This filter takes into consideration the image orientation required of the individual image and rotates them individually, according to user specified commands. This filter is constructed using four individual developed classes. 4.4 Three-Dimensional Reconstruction Algorithm The 3D algorithm is written in C++ programming language, with the use of VTK — an open source, cross-platform visualisation toolkit. The application can reconstruct a model with 3D definition using two or three images; each configuration may have different options for reconstruction. Using the VTK 3D environment demonstrated in Figure 4.15a, the filtered images are arranged on a set of axes in 3D space, mapping the experimental setup. This is setup through the reconstruction framework, which translates user defined commands to necessary reconstruction environment preparation. The origin, (0, 0), of the setup is representative of the centre of the setup. The images are placed in the relative position as the original placement of cameras, facing the origin. The centre point of the image is placed tangentially to the origin, offset by a user-defined radius. The algorithm has been designed to process the setup in layers over the y-axis, as shown in Figure 4.15b. This method eliminates the third dimension, reducing the algorithm to a two-dimensional (2D) problem, as demonstrated in Figure 2.8b. Normals of the white segments are projected to the centre of the setup, where they are compared to the normals from other perspectives. Each layer of the discharge is assumed to have a cylindrical body. The centres of two images determine the centre point of the cylinder, where the average thickness of the images determine the radius Chapter 4 — System Design 47 (a) (b) Figure 4.15: A simple branched channel generated as an example to illustrate the image placement in the reconstruction environment. (a) Reconstructed model about environment origin surrounded by images contributing to its reconstruction (b) Zoomed view illustrating the stacked nature of the model design. of the cylinder. The third image is used to verify the existence of the cylinder for branched channels. In the example provided in Figure 4.15, the mirrored image of the channel definition placed 180◦ provides the verification required for branched channels. 4.4.1 Limitations of Model Reconstruction There are several factors that limit the accuracy and the resulting detail of the reconstructed models. Since the accuracy cannot be easily determined, due to the fact that direct comparison cannot be made with the original discharge channel, this level of accuracy cannot be quantified. Therefore, the accuracy can only be determined with reference to the photographed images. The limitations dictating the accuracy of the reconstructed model are identified and noted using an example of two perspectives of a captured lightning flash, Figure 4.16 and Figure 4.17. The first perspective is labeled with reference to Camera 1 as shown in Figure 4.16 taken at 0◦ and the second perspective is referred to as Camera 2 as shown in Figure 4.17 taken at a lateral separation of 34◦. Chapter 4 — System Design 48 Model Resolution The accuracy of the reconstructed lightning model is soley dependent on the quality of image input into the system. For images with low resolution, limited lightning information can be obtained from the image, and slight variations in the channel shape can be missed in the reconstructed model. (a) (b) (c) (d) (e) (f) Figure 4.16: Camera 1 — Timing inconsistencies capturing different levels of information, in particular, Frame 2 producing branching information not evident in any other frame of the event. (a) Frame 1, (b) Frame 2, (c) Frame 3, (d) Frame 4, (e) Frame 5, (f) Frame 6. (a) (b) (c) Figure 4.17: Camera 2 — Matching lightning event captured 34◦ from Figure 4.16 at a lower image resolution. (a) Frame 1, (b) Frame 2, (c) Frame 3. Chapter 4 — System Design 49 The image resolution is based on the camera resolution and the distance away from the discharge location. In the laboratory investigation and the physical investigation, a combination of different cameras and different distances from the discharge are utilised. The difference in photographed channel resolution requires scaling of images. In most cases, images with lower resolution are enlarged to match the size of the high resolution images. This results in crude channel definition on the lower resolution image, and likely introduces a loss of channel definition and thicker reconstructed channels. With reference to the set of images taken from a single CG lightning event, Camera 1 resolution produces a channel height (from cloud to ground) of 155 pixels, whereas Camera 2 resolution produces the same channel in 54 pixels. This results in a scaling ratio of almost 1 : 3. To demonstrate this point, a comparison of Camera 1, Frame 2 in Figure 4.16b and Camera 2, Frame 1 in Figure 4.17a. In the perspective of Camera 1, it can be seen the branching information has been captured, but in the perspective of Camera 2, a hint of branching can be seen, but cannot be properly defined. This therefore limits the model to only reconstructing the return stroke of the channel due to the limitation of image comparison. Quality of Input Boolean Images The automation of image conditioning may result is the loss of significant lightning information. It may also result in the introduction of greyscale noise, depending on the chosen image threshold. In addition, the thickness of the channel in the Boolean image is partially determined by the threshold limit, and has a direct effect on the reconstructed model. Synchronisation of Camera Information Using multiple cameras, the information photographed may not capture the same level of channel detail due to unsynchronised devices. In the reconstruction of discharge channels, matching of camera images from different perspectives usually results in the loss of some channel detail. This drawback is partially resolved through merging the time-series images into one single frame, as described in Section 4.3.1. Chapter 4 — System Design 50 The problem with this method appears if one camera does not capture any signficant information in certain branches. 4.4.2 Two-Image Reconstruction The basic reconstruction algorithm implementation is shown in Figure 4.18, for an example of two images placed at 90◦ separation. The center of the channel segment is determined by the intersection of the center normals and the radius of the channel segment is determined by averaging each center intersection with the outer image segment borders. Labels are annotated on the figure for reference to variables discussed in Equation 4.1. Rcs = r1 + r2 + r3 + r44 (4.1) where Rcs = Radius of channel segment, pixels rn = Radial distance from segment center normal intersection point, where n = {1, 2, 3, 4}, pixels Figure 4.18: Basic channel reconstruction algorithm for single-channelled discharges, resolving channel segments by a series of two-dimensional geometric problems. Chapter 4 — System Design 51 The use of two images for reconstruction limits the model to a single channelled discharge. This is due to certain redundancies that occur when branches are introduced, which is described in more detail in Figure 4.19. 4.4.3 Three-Image Reconstruction For three images, the algorithm used to reconstruct the models is altered to suit an additional image. The main use for three-image reconstruction is the resolution of channel branches. In Figure 4.19a, if there are branched structures in the images, there are four intersections of the normals, defining four channel centers in the model. This redundancy is resolved with the use of the third image, as shown in Figure 4.19b. In addition, Figure 4.19b demonstrates the ideal case for images that are placed in the perfect eye-level position in relation to the channel model. This algorithm represents the case that all normals intersect in one co-ordinate. Since center normals are defined by the channel width and position in the image, this coordinate is often variable depending several factors, including the camera exposure and the level of filtering, and the image quality. The real case for reconstructing channels using three input images in this framework cannot use this algorithm as it stands, since placement of input images cannot be exactly matched from the original camera perspectives. Therefore, a compromise is made, by using the third image to resolve redundant channels in the setup. The problem with using this technique is the decision on which images get used for the channel reconstruction, and which one image is used to resolve redundant channels. Therefore, the algorithm currently stands at using all the information, each image taking a turn at resolving redundant channels, and merging the resolved channels together, as shown in the process presented by Figure 4.20a-c). Table 4.3 summarises steps shown in resolving each channel segment with reference to the figure illustrations. Each resolved channel is labeled by the resolving image, for consistency. For example, resolved channel C1 is resolved by intersection of I1 and constructed using information from I2 and I3. The constructed channel segments have two options for reconstruction: first detect and segment averaging. First detect option constructs all three resolved channel segments, C1, C2 and C3. This is demonstrated in Figure 4.21, using resolved channel segments in Figure 4.20. If the first detect option is not used, then assuming that Chapter 4 — System Design 52 (a) (b) Figure 4.19: Redundancies for branched channels from images. (a) Two branches are assumed as part of the channel, and two are assumed by be redundant (b) Resolving channel branch redundancies using a third image. Chapter 4 — System Design 53 (a) (b) (c) Figure 4.20: Algorithm for constructing channel segments from three images to resolve channel redundancies, using the third image as verification (a) Construction of C1 using I1 for verification (b) Construction of C2 using I2 for verification (c) Construction of C3 using I3 for verification. Table 4.3: Three-image reconstruction algorithm steps to reconstructing channel segments for first detect option. Cylinder Resolving Reconstruction Figure Number Image Images Reference C1 I1 I2 & I3 Figure 4.20a C2 I2 I1 & I3 Figure 4.20b C3 I3 I1 & I2 Figure 4.20c Ctotal all all Figure 4.21 Chapter 4 — System Design 54 Figure 4.21: Channel segment constructed from resolved channel segments C1, C2 and C3 from Figure 4.20 if first detect option is true. the reconstruction algorithm processes images in the order of I1, I2 and then I3, image information from I3 is only used to verify the existance of a channel segment, and therefore C3 is constructed as part of the model, as shown in Figure 4.20c. The use of this option in the algorithm presents inconsistencies in the reconstructed discharge channel, whichever option is chosen. The segment averaging option averages the locations and radii of resolved channel segments per y-axis iteration of the reconstruction and constructs only one channel segment in each iteration. The use of this option is best for the reconstruction of single channelled discharges. This option can either be set to TRUE or FALSE, in conjunction with the first detect option. In total, there are four different options configurations that can be used in the reconstruction of models using three-image inputs. Chapter 4 — System Design 55 4.5 Testing Framework There are seven reconstruction algorithm options, which are listed in Table 4.4 (adapted from [3]). Branching definition can only be reconstructed with the avail- ability of three images, and the average option may not be used for any branched image information. The first detect option can be used to reconstruct for all cases. Table 4.4: All seven algorithm options available for individual reconstruction cases for two or three image reconstructions. Case Images Branching Average First Detect 001 I1, I2, I3 False True True 002 I1, I2, I3 False True False 003 I1, I2, I3 True/False False True 004 I1, I2, I3 True/False False False 005 I1, I2 False – True 006 I2, I3 False – True 007 I1, I3 False – True In order to quantify the accuracy of resulting models, the corresponding images of the model are used for pixel matching of channel information with the original Boolean image. This comparison is achieved using a tester application. This comparison is shown with two arbitrary shapes in Figure 4.22. An image difference is produced from the tester application, which identifies the pixel mismatch between the two images. The number of mismatched pixels is also provided as pm. Equation 4.2 provides the error calculation for the model verification. Epm = εpmIh × Iw × 100 (4.2) where Epm = The percentage error of mismatched pixels, % pm = The number of mismatched pixels, pixels Ih = Height of the tested images, pixels Iw = Width of the tested images, pixels Chapter 4 — System Design 56 (a) (b) (c) Figure 4.22: Testing procedure comparing pixel mismatching of two images (a) Circle (represents original Boolean image) (b) Square (represents image of model at same perspective) (c) Difference between the two images indicated by white pixels. The height and width of the compared images must be identical in order for this comparison to obtain successful results. It should be noted that the error calculation takes into account the total error of the entire image, and not only of the significant channel information. This may provide a misleading result, since the calculation is a function of the image size (which includes the majority black pixels). The arithmetic testing method does not provide a pixel-by-pixel matching accuracy, and comparison of reconstructed channel paths. Additionally, model accuracies are determined visually by a manual case-by-case analysis. The accuracy of recon- structed models will examine three properties: channel shape, continuity and the presence of significant channel duplication. 4.6 Conclusion The system designed to reconstruct discharge channels in 3D is completely modular. A simple summary of the stages required for the system to operate includes the photography of discharges from several perspectives; image processing to isolate the channel information; inferring the information to 3D cartisian co-ordinates; and testing the accuracy of the resulting models. The photographic equipment describes the use of Axis cameras and a combination of cross-polarised, infrared and violet optical filters. The cameras provide an automatic triggering functionality and the optical filters reduce the glare of the fast transients preventing overexposure of the image. Chapter 4 — System Design 57 Once images of the discharges are acquired, data conditioning needs to be performed to produce Boolean images. The Boolean images required represent white pixels as channel information, and black pixels as redundant information. This is obtained through a combination of digital filters developed in C++ and VTK: channel iden- tification; black and white Boolean; smoothing; merge; tracking and cropping; and resize filters. The 3D reconstruction of the discharge channels requires the inputs of Boolean images and the respective angular separation of the camera perspectives about the channel location. The algorithm used to extrapolate the 3D information simplifies the problem to a series of 2D geometric calculations. One-pixel high channel segments resulting from the 2D geometric calculations are stacked to produce the discharge channel shape and structure. Two main algorithms are implemented; two-image and three-image reconstructions. The two-image reconstruction algorithm is designed as the simplest form of the algorithm intended for single-channeled discharges. The three-image reconstruction algorithm is designed to reduce redundancy on branched discharge channels. Each algorithm has a set of configurations defining options first detect and average to either TRUE or FALSE. The testing framework defines a comparison between the Boolean input image, and the matching image perspective of the reconstructed model. Two methods of testing are defined, an arithmetic method in comparing the level of mismatch between images and visual testing. The following chapter describes the first step in the evaluation of the system perfor- mance under laboratory conditions. This is the first set of evaluations made on the system capabilities in reconstructing HV discharge channels, providing insight into the performance of the system and its reconstruction algorithm configurations. 58 Chapter 5 HV Laboratory Investigation A series of small scale tests are performed in the HV laboratory, as a proof-of-concept to reconstructing discharge channels for lightning. The small scale tests help to identify and replicate some challenges expected in the large scale lightning investigation. With the successful reconstruction of laboratory discharge channels, confidence can be gained in reconstructing large scale lightning discharge channels. 5.1 Overview This chapter describes small scale testing on the reconstruction of discharge channels in a controlled laboratory environment. Although the purpose of this investigation extends to the reconstruction of lightning discharges, it has been found that monitor- ing high voltage testing procedure using video recordings is a useful tool for gathering information on unexpected failure, since burn marks, damaged insulation and carbon by-products are usually the only visual indication of failure due to flashover. Even in the presence of a human operator, the failure can escape the the naked eye and the full extent of the damage may not be perceived. Therefore showing that the reconstruction of high voltage laboratory discharge channels has its own merits. Several gap configurations are investigated, with different combinations of camera positions. The system is also tested with the photographed information under all its different configurations. Each experiment is briefly discussed, including the gap con- figuration setup, camera combinations and positions, resulting reconstructed models and the contributing factors from each experiment. Each individual experimental Chapter 5 — HV Laboratory Investigation 59 setup modularly investigates different aspects of the reconstruction problem and provides insight and confidence into the system capabilities: 1. Experiment A-1: General investigation 2. Experiment A-2: Single-channel verification 3. Experiment A-3: Branched-channel evaluation For additional information on work performed regarding laboratory discharge chan- nels, refer to Appendices. The work discussed in Appendix C introduces the preliminary testing performed using HV discharge channels discussed further in Experiment A-1 [3]. The work discussed in Appendix D provides an investigation into large discontinuous laboratory gaps using two higher resolution cameras [40]. Lastly, the work discussed in Appendix E provides an overview to preliminary investigations into reconstructing channels from different camera heights [41]. From the investigation, it is concluded that camera angles below eye-level in the range of 0−18◦ provide inconclusive results, due to the absence of a third camera perspective to provide validation of channels. The advantage to testing small scale experiments in a high voltage laboratory is the fact that testing is done in a controlled environment. Although this may seem trivial, it is important to iteratively test the capabilities of the cameras in the presence of high transient electromagnetic fields. As identified in Section 2.2, lightning has multiple unknown variables associated with its formation and appearance. The controlled environment allows for the prediction of several unknown characteristics such as providing: • a predetermined position of a discharge (governed by the gap geometry); • an approximated length of the discharge channel (determined by the gap size); • a predictable time to flashover (given by the voltage level and gap geometry); and • flexible camera positions relative to the discharge channel (due to the scale of the laboratory environment with relation to a large scale lightning investiga- tion). Although the propagation of lightning is governed by the leader mechanism, which is more closely replicated by a switching impulse over a gap of more than 10−30 meters, Chapter 5 — HV Laboratory Investigation 60 with long front times (in the order of hundreds of microseconds) [26], the small scale testing of discharge channel photography is achieved by flashing over a large air gap with the use of voltage impulses. These voltage impulses are produced by a multi-stage impulse generator (or Marx Generator) and are typically used to test the induced effects of lightning or operational surges of protection equipment. As a proof of concept, a voltage impulse over a large air gap can produce a highly illuminated discharge channel, which sufficiently replicates the visual effects that are required for this investigation. 5.2 Experiment A-1: General Investigation The focus of this experiment is to determine how many cameras, and which camera positions would produce the best 3D reconstructed models. A direct comparison of the two-image and three-image reconstruction algorithm is also obtained across the board of all photographed datasets. This is discussed in more detail in Section 5 of Appendix C [3]. 5.2.1 Experimental Setup A rod-to-rod gap configuration with a gap length of 0.83 m was used, which de- termines the height of the discharge channel. The rod-to-rod configuration usually gives rise to single-channelled discharges, although occasionally branched channel are observed. The breakdown voltage in air was obtained at approximately 550 kV with the given gap configuration. The general setup in the high voltage laboratory is provided in Figure 5.1. Three wireless cameras from the Axis 207 range are used at equal distances from the gap configuration. The wireless cameras communicate with a local laptop via an ad-hoc network; and all triggered information is saved directly to the laptop. The cameras were placed in several angular formations to determine the ideal camera angles for three-dimensional reconstruction of the system. There are five angles that were tested: 30◦, 45◦, 60◦, 90◦, and 120◦ as shown in Figure 5.2, which provided a wide range of angles to evaluate. Several additional factors needed to be taken into consideration: location, height, distance, and angles. The location of each camera was important to consider for Chapter 5 — HV Laboratory Investigation 61 Figure 5.1: Experimental setup for laboratory Experiment A-1 to determine the optimal camera positions for reconstruction — Current camera configuration at 45◦. protection purposes. The cameras were therefore place at a radius of 1.7 m away from the gap setup, or Device Under Test (DUT). Each of the cameras were placed at the same height above the ground of 1.035 m, which is also the same height as the grounded rod electrode at the base of the DUT setup. 5.2.2 Reconstruction Results Two sets of images were photographed from each camera angle configuration, result- ing in a total of ten image datasets. Using Equation 4.2, the pixel mismatch error (Epm) calculated from this dataset was determined at 11%, and the optimal angular separation for camera positions was 45◦. This information was taken from a small dataset, and an error calculation that includes a large redundancy. Additionally, many modelled reconstructions produced mismatched channel paths, mostly due to input images having mismatched channel sizes. Despite the measured camera positions from the DUT providing similar gap lengths in the camera frames, this size mismatch still played a large factor. Chapter 5 — HV Laboratory Investigation 62 (a) (b) (c) (d) (e) Figure 5.2: Three-camera angular separations for Experiment A-1 (a) Camera separation of 30◦ (b) Camera separation of 45◦ (c) Camera separation of 60◦ (d) Camera separation of 120◦, and (e) Camera separation of 90◦. Chapter 5 — HV Laboratory Investigation 63 5.2.3 Discussion The testing procedures used to analyse these image sets does not provide a com- prehensive measure of the reconstructed model accuracy. Visual analysis still needs to be performed in each case, as provided in Table 5.1. Each reconstruction case (as specified in Table 4.4) is examined for all ten image datasets. The correct channel path is determined through visual comparison, and direct pixel matching has not been implemented for this observation. The presence of missing channel segments and significant channel duplication may mean that the images are mis- aligned. Cases 001 − 004 provide three images per dataset, since all three images are involved in the reconstruction. Cases 005− 007 include two images per dataset, although Case 007 lacks two sets of data for 90◦ camera separation, as using images at 0◦ and 180◦ would not provide a relevant model. Table 5.1: Visual evaluation of all laboratory datasets providing number of reconstructed images containing the listed characteristics. Case True or Correct Missing Significant No. False Path? Segments? Duplication? 001 True 23 3 0 False 7 27 30 002 True 21 21 0 False 9 9 30 003 True 15 0 21 False 15 30 9 004 True 15 18 12 False 15 12 18 005 True 20 2 – False 0 18 – 006 True 14 0 – False 6 20 – 007 True 16 2 – False 0 14 – Chapter 5 — HV Laboratory Investigation 64 The information presented in Table 5.1 can to identify some specifics about how the algorithm configurations perform on a specified dataset. It can be seen that for visually matched channel shapes, the averaging option provided by Cases 001 and 002 reconstructs models that give the approximate shape of the channel expected to be reconstructed. However, this is only visually matched, and any further investigation into the precision of the channel segment locations could result in a considerate deviation in position. If the averaging option is not used, there is a 50% chance of achieving the correct channel path, which is offset by an observation of significant duplication of the channel branches, where only a single (or one split) should exist. Although it can be seen that for best reconstructions, only two images should be used, as observed in Cases 005− 007. For best continuation of the reconstructed channel path, the first detect option provides the best results, as shown in Cases 001 and 003. This option ensures that any channel segment that is verified gets reconstructed as part of the channel and provides minimal missing segments, as shown in Figure 4.20. Additionally, the first detect option is seen to provide good channel continuation in the two-image reconstructions in Cases 005− 007. This option can produce branching information from two image reconstructions, although it has a 25% chance of being the correct branch combination for a single split branch. 5.3 Experiment A-2: Single-Channelled Verification With the use of three cameras in single channelled discharge testing, it is possible to perform model verification tests to determine the accuracy of the reconstructed model. This is accomplished by reconstructing the channel with two perspectives, and using the third image for comparison at the respective perspective. 5.3.1 Experimental Setup This evaluation uses images taken from the setup discussed in Section 5.2. A sample of three original image perspectives photographed from 120◦ camera separation is used to demonstrate the method of analysis and is provided in Figure 5.3. Chapter 5 — HV Laboratory Investigation 65 (a) (b) (c) Figure 5.3: A set of images samples taken in the high voltage laboratory investigation with three camera perspectives at eye level (a) Camera 1 at 0◦ (b) Camera 2 at 120◦ (c) Camera 3 at 240◦. 5.3.2 Reconstruction Results The model is reconstructed for image perspectives of 120◦ apart, as shown in Figure 5.4. Verification is performed from the image taken at 240◦ demonstrated in Figure 5.4c. This perspective is chosen as the verification image due to the curved channel shape seen at this perspective, and not represented directly in the other two images. If the reconstructed model can replicate the curved channel shape as seen in the image from this perspective, it can be assumed that single-channel recon- struction only requires the use of two images. This would also provide verification that reconstructed discharge channels using the single-channel algorithm correctly reconstructs models given the images and corresponding angular separations. 5.3.3 Discussion A direct comparison is made at the 240◦ perspective between the channel information taken from the original image, the filtered image and the reconstructed image of the model without direct input from the original perspective. The original image is presented in a cropped form in Figure 5.5a, the filtered image of the third perspective is shown in Figure 5.5b, and the reconstructed model at the corresponding perspective is produced in Figure 5.5c. The reconstructed model has an underlying image (in the background of the model) of the original channel shape (thinned version of Figure 5.5b). Chapter 5 — HV Laboratory Investigation 66 (a) (b) (c) Figure 5.4: Reconstructed model from Figure 5.3. Input data can be seen behind the model channel, to match the accuracy of reconstructed channel path and shape for Cameras 1 and 2. (a) Camera 1 at 0◦ (b) Camera 2 at 120◦ (c) Perspective of reconstructed model at 240◦. (a) (b) (c) Figure 5.5: Verification through comparing third photographed image from Cam- era 3 at 240◦, not used as an input for the model reconstruction. (a) Original image (b) Boolean image (c) Reconstructed model at corresponding angle (background underlay of channel shape of original channel, for direct comparison). Chapter 5 — HV Laboratory Investigation 67 It can be seen that the reconstructed model follows the shape of the third verification image, without the use of the original image as input data. The top portion of the channel follows the correct shape, which includes the stepped bevelling along the channel above the curve. Although at the top of the channel, the direction is tilted towards the right with respective to the observed perspective. This implies that there may be camera lens curvature that would need correction, or one of the cameras may be placed at a slight tilt. This may be explained by the fact that cameras are placed at the same level as the ground electrode, and the focal points of the cameras are tilted slightly upwards. This should be corrected with subtle image normalisation. Nonetheless, the bottom down appears to correctly follow the original shape without any significant offset. Therefore, this evaluation has provided some confidence in the two-image reconstruction algorithm. 5.4 Experiment A-3: Branched-Channel Evaluation Most discharge channels have branched characteristics, and lightning discharge channels no exception. It should be noted that branched channels can only be recon- structed using the three-image reconstruction algorithm described in Section 4.4.3. If only the two-image reconstruction algorithm is used with the first detect option, branched definition could be reconstructed, but the resolved paths have a one in four chance of being correct. This investigation focuses on laboratory discharge channels with 3D spatial definition, and the use of two and three perspectives to reconstruct the model. Furthermore, this investigation evaluates the capabilities of the three-image reconstruction algorithm. 5.4.1 Experimental Setup This evaluation uses images taken from the setup discussed in Section 5.2. Since branched channels occur rarely in a rod-to-rod gap setup, only one discharge is discussed. The three Boolean images photographed for this discharge were taken at a 45◦ camera separation. Two models are reconstructed: a two-image model (Part 1) and a three-image model (Part 2). Table 5.2 provides a summary of the model configurations in each part. Chapter 5 — HV Laboratory Investigation 68 Table 5.2: Reconstruction configurations for branched HV discharge channel evaluation using two- and three-image algorithms. Property Part 1 Part 2 Images Used I2, I3 I1, I2, I3 Angular Separation 45◦ 45◦ Model Configuration Case 006 Case 004 First detection setting true false Average setting false false 5.4.2 Reconstruction: Part 1 Two of the three images are used for this investigation, I2 and I3 (or Case 006). The Boolean images are provided in Figure 5.6a and c. These two images were chosen for the significant branching detail that is required to resolve branched channels using the first detect option. (a) (b) (c) (d) Figure 5.6: Reconstructed model of branched HV discharge channel using two input images. In each pair, shows the resulting Boolean image (left), and corresponding perspective of the reconstructed model (right) (a-b) Perspective 2 at 45◦ (c- d) Perspective 3 at 90◦. From the reconstructed images in Figure 5.6b and d, it can be seen that reconstructed model paths match the original images. But despite the fact that two-image recon- structions for branched images can produce visually accurate models these models Chapter 5 — HV Laboratory Investigation 69 reconstruct an ambiguity and may not yield accurate branched paths. Therefore, the presence of this ambiguity means that models from this type of reconstruction cannot be used for accurate analyses. 5.4.3 Reconstruction: Part 2 This example presents Case 004 for the model reconstruction and is shown in Figure 5.7. The images show the Boolean image placed on the left of each pair and the corresponding perspective of the reconstructed model is on the right. The reconstruction modelling parameters are indicated in Table 5.2. (a) (b) (c) (d) (e) (f) Figure 5.7: Reconstructed model of branched HV discharge channel. In each pair, shows the resulting Boolean image (left), and corresponding perspective of the reconstructed model (right) (a-b) Perspective 1 at 0◦ (c-d) Perspective 2 at 45◦ (e-f) Perspective 3 at 90◦. The model presented in Figure 5.7 appears to generally follow the channel path given the specific perspective matching. 5.4.4 Discussion If a direct comparison is made on the channel paths reconstructed from the investi- gations in Part 1 and Part 2, as shown from a similar arbitrary perspective of both reconstructed models in Figures 5.8 and 5.9, it can be seen that there is a significant difference in the branched paths the model reconstructed. This is explained by Chapter 5 — HV Laboratory Investigation 70 (a) (b) Figure 5.8: Image of the two-image reconstructed model at an arbitrary perspective indicating inaccurage branching definition. (a) Full length with marked focus (b) Zoomed image of marked focus. the fact that two-image reconstructions using the first detect option resolves the first channel segment per center normal, and therefore reduces the reconstructed ambiguity. However, this is does not yield accurate models. Therefore, branched definition can only be accurately defined by a third image perspective. Despite the fact that reconstructed models using three-images, the models are not perfect. Upon closer inspection as indicated by Figure 5.9, it is seen that the reconstructed model has two major flaws: reconstructed channel discontinuity and duplicated branches in the branch split. It is difficult to produce perfect camera positions in the laboratory without spe- cialised equipment, and slight tilts and inaccuracies can reflect in the reconstructed models through meshed duplication of branches or missing segments. In addition, limitations in the reconstruction algorithm and current framework can also be a contributing factor. For the branched channels to be accurately modelled using this algorithm, the framework could include some intelligence to properly align the images, such that corresponding channel information can be matched properly to avoid discontinuities and duplicated branches. It is noted that input images of two pixels or less would result in discontinuities, due to the lack of valid normals being extended from the image data. This means that refinement on the current modelling algorithm may be required in future. Chapter 5 — HV Laboratory Investigation 71 (a) (b) Figure 5.9: Image of the three-image reconstructed model at an arbitrary perspective indicating duplicated channels per branch and missing segments. (a) Full length with marked focus (b) Zoomed image of marked focus. 5.5 Conclusion This investigation has provided some confidence in the system capabilies in pro- ducing 3D reconstruction of HV laboratory discharge channels. Each successful reconstructed model has provided a small-scale proof-of-concept to reconstructing discharge channels in a controlled environment. Although model accuracies cannot be fully determined through a comparison with input images, confidence is gained through a direct comparison between image perspectives of reconstructed models and the original Boolean images. This comparison provides a good indication to determine the accuracy of the model from each known perspective. The difference in algorithm configurations have been tested against a set number of images taken at different angular separations. All datasets obtained contain three image perspectives at a set angular displacement. It has been shown that by averaging the channel segments per y-axis iteration, generally correct channel paths can be obtained. This is determined by visual comparison and the resulting models may not necessarily be used for a detailed analysis. It is noted that this may not be accurate enough for research purposes. The first detect option for three- image reconstructions provides better channel continuation, but also increases the Chapter 5 — HV Laboratory Investigation 72 channel duplication of the model. These errors may be indicative of slight image mis-alignment. The two-image reconstructions of single-channelled discharges provide accurate chan- nel paths, good channel continuation, and no channel duplication. Additionally, the models have been verified using a third perspective matching. It has been seen that complicated channel paths have been duplicated in the third perspective comparison, although it is evident that there is an offset on the channel tilt. Cameras are placed at the same level as the ground electrode, and the focal points of the cameras are tilted upwards. The best branched definition is reconstructed using Case 004 (no first detect and no averaging), which minimalises the redundant duplication of branches. Nevertheless, duplication of channel branches cannot be completely eliminated, given that camera perspectives cannot be perfectly matched according to required spatial specifications. Additional intelligence to the framework functionalities can be incorporated to ensure that reconstructed models are optimised. The averaging option may not be used to reconstruct branched definition. Additionally, using the first detect option for two-image reconstructions can provide some branching definition, but has a 25% chance of providing accurate branching locations. Now that the system has successfully reconstructed small-scale laboratory discharges, the following chapter describes a preliminary investigation into the reconstruction of single-channelled and branched lightning discharges. 73 Chapter 6 Physical Lightning Investigation A series of tests are performed to reconstruct lightning image data to 3D models of the photographed discharge channels. An evaluation is performed on preliminary tests of single-channelled and multiple- channelled (or branched) lightning discharges. 6.1 Overview This chapter describes a preliminary investigation into reproducing the 3D details of full-scaled lightning discharges, taking into account the simple single-channlled discharge, and the more complex branched case. Image data is obtained from other researchers (with their permission). The following investigations are discussed in this section: 1. Investigation B-1: Single channel (Tuscon) 2. Investigation B-2: Multiple channels (South Dakota) A preliminary investigation was performed on one branched Cloud-to-Cloud (CC) lightning channel in Appendix F [42]. Since only one perspective was obtained, no 3D definition could be reconstructed. The model reconstructed was a flat channel that was reconstructed in 3D space, and correctly constructed the branched channel definition. This preliminary study provides some confidence in the reconstruction algorithm and its ability to reconstruct multiple branches in a channel. Chapter 6 — Physical Lightning Investigation 74 It should be noted that the camera elevations have not been taken into account in the reconstructions of these lightning channels, as proper analysis has not been performed in the laboratory investigation. The evaluations of the reconstructed lightning models should all be noted with a possible error due to omission. Future evaluations can be performed with elevation correction and used to compare with the results found in this section. 6.2 Experiment B-1: Single Channel (Tuscon) In this investigation, a single-channelled lightning discharge channel is reconstructed using images taken from Dr. Saba in 2007 [43]. Two successive flashes, with different channel shapes, were photographed with this setup. An example of one of the recorded lightning flashes is discussed in Appendix G. This section discusses the second photographed flash. 6.2.1 Experimental and Setup (a) (b) Figure 6.1: Images taken of a lightning flash in Tuscon USA in 2007 for two different perspectives approximately 34◦ apart. (a) Camera S1 (b) Camera S2. A lightning flash was recorded in high speed video from two different perspectives in Tuscon, USA [43]. The cameras were placed at approximately 34◦ angular separation. A sample of the two images from the videos are provided in Figure 6.1a and b. It should be noted that there are significant resolution disparities in the two images (discussed briefly in Section 4.4.1), which would reflect in the model resolution. Chapter 6 — Physical Lightning Investigation 75 6.2.2 Reconstruction Results The original lightning images in Figure 6.1a and b were processed to produce Boolean images. These images were used to reconstruct a 3D model of the lightning discharge channel, as shown in Figure 6.1. For Camera S1 perspective, the Boolean image and corresponding model image – referenced at 0◦ – is provided in Figure 6.2a and b. For Camera S2 perspective, the Boolean and model image – referenced at 34◦ – is provided in Figure 6.2c and d. (a) (b) (c) (d) Figure 6.2: Reconstructed model of a single channelled lightning flash. (a) Cam- era S1: Boolean image (b) Camera S1: Reconstructed image (c) Camera S2: Boolean image (d) Camera S2: Reconstructed image. 6.2.3 Discussion It is evident through visual comparison that the reconstructed model correctly follows the path of the lightning channel in the images. In Figure 6.2b and d, several segments are missing along the path of the reconstructed channel. These missing segements correspond to the thinner areas of the channel, which demonstrates how the reconstruction method fails when the channel is less than three pixels in width. This has been a common observation from previous tests, and is explained by the fact that normals may not be generated if a channel is one pixel or two pixels wide. The reconstructed model has evident resolution errors, which is indicated in Fig- ures 6.3 and 6.4. This set of images shows the propagation of errors in the re- construction process in a direct comparison of each stage. The particular area of interest, which clearly illustrates this error is highlighted in Figure 6.3. This segment Chapter 6 — Physical Lightning Investigation 76 Figure 6.3: Original image from Camera S1 perspective indicating area of interest for demonstrating errors in resolution in the reconstructed model. (a) (b) (c) Figure 6.4: Zoomed in area of interest showing resolution errors on the reconstructed lightning model from Camera S1 perspective. (a) Original image (b) Boolean image (c) Corresponding image of reconstructed model. is chosen for its clear variation in channel definition in the original image. The original image, Boolean image and corresponding model image reflecting the area of interest is presented in Figure 6.4a–c. It can be seen from a comparison of Figure 6.4a with Figure 6.4b that the digital filtering stage already introduces minor errors in the definition of the channel information. These errors may not be significant, but has a direct effect to the quality of the model that is reconstructed, as the Boolean image is the only input defined to the modelling stage. A comparison of Figure 6.4b with Figure 6.4c demonstrates the resolution errors that Chapter 6 — Physical Lightning Investigation 77 are subsequently introduced to the reconstructed model. It should be noted that the thickness of the channel is determined by an averaging of radii of verified channel segments, and therefore producing additional width errors if compared to the original image from Camera S1 perspective. Due to the cruder resolution of the original image from Camera S2 perspective, the resulting resolution of the reconstructed channel of the model is bulkier and less defined. If different camera resolutions are used to record the same lightning flash, these resolutions should be a contributing factor in the camera placements. 6.3 Experiment B-2: Multiple Channels (South Dakota) In this investigation, an upward lightning discharge channel with multiple branches is reconstructed using images taken from Mr. Warner in 2010 [44]. Five cameras captured the discharge channel from four different positions. The flash consists of two significant parts: upward branching leaders from the tower tip, and a return stroke extended across the horizon. Figure 6.5a presents the photographed image of the branched upward leader channels for Camera W1, which will be the focus of this investigation. The return stroke for this flash is presented in Figure 6.5b for the same camera perspective. It should be noted that these two frames have been selected from several frames illustrating the time resolved propagation of the flash. (a) (b) Figure 6.5: Camera W1 perspective of upward lightning leader propagation of a branched flash photographed at multiple perspectives. (a) Multiple channels (b) Return stroke. Chapter 6 — Physical Lightning Investigation 78 6.3.1 Experimental Setup Five cameras participated in the photography of an upward flash from the South Dakota tower occurring in 2010. The locations of the camera setup, relative eleva- tions and radial distances are presented in Table 6.1. All the cameras are located on lower ground in relation to the tower position, which is demonstrated by a negative relative elevation value. (a) (b) (c) (d) Figure 6.6: Upward lightning leader propagation of a branched flash photographed from Camera W2 to Camera W5. (a) Camera W2 (b) Camera W3 (c) Camera W4 (d) Camera W5. The multiple perspectives on the upward branched leader propagation are presented in Figure 6.6. It can be seen that Camera W2 and Camera W3 have little or no distortion on the image, whereas Camera W4 and Camera W5 were photographed with fisheye lenses and therefore contain a large amount of distortion. The lightning discharge captured in Camera W5 is much clearer than the photographed image in Camera 4 due to its closer proximity to the towers. Chapter 6 — Physical Lightning Investigation 79 Table 6.1: Geographic information of cameras in relation to a flash photographed on a tower in South Dakota. Location Relative Radial Reference Co-ordinates Elevation (m) Distance (km) Tower 44.0687◦N 103.2514◦W − − Camera W1 44.0324◦N 103.2728◦W −271 4.40 Camera W2 44.0336◦N 103.2857◦W −152 4.77 Camera W3 44.0348◦N 103.2880◦W −146 4.78 Camera W4 44.0348◦N 103.2880◦W −146 4.78 Camera W5 44.0615◦N 103.2501◦W −186 0.80 Table 6.2: Configurations for cameras participating in the photography of the flash occurring on the South Dakota tower. Camera Lateral Camera Image Reference Separation Lens Distortion) Camera W1 0◦ f/1.3, 3 mm - Camera W2 12◦ f/1.4, 2.8 mm minor Camera W3 15◦ – - Camera W4 15◦ fisheye 1.4 mm significant Camera W5 330◦ fisheye 1.4 mm significant For reconstruction, Camera W1 is used as the reference camera, as its image provides the clearest resolution and the most information on the lightning discharge, as shown in Figure 6.5. The lateral separation of the remaining cameras are measured in relation to Camera W1, and presented in Table 6.2. This table also presents the specific camera information based on lenses used on the cameras and identifying any significant image distortion which requires normalisation on the lens curvature. Chapter 6 — Physical Lightning Investigation 80 6.3.2 Reconstruction Consideration Since only three images are required for branched reconstructions, images from Camera W1, Camera W2 and Camera W3 are used in the reconstruction. Due to the major fisheye lens distortion on channel information captured from Camera W4 and Camera W5, the corresponding images are omitted from the reconstruction in this investigation. The three images participating in the reconstruction of the branched channel present different portions of the channel in the captured frame. This is corrected digitally to ensure that all the images include channel information that is mutually inclusive. The comparison is performed by a crude matching of channel shape. This matching method is unique to this case, because images are close in angular separation (i.e. 12◦ and 15◦ in relation to Camera W1 at 0◦), and no significant change is observed in the channel shape from all perspectives. Due to the acute angular separation on the three images, the variance of the channel information is limited. This fact may produce inaccurate reconstructed models, as the three-image algorithm was not designed for such small angular separations. To evaluate the capabilities of the algorithm (for the use of two and three images) efficiently, three tests are performed on the image data: • Part 1: Fully Branched Channel • Part 2: Simplified Branched Channel • Part 3: Single Branched Channel 6.3.3 Reconstruction Results: Part 1 The fully branched lightning channel is reconstructed to test the capability of the reconstruction algorithm for branched discharge channels. In particular, this set of images tests the algorithm under the condition of acute angular separation of the input images. The filtered Boolean images of the three perspectives are provided in Figure 6.7. The resulting images illustrating the reconstruction of the three-image model for the two branched-channel is presented in Figure 6.8. Chapter 6 — Physical Lightning Investigation 81 (a) (b) (c) Figure 6.7: Fully branched channel Boolean images of upward flash return stroke; cropped to include mutually inclusive data of the channel (a) Camera W1 at 0◦ (b) Camera W2 at 12◦ (c) Camera W3 at 15◦. (a) (b) (c) (d) Figure 6.8: Reconstructed lightning channel of the fully branched channel of the upward flash return stroke using two images (a) Reconstructed perspective of Camera W1 (b) Reconstructed perspective of Camera W2 (c) Reconstructed perspective of Camera W3 (d) Triple duplication of a channel. Chapter 6 — Physical Lightning Investigation 82 It is difficult to discern any useful information from the images taken from corre- sponding angles of the input images in Figure 6.8 (a-c). Despite this, it can be seen that there are channel thicknesses much greater than the original channel widths depicted in the input images. Additionally, it can be seen that redundant channels are also reconstructed. To investigate this reconstruction in greater detail, a different perspective is high- lighted, in the form of Figure 6.8 (d). This image demonstrates the existance of an offset occurring in the placement of the images, which produces three individual channels that appear to follow a similar channel shape. This implies that the images are not correctly aligned, and therefore reconstructs a ”ghosting” effect on the channels. 6.3.4 Reconstruction Results: Part 2 The lightning branching information is simplified to the usage of only two branches for reconstruction. This should provide the basic test for branched channel recon- struction using the three-image reconstruction algorithm. (a) (b) (c) Figure 6.9: Two-branched channel Boolean images of upward flash return stroke; cropped to include mutually inclusive data of the channel (a) Camera W1 at 0◦ (b) Camera W2 at 12◦ (c) Camera W3 at 15◦. The filtered Boolean images of the three perspectives are provided in Figure 6.9. The resulting images illustrating the reconstruction of the three-image model for the two branched-channel is presented in Figure 6.10. Chapter 6 — Physical Lightning Investigation 83 (a) (b) (c) (d) Figure 6.10: Reconstructed lightning channel of the two-branched channel of the upward flash return stroke using two images (a) Reconstructed perspective of Camera W1 (b) Reconstructed perspective of Camera W2 (c) Reconstructed perspective of Camera W3 (d) Extent of the full model. 6.3.5 Reconstruction Results: Part 3 A single channelled discharge for the flash is investigated in the form of the return stroke occurring for the tower flash. This provides the simplest form of reconstruc- tion on a concept that has already shown to be sucessful. The difference is using three images for the reconstruction, and the acute angle at which images are obtained. The filtered Boolean images of the three perspectives are provided in Figure 6.11. Two reconstructions are performed for this test, three-image and two-image recon- structions. This allows for the comparison in the performance of the two different algorithms on the same set of data at small angles of separation. The resulting images illustrating the reconstruction of the two-image model is presented in Fig- ure 6.12 and the three-image model is presented in Figure 6.13. The two-image reconstruction demonstrates a model that correctly follows the path of the channel — as expected. The significant observation from this model is the Chapter 6 — Physical Lightning Investigation 84 (a) (b) (c) Figure 6.11: Single branched channel Boolean images of upward flash return stroke; cropped to include mutually inclusive data of the channel (a) Camera W1 at 0◦ (b) Camera W2 at 12◦ (c) Camera W3 at 15◦. (a) (b) Figure 6.12: Reconstructed lightning channel of the single branched channel of the upward flash return stroke using two images (a) Reconstructed perspective of Camera W1 (b) Reconstructed perspective of Camera W3. greater relative thickness of the channel in comparison to the thickness of the original images, therefore, producing disproportionately thick channel segments. The three-image reconstruction appears to include a large amount of unwanted information, particularly at the top and bottom of the channel. Closer observation of this model reveals that redundant channel segments are included in the model; i.e. the y-axis does not present unique channel information and therefore appearing to form branching. It is expected that this is partially due to alignment of the three images. Chapter 6 — Physical Lightning Investigation 85 (a) (b) (c) Figure 6.13: Reconstructed lightning channel of the single branched channel of the upward flash return stroke using three images (a) Reconstructed perspective of Camera W1 (b) Reconstructed perspective of Camera W2 (c) Reconstructed perspective of Camera W3. 6.3.6 Discussion The reconstruction of this particular set of images has tested the reconstruction of discharge channels using images taken at acute angles more than the capabilities of the reconstruction algorithm for branching channels. It has been shown that such acute angular separation on the input images greatly distorts the channel that is reconstructed. Despite the fact that models could not be correctly reconstructed, some conclusions can still be made regarding the reconstruction of multiple channels and reconstructions from input images from very acute angular separations. Reconstructed Channel Thickness The reconstruction of this discharge channel has produced models that have branches of the channel that appear much thicker than the original image portrays. This is expected according to the reconstruction algorithm; the radius of each channel segment is determined by the intersections of outer normals of the white segments in the image. At acute angles, the positions of the outer intersection points would occur far from the center of the channel segment. This is demonstrated in an example of images placed at 10◦ separation shown in Figure 6.14. Chapter 6 — Physical Lightning Investigation 86 Figure 6.14: Channel thickness distortion modelled in the reconstruction due to acute angles. Duplicated Branches Reconstructed in Incorrect Positions It is evident in the images of the models reconstructed that there are several additional branches that are reconstructed, and should not appear in the channel. This is clearly evident in Figure 6.8d and Figure 6.10d. This is likely due to a problem with proper alignment of the images coupled with the extreme acute angle of the input images. The algorithm for three-image reconstruction is designed on a verification of cylinders, and because cylinders are so large in radius due to the extreme acute angles, incorrect data is being incorrectly verified as a channel segment. This is illustrated in the series of images in Figure 6.15a–c demonstrating each step of the verification process. Additional Image Information The use of these images from Camera W4 and Camera W5 would provide addi- tional channel information for future reconstructions and verification of channel reconstructions. In particular the use of Camera W5 would provide a marginally greater angular separation for the reconstruction, which could possibly provide a better reconstructed model, if image correction can be sufficiently achieved. The use of these two images would require significant image correction, of which open source applications do not provide functionality for this type of fisheye lens. Since Camera W3 and Camera W4 are placed in the same position, the image correction of Camera W4 can be matched with the image provided by Camera W3 to provide a level of accuracy. Camera W4 and Camera W5 use the same fisheye Chapter 6 — Physical Lightning Investigation 87 (a) (b) (c) Figure 6.15: Verification process for redundant channels at acute angles. (a) Identi- fication of cylinder centers and respective points (marked with ’x’) to calculate radii (b) Virtual cylinders with radii determined by the averaged distances of ‘x’ points (c) Third image verification incorrectly identifying all cylinders as valid. Chapter 6 — Physical Lightning Investigation 88 lens, so given an appropriate match of Camera W3 and Camera W4 images due to corrections, the same image correction can theoretically be applied to the image from Camera W5. 6.4 Conclusion The reconstruction of lightning discharge channels have provided similar results to the reconstructed channels from the HV laboratory environment. These re- constructions have demonstrated similar errors to the HV laboratory models, such as missing segments and branch duplication. This shows that reconstructions are mostly dependant on the quality of the input Boolean images, showing that the pre- processing steps are a vital part to obtaining success reconstructions. Despite the fact that reconstructed channels look similar to those produced from HV discharge channels, there has been no verification performed on the two sets of images. It has been shown that the model resolution is only as good as its weakest image resolution. This should be noted for when camera resolutions are vastly differ- ent, or if camera positions relative to the lightning flash differ significantly. It is recommended that if multiple camera resolutions are used to photograph the same discharge channel, that cameras with weaker resolutions be used in the closest possible site. Additional conclusions have been made, regarding the use of acute image per- spectives. In this investigation, it has been shown that not only do the acute angular separation of less than 15◦ produce thicker channel segments for single and multiple branched channels. This is demonstrated in Figure 6.14. In addition to the branched channel scenario, duplicated ‘ghosting’ channels are produced due to incorrect validation of the channel segments. This is demonstrated in Figure 6.15. This chapter has highlighted some difficulties that become evident in the large scale lightning investigation into reconstructing the channels in 3D, and also presented some of the limitations in the design of the reconstruction algorithms. The following chapter discusses the comparison of the HV laboratory investigation and the physical lightning investigation. Future extension to this study is also provided. 89 Chapter 7 Discussion and Future Work In this chapter, the results of the laboratory investigation are compared with the results from the physical lightning investigation. The system is evaluated in its modular components through the results and future reommendations in the refinement of each component are made. 7.1 Summary The feasibility of reconstructing discharge channels from digital images is based on evidence collected from several different sources, and the actual reconstruction is based entirely on the reconstruction procedure discussed in Chapter 4. This feasibility study therefore discusses the results of the investigation based on the system mentioned herein and possible extensions to the project. Table 7.1 provides a general summary of all the experiments discussed in Chapters 5 and 6 that have been performed for the feasibility study. The conclusion made for each experiment is provided in the table, including the channel shape, number of image inputs, angular separation of the cameras. For the channel shape option, S denotes single-channelled discharges, and B denotes branched. The conclusions made for each experiment provides the trend of whether datasets produced correct channel paths, and if the model reconstruction has been verified through an additional comparison. Each scenario is discussed further in this chapter. Chapter 7 — Discussion and Future Work 90 Table 7.1: Summary of all experiments performed for reconstruction of discharge channels under various algorithm configurations. Experiment Channel Image Angular Correct No. Shape (S/B) Inputs Separation Path? Verified? A1 S/B 2− 3 Various True True A2 S 2 120◦ True True A3 B 2 45◦ False True A3 B 3 45◦ True True Appendix F B 1 – True – B1 S 2 34◦ True – B2 B 3 0◦, 12◦, 15◦ False – B2 S 2 0◦, 15◦ True – B2 S 3 0◦, 12◦, 15◦ False – 7.2 Single-Channelled Investigation The reconstruction of single-channelled discharges is best suited with the use of the two-image reconstruction algorithm discussed in Section 4.4.2. The three-image reconstruction algorithm may also be used in the single-channelled discharge investi- gation, but has shown to produce duplicated channels and occasionally discontinuous channels. The reconstruction of single-channelled discharges have been shown to be reproduce the general shape of the discharge channel path through visual matching with original images. This is determined by overlaying the reconstructed model over the original image at its respective camera perspective. It has been noted that possible inaccuracies may be based on resolution, lens curvature, and camera tilt. 7.2.1 Laboratory Discharges Using a small-scale investigation of HV discharge channels, the reconstruction of single-channelled discharges have shown to reproduce channel paths that generally match in shape and size. The averaging option produces channels that visually Chapter 7 — Discussion and Future Work 91 follow the general path, but may not necessarily provide an accurate reproduction of the original channel path. The use of the first detect option provides good channel continuation, whereby minimal missing channel segments are reconstructed, but also produce more significant meshed branching duplication. From Figure 5.4, two images are used to reconstruct a single channelled laboratory discharge. Three cameras recorded the discharge at an angular separation of 120◦. The image displaying the most channel curvature was omitted from the reconstruc- tion. The reconstructed model produced similar curvature to the omitted image, and on comparison, it is shown that a tilting factor separates the mismatching to the original image. This type of verification has produced confidence in the basic two-image reconstruction algorithm. 7.2.2 Lightning Discharges From the physical investigation on two single-channelled lightning flashes in Tuscon, it can be seen that the reconstructed channels match well with the original images from the photographed perspective. This investigation demonstrated the limitations in model resolution due to one image perspective lacking relevant channel detail. It should be noted that if different camera resolutions will be used in a setup, cameras with weaker resolutions are recommended to be placed closer to the intended termination point. There were only two perspectives photographed for this lightning event, and no additional perspective could provide verification on the larger scaled reconstruction. In addition, the return stroke of a flash from South Dakota taken at very acute camera angles (≤ 15◦) has also been investigated. The two-image reconstruction algorithm produces channels that follow the general path, but constructs channel widths that are much thicker than expected from the original images at very acute image angles. This is due to the thickness of each cylinder segment is dependant on the intersections of each white-pixel segment extended from the original image, and at very acute angles, the intersection points are much further away from the cylinder centers, resulting in exaggerated radii. The three-image reconstruction algorithm produces disproportionately thick channel segments, but still follows the general path of the discharge channel shape. Chapter 7 — Discussion and Future Work 92 7.2.3 Discussion Two-image reconstructions cannot be readily verified if there is no additional per- spective to provide comparison on the reconstructed model. If only two images are recorded of a discharge channel, the only conclusion that can be made is that recontructed segments match the path and thickness of the original image at the given camera perspective at both perspectives. The availability of three or more camera perspectives allows for the verification of the two-image reconstruction algorithm. This has been verified in a controlled small- scale environment, but the larger scaled environment investigating lightning flashes has not yet provided verfication. Three camera perspectives can also provide verification on the three-image algo- rithm, although additional errors may be introduced to the model, such as missing channel segments and duplicated channel segments, which are both indications of slightly mis-aligned input images. 7.3 Multiple-Channelled Investigation The reconstruction of multiple-channelled discharge channels is shown to generally follow the channel path. As the three-image reconstruction algorithm stands, incon- sistencies are introduced to the reconstructed channel through attempting to equally use all the image information. 7.3.1 Laboratory Discharges The laboratory investigation produced one branched discharge channel with cameras placed at 45◦ separations. The channel has a single split, which provided the simplest evaluation of the reconstruction algorithm. The reconstructed channel demonstrates two known limitations of the three-image reconstruction algorithm: resolved channel segment inconsistencies and missing channel segments. Chapter 7 — Discussion and Future Work 93 7.3.2 Lightning Discharges The physical lightning investigation has also produced one event of a multiple- branched upward discharge channel photographed from five different perspectives, taken from South Dakota. Two camera perspectives are omitted from the investiga- tion due to significant image distortion from the fisheye lenses used. The remaining three cameras recording the event are placed in very acute angles of≤ 15◦ seperation. The reconstruction of multiple channels with images taken from the very acute angles provided general channel paths, but included errors such as redundant channels and disproportionately thick channel segments. These errors have been found to be caused by the design of the reconstruction algorithm. Reconstructing branched discharge channels using one branched image perspective provides a proof-of-concept for more complex branched channels. This tests the scenario for 90◦ camera separations where one image provides no branching informa- tion. This investigation does not resolve any 3D channel information, but accurately reconstructs the branched channel using the three-image reconstruction algorithm. It is shown from this investigation that the algorithm fails for very thin channels i.e. one or two pixels in width. 7.3.3 Discussion Multiple-channelled discharge reconstructions are successful under ideal conditions; i.e. 90◦ angular separation (with no 3D definition) and 45◦ separation in the laboratory environment. The best algorithm configuration for resolving channel branching for one double branched channel is Case 004. The algorithm fails in the reconstruction of multiple channels at very acute angles ≤ 15◦, by reconstructing redundant channels and producing channel widths that are much thicker than portrayed in the original images. It is important to use three input images for branched channels. Despite the fact that two-image reconstructions using the first detect option can provide acceptable models, it is hard to determine whether the resolved channel branches are correctly modelled, or if the ambiguities have been resolved instead. There is a 25% chance of the branches being correctly placed. A third image is imperative in providing the channel segment validation, and eliminating the ambiguity branched channels present. Chapter 7 — Discussion and Future Work 94 7.4 System Evaluation This investigation has shown that the system still has several flaws; and due to these flaws, has resulted in imperfect discharge channel reconstructions. Despite the errors observed, the weaknesses of the system are known, and as a proof of concept, the system has been shown to be successful in reconstructing discharge channels, with confidence gained in its single-channelled reconstructions. The known system flaws are discussed and critiqued in this section, leading up to a plan to extend this current work and the system capabilities. 7.4.1 Reconstruction Framework The reconstruction framework refers to the process involved after image processing, and before the reconstruction algorithm is applied. This framework determines the virtual environment for reconstruction, which deals with the image placement with respect to the origin of the environment. This part of the system has not been directly tested in the scope of this study, but through the investigations in this study, some future modifications have been identified to provide more optimised channel reconstructions. This may include providing feedback functionality to the placement of images in the virtual environment, to produce optimised models with minimal missing segments and reduce channel duplication. 7.4.2 Image Pre-Processing The filtering of images to the Boolean images used as inputs for the reconstruction algorithm has shown a successful elimination of redundant image information, and the successful identification of relevant discharge channel information. Nonetheless, this investigation has identified the need to normalise images according to camera tilt or camera lens curvature. An additional pre-processing step on the images can be incorporated to resolve this problem and assist in producing more accurate models. Chapter 7 — Discussion and Future Work 95 7.4.3 Reconstruction Algorithms The general method in reconstructing discharge channels using stacked cylinder segments has been shown to be a simple method of tackling a complex 3D problem. Common faults found in general method used in the reconstruction algorithms have shown to produce missing channel segments (most notably demonstrated by Figures 5.7 and 6.2) and disproportionate channel widths at acute image perspectives (as demonstrated in Figure 6.14). Missing channel segments have been found to result from input image data with channel sections of less than 3 pixels in width. If channel sections are not at least 3 pixels wide, a center, left and right normal cannot be extended from the relevant white pixels, resulting in a null channel segment and a discontinuity in reconstructed model. Future modifications would have to either limit the system from accepting channel widths less than 3 pixels in width, or would need to account for these narrow channel portions. Disproportionate channel widths appearing in the reconstructed model are a result of the method in which the channel segment radii are calculated. This method was originally designed for angles of separation of over 30◦. It was assumed at the time that camera perspectives smaller than that would not provide sufficient 3D spatial information significant enough to reconstruct a model. The channel segment radius is calculated from the intersection of a center normal of a white channel section in one image with a left or right normal of a corresponding white seciton in another image from a different perspective. This dynamic radius is dependant on the angle of separation on the input image perspectives, which does not make logical sense and should be revised. Future modifications made to this algorithm would include the calculation of channel segment radii independant of the image angular separation, and only based on the width of the white sections of the input images. This means that diameters will be calculated as an average of corresponding channel widths in the 1-pixel high sections. If intersections of far left and right normals with center normals are no longer required in the algorithm, this could reduce the number of required normals per 1-pixel high which image section to only one center normal. The application of this would also solve problem concerning missing channel segments due to thin channel widths. Chapter 7 — Discussion and Future Work 96 Two-Image Reconstruction Algorithm The two-image reconstruction algorithm has been validated in its ability to correctly reconstruct a discharge channel given only two perspectives (as shown in Figure 5.5). A valid model has been verified using a comparison with a third perspective that has not been used in the system as an input to the recontruction. The resulting model demonstrates a slight tilt in a portion of the reconstructed channel, but this offset is a result of the image alignment, and not the fault of the reconstruction algorithm. Three-Image Reconstruction Algorithm The reconstruction algorithm for three-image inputs have shown to produce redun- dant channel segments, sometimes meshed about a similar axis (as demonstrated in Figure 5.9), or extended far from the model center (as demonstrated in Figure 6.10d). Duplicated channel meshing provides an indication that images are not properly aligned, and therefore slight offsets occur in the calculated cylinder segment centers. The meshed channel branches can be solved by a re-evaluation of the verification method for channel segments, and can probably be optimised in the positioning of the images providing the best fit for the channel. However, this is out of the scope of this investigation. Occasionally, missing segments may also present the same indication. An acute angular separation of the image perspectives produces redundant channel branches extended far from the model center, as demonstrated in Figure 6.15. A possible modification to the reconstruction algorithm has been provided for preventing the reconstruction of these redundant channels in Section 7.4.3. 7.4.4 Testing Model Accuracy Currently, the most useful method of testing the accuracy of the reconstructed models is through a visual comparison of the Boolean image and the image of the matching model perspective. The visual comparison comprises of an evaluation of a matching channel shape, segment continuity and whether signficant channel duplication is reconstructed. These evaluations are performed using a side-by-side comparison of the Boolean image and the image of the reconstructed model at the same perspective. Chapter 7 — Discussion and Future Work 97 The testing framework currently provides two automated evaluations: the percent- age mismatch between the two images, and the percentage error of total white pixels reconstructed from a perspective matching. Both calculations provide a vague indication of the reconstructed model perspective, and little conclusion can be made with the results of each calculation. Future improvements to the testing framework could provide better functionality to the automated testing of the image datasets through image processing. This would reduce evaluation times and provide a more accurate description of the reconstructed models. This could be achieved in two ways: 1. Direct pixel matching of the two images and, 2. Idenfication of pixel coordinates demonstrating branching of branch tips and matching coordinates of both images. Additionally, models can be compared using the reconstructed coordinates of the channel segments, which may include the position of the segment center and the calculated radius. This test would only be able to be performed on models recon- structed from the same set of data, such as a comparison between the algorithm configurations, Cases 001− 007. 7.4.5 Future Work on Image Data A future objective of the work regarding this project is the collection of multiple lightning perspectives with the camera setup in Johannesburg, either on Brixton tower or Hillbrow tower. The collection of this image data would be more stringently monitored and will provide wider angular separation on image datasets than was provided from South Dakota as discussed in Section 6.3. In Johannesburg, there are two cameras are currently monitoring Brixton tower, one camera monitoring Hillbrow tower and another camera monitoring the Johan- nesburg skyline. The lightning incidence of the towers in question are discussed in Section 2.3.2. For the purpose of future 3D lightning reconstructions, the Brixton tower setup is discussed in this section. Camera locations in relation to Brixton tower are provided in Table 7.2, and pro- duced graphically in Figure 7.1. Observation of Brixton tower has been operational Chapter 7 — Discussion and Future Work 98 Table 7.2: Geographic information for Brixton tower and the relative camera locations. Location Co-ordinates Elevation (m) Distance (km) Brixton Tower 26◦11′33′′S 28◦00′25′′E 1779 – Site 1 26◦11′29′′S 28◦01′32′′E 1714 1.88 Site 2 26◦11′10′′S 28◦00′30′′E 1739 0.71 Figure 7.1: Camera views on Brixton tower indicating an approximate 70◦ separation between the two sites. since November 2009 from Site 1. The camera was set up to face Brixton tower from an observation point at the University of the Witwatersrand. The physical distance between the location of the tower and the observation site is approximately 1.88 km. Observation at Site 2 includes a portable setup using an Axis P1344. No image sets have been recorded from Site 2 due to difficulties in remote monitoring and the overall statistical nature of lightning to tall structures, as highlighed in Section 2.2.1. The collection of such image data is expected to be a long-term goal of this project. The collection of image data in this setup will provide testing information for different camera elevations, as shown in Figure 7.2. An elevation normalisation on the images would need to be implemented and properly tested for this scenario. Chapter 7 — Discussion and Future Work 99 Figure 7.2: Two camera sites providing vastly different camera elevations observing Brixton tower. This would also open up the scope of channels that can be photographed with the current equipment, including the possible 3D reconstruction of rocket-triggered lightning channels – currently an ongoing project performed by the research group. Additionally, more lightning images from different perspectives will be collected from multiple sources to start building up a database of lightning channels. With current camera technology, lightning channels are being recorded in high-speed, which provides a time resolution of leader propagations. If this information can be captured from favourable angular separations, this could open up a scope for time-resolved lightning channels. The following chapter summarises the findings of this work, in regard to the evalu- ation of the system and the two discharge environment investigations. 100 Chapter 8 Conclusion A system has been introduced and described for producing images capable of recon- structing 3D models of discharge channels. Each component of the system is modular and can be refined without difficulty. The system capabilities and limitations have been evaluated through the investigation of HV laboratory discharges, and full scale lightning discharges. Each discharge environment has produced at least one sample of single-channelled and multiple channelled discharges, which are used to evaluate both two- and three-image reconstruction algorithms. It can be seen that results from the laboratory and natural lightning investigations are similar; showing the relevance of conducting small scale tests to determine preliminary results for channel reconstruction. Several fundamental conclusions can be made using small-scale reconstructions of discharge channels. This includes the performance of all the algorithm configurations involved with two- and three-image reconstructions. From small scale investigations, the best algorithm configurations can be determined for use in lightning channel reconstructions, once images have been obtained. In addition, verification has been performed on the two-image reconstruction algorithm, which provides confidence in the reconstructed models, provided that input images are set according to the angular specifications. The reconstruction of lightning channels obtained from different sources has provided an acceptable proof-of-concept. Although, the image datasets have also indicated the limitations in the current reconstruction algorithms. The reconstruction of complex lightning channels with multiple branches cannot be fully evaluated, due to the limited image data set. Nonetheless, acceptable models have been reconstructed for a two-branched laboratory channel. Additional work needs to be performed on the system to provide more accurate Chapter 8 — Conclusion 101 and comprehensive models. This includes the addition of an image pre-processing step to provide sufficient normalisation for camera elevation, tilt and lens curvature. This also includes tweaking the reconstruction algorithm such that channel widths in images less than three pixels wide can be properly reconstructed without producing missing segments. The algorithm also needs to be changed to produce channel segments that are not dependant on the angle of separation, as this has shown to provide inaccurate models in the form of thicker channel segments and duplicated branches. Testing models through visual evaluation has provided some insight, but is largely subjective. Direct pixel comparisons need to be made on the Boolean and model images to produce proper matching of channel data. Although natural lightning investigations have been assessed using image data taken from different image sources, an evaluation on lightning images recorded from the Johannesburg camera setup must still be performed as an extension to this project. This is subject to the statistical nature of the lightning event to tall structures, and the difficulties experienced from remote monitoring and placement of cameras. 102 References [1] V. Rakov and M. Uman. Lightning — Physics and Effects. Department of Electrical and Computer Engineering, University of Florida: Cambridge University Press, 2003. [2] D. Malan. Physics of Lightning . The English Universities Press Ltd, 1963. [3] Y. Liu, A. Rapson, and K. Nixon. “Laboratory Investigation into Reconstruct- ing a Three Dimensional Model of a Discharge Channel using Digital Images.” South African Universities’ Power Engineering Conference (SAUPEC) — Stellenbosch, South Africa, vol. 18, p. 83, 2009. [4] A. Eriksson. “Lightning and Tall Structures.” The Transactions of the SA Institute of Electrical Engineers (SAIEE), 1978. [5] V. Cooray. The Lightning Flash, Chap Title: The Mechanism of the Lightning Flash, chap. 4, pp. 127–225. Michael Faraday House, Six Hills Way, Stevenage, Herts., SG1 2AY, United Kingdom: The Institute of Electrical Engineers, London, 2003. [6] K. Cummins, M. Saba, T. Warner, C. Weidman, L. Campos, S. Fleenor, A. Saraiva, and W. Scheftic. “A Multi-Camera High-Speed Video Study of Cloud-to-Ground Lightning in South Arizona — Preliminary Results.” ICLP — Uppsala, Sweden, vol. 29, no. 1c1, 2008. [7] M. M. Saba, K. L. Cummins, T. A. Warner, P. E. Krider, L. Z. Campos, M. G. Ballarotti, O. Pinto Jr, and S. A. Fleenor. “Positive Leader Characteristics from High-Speed Video Observations.” 20th International Lightning Detection Conference — Tuscon, USA, 2008. [8] A. Hussein, M. Milewski, A. Abdelraziq, W. Janischewskyj, and F. Jabbar. “Vi- sual Characteristics of CN Tower Lightning Flashes.” International Conference on Lightning Protection (ICLP) — Kanazawa, Japan, vol. 28, no. I-11, 2006. [9] S. Ngqungqa. A Critical Evaluation and Analysis of Methods of Determining the Number of Times that Lightning will Strike a Structure. Master’s thesis, Faculty of Engineering and the Built Environment, University of the Witwatersrand, Johannesburg, South Africa, January 2005. [10] F. Rachidi. “Modeling Lightning Return Strokes to Tall Structures: A Review.” Journal of Lightning Research, vol. 1, 2007. References 103 [11] A. Eriksson. “The Incidence of Lightning Strikes to Power Lines.” IEEE Transactions on Power Delivery , vol. 2, no. 3, 1987. [12] A. Eriksson and D. Meal. “The Incidence of Direct Lightning Strikes to Structures and Overhead Lines.” Lightning and Power Systems IEE Conference — London, , no. 236, pp. 67–71, 1984. [13] A. Hussein, W. Janischewskyj, F. Noor, and M. Milewski. “Characteristics of Lightning Flashes Striking the CN Tower below its Tip.” International Conference on Lightning Protection (ICLP) — Avignon, France, vol. 27, no. 4p8, 2004. [14] A. Hussein, V. Todorovski, M. Milewski, K. Cummins, and W. Janischewskyj. “Characteristics of Lightning Strikes at and in the Vicinity of the CN Tower.” International Conference on Lightning Protection (ICLP) — Uppsala, Sweden, vol. 29, no. 1c4, 2008. [15] A. Lafkovici, A. Hussein, W. Janischewskyj, and K. Cummins. “Evaluation of the Performance Characteristics of the North American Lightning Detection Network Based on Tall-Structure Lightning.” IEEE Transactions on Electro- magnetic Compatibility , vol. 50, pp. 630–641, 2008. [16] T. Warner. “Observations of Simultaneous Multiple Upward Leaders from Tall Towers.” International Conference on Lightning Protection (ICLP) — Cagliari, Italy , vol. 30, no. 1, 2010. [17] T. Warner. “Upward Leader Development from Tall Towers in Response to Downward Stepped Leaders.” International Conference on Lightning Protection (ICLP) — Cagliari, Italy , vol. 30, no. 1069, 2010. [18] M. Miki, A. Wada, and A. Asakawa. “Observations of Upward Lightning in Winter at the Coast of Japan Sea with a High-Speed Video Camera.” International Conference on Lightning Protection (ICLP) — Avignon, France, vol. 27, no. 1a2, 2004. [19] National Regulatory Services, NRS. NRS042: Guide for the Protection of Electronic Equipment Against Damaging Transients, 1996. [20] I. Jandrell, R. Blumenthal, R. Anderson, and E. Trengove. “Recent Lightning Research in South Africa with a Special Focus on Keraunopathology.” ISH — Cape Town, South Africa, vol. 16, p. 2, 2009. [21] D. Malan. “Lightning and its Effects on High Structures.” The Transactions of the S.A. Institute of Electrical Engineers, vol. 60, no. 6, pp. 241–242, 1969. [22] Y. Liu, H. Hunt, M. Grant, and K. Nixon. “Observations of Lightning Dis- charges on Brixton Tower.” International Conference on Lightning Protection (ICLP) – Cagliari, Italy , vol. 30, no. P1073, 2010. References 104 [23] L. Davie. “Hillbrow Tower – Symbol of Joburg.” South Africa.info – www.southafrica.info/travel/cities/hillbrowtowers.htm, 2004, Last accessed 25 February 2011. [24] N. Petrov and R. Waters. “Determination of the Striking Distance of Lightning to Earthed Structures.” The Royal Society – Lond. A, vol. 450, no. 1940, pp. 589–601, 1995. [25] A. Mimouni, F. Rachidi, and Z.-e. Azzouz. “Electromagnetic Environment in the Immediate Vicinity of a Lightning Return Stroke.” Journal of Lightning Research, vol. 2, pp. 64–75, 2007. [26] L. Dellera and E. Garbagnati. “Lightning Stroke Simulation by mean of the Leader Progression Model – Part 1.” IEEE Transactions on Power Delivery , 1990. [27] L. Dellera and E. Garbagnati. “Lightning Stroke Simulation by mean of the Leader Progression Model – Part 2.” IEEE Transactions on Power Delivery , 1990. [28] A. Gulya´s and N. Szedenik. “3D Simulation of the Lightning Path Using a Mixed Physical-Probabilistic Model — The Open Source Lightning Model.” Journal of Electrostatics, vol. 67, pp. 518–523, 2009. [29] T. Reed and B. Wyvill. “Visual Simulation of Lightning.” International Conference and Exhibition on Computer Graphics and Interactive Techniques (SIGGRAPH), vol. 1, 1994. [30] Y. Dobashi, T. Yamamoto, and T. Nishita. “Efficient Rendering of Lightning Taking into Account Scattering Effects due to Clouds and Atmospheric Parti- cles.” Pacific Conference on Computer Graphics and Applications, pp. 390–399, 2001. [31] A. Eriksson. The Lightning Ground Flash: An Engineering Study . Ph.D. thesis, Electrical Engineering, University of Natal, Pretoria, South Africa, December 1979. [32] S. Gu, N. Xiang, and J. Chen. “3D Channel Tortuosity of Long Air Gap Discharge.” APL — Chengdu, China, 2011. [33] J. Bryan and S. Semwal. Fast Simulation of Lightning for 3D Games. Master’s thesis, Department of Computer Science, University of Colorado, Colorado Springs, 2008. [34] R. Serway and J. Jewett. Physics for Scientists Engineers with Modern Physics. Thomson Bokes/Cole, 6th ed., 2004. [35] Axis® Communications AB. http://www.axis.com, Last accessed 09 January 2012. [36] Axis® Communications AB. AXIS207 User’s Manual Rev 3.0 , August 2006. References 105 [37] Axis® Communications AB. AXIS M10 Network Camera Series – Datasheet , 2010. [38] Axis® Communications AB. Axis P13 Network Camera Series – Datasheet , 2011. [39] W. Schroeder, K. Martin, and B. Lorensen. The Visualisation Toolkit: An Object-Oriented Approach to 3D Graphics. Kitware, 4th ed., 2006. [40] Y. Liu, K. Nixon, and I. Jandrell. “A Method of Creating Graphical 3D Reconstruction of High Voltage Discharge Channels Using Digital Images.” International Symposium on High Voltage (ISH) – Hannover, Germany , vol. 17, no. B-054, 2011. [41] Y. Liu, K. Nixon, and I. Jandrell. “Preliminary Investigation into Three- Dimensional Reconstruction of Laboratory High Voltage Discharges using Photographs taken from Different Elevation Perspectives.” Ground LPE – Salvador, Brazil , vol. 4, no. P8, 2010. [42] Y. Liu, K. Nixon, and I. Jandrell. “A Preliminary Investigation into 2D Recon- struction of Branched Lightning Discharge Channels in a 3D Environment.” [43] M. M. Saba. “Personal Communication.” Instituto Nacional de Pesquisas Espaciais, Av. dos Astronatuas, 1758 - 12227-010 - S. Jos dos Campos/SP - Brazil., 2010. [44] T. Warner. “Personal Communication.” South Dakota School of Mines and Technology, Rapid City, SD, USA, 2010. 106 Appendix A Discharge Channel Photography A.1 Introduction The photography of discharge channels is not trivial. This appendix provides a summary of the camera technologies that can be used to photograph the fast transient events. Furthermore, additional information is provided on the current cameras available for this investigation. A.2 Possible Camera Solutions There are several capture devices and techniques available for capturing an image of a lightning discharge channel. Five types of capture devices have been identified as the more commonly used techniques at present time for photographing lightning channels. This discussion will provide a brief comparison of each type. • Converter camera and streak camera • High-speed video camera • Still-digital camera • Digital video camera • Analogue still camera Converter and streak cameras are capable of measuring very fast phenomena such as the propagation of the leader or return stroke [18]. With this in mind, they Appendix A — Discharge Channel Photography 107 have insufficient recording time to measure entire discharge channel. High-speed video cameras can optically observe an entire discharge, but is very expensive. The advantage of using the high time resolution cameras is that the chance of overexposure to the image sensor is very rare, as seen in image comparisons in [8]. The digital video camera can record entire flashes, although the time resolution is not capable of distinguishing individual strokes. The analogue still camera is capable of capturing fast phenomena by leaving the aperture open for long exposure, which is useful for eliminating the problem of triggering the camera shutter. The drawback with the still-analogue option occurs with overexposure of the film and the need for processing the film before it could be properly analysed. The conventional still/video cameras provide an affordable solution, although the image sensor has a high possibility of being overexposed. The other problems pertinent to photographing lightning are addressed with spe- cial techniques. There are certain methods that help to eliminate the problems mentioned with the photography of lightning. Over-exposure of the image sensor caused by the intense light flooding the lens is solved by using optical filters, which is significant in the absence of aperture control on the camera. The uncertainty of the strike termination point is eliminated by focusing the camera to capture lightning attachment on a tall structure. Another issue is the lack of certainty for when a strike will occur. This problem can be addressed with the use of an electromagnetic sensor or light sensor, which could be expected to trigger the capture device when a strike is sensed. A.3 Summary of Camera Settings Chronologically, cameras of the Axis 207 range were obtained first (four 207W and one 207MW). These cameras were originally chosen for its wireless property. Through discovered limitations in these camears, discussed further in Section 4.2.4, an Axis M1011 was obtained to replace damaged cameras. At the time, the 207 range was discontinued, and the M1011 was the upgraded version. At a later stage, four Axis P1344 cameras were obtained, which were considerably more expensive, but have power options that are beneficial for use in high electromagnetic environments, discussed in further in Section 4.2.4. These cameras also presented an indoor or outdoor installation option, providing more flexibility in camera positioning. Appendix A — Discharge Channel Photography 108 The usage of all the cameras discussed are summarised in Table A.1. The camera capabilities provided for each camera type demonstrates the highest or maximum setting. Some settings are variable and can be reduced to less complex specifications. Table A.1: General camera settings configured for the laboratory and/or physical investigation. Camera Property 207W 207MW M1011 P1344 Relative Cost low moderate moderate high Electrical Isolation − − − 12 battery Quantity 4 1 1 4 Damaged 3 1 0 0 Currently Operational 1 0 1 4 Location 1 (L1) − 1 (L2) 1 (L3) 1 (L4) 2 variable Resolution (pixels) 640× 480 1280× 1024 1024× 640 1280× 800 Frame-rate (fps ) 10− 15 10− 15 10− 15 30 Trigger motion motion motion motion Pre-buffer (s) 2 2 2 2 Optical Zoom − − − yes Set Colour Option greyscale greyscale greyscale variable Image Slicing vertical vertical unknown pre-buffer wireless/ wireless/ Communication LAN LAN LAN LAN Storage Method FTP FTP FTP on-board Storage Location directory directory directory SD card File Format JPEG JPEG JPEG MKV Data Conversion − − − MKV to JPEG Appendix A — Discharge Channel Photography 109 A.4 Conclusion This appendix provides some camera technology which can used in the photography of discharge channels. This is not an all-inclusive list of technologies available. Lastly, surveillance camera technologies used in this study have been provided. 110 Appendix B Motivation for Three-Dimensional Study of Lightning B.1 Preamble This appendix is a paper that was accepted and presented for publication by the International Conference on Lightning Protection (ICLP) in 2010, hosted in Cagliari, Sardinia. The paper is entitled: Observation of Lightning Discharges on Brixton Tower . B.2 Paper Description This paper discusses general observations of lightning to Brixton Tower in Johan- nesburg, and presents a photographed case of downward lightning appearing to trigger upward lightning on a nearby tower. Lightning data from the South African Lightning Detection Network (SALDN) is used to analyse the photographed events through matching of the times and location data. This investigation proved through the fact that only one camera perspective captured this event, and therefore provides the scope and motivation for reconstructing 3D models of lightning. OBSERVATIONS OF LIGHTNING DISCHARGES ON BRIXTON TOWER Y.C.J. Liu, H.G.P. Hunt, M.D. Grant and K.J. Nixon University of the Witwatersrand, Johannesburg, South Africa Yu-Chieh.Liu@students.wits.ac.za ABSTRACT Observations of lightning strikes to Brixton Tower in South Africa are investigated in this paper. The tower is topograph- ically situated in an ideal location to study lightning strikes, and has the benefit of a physical height of 250 m. Observa- tions presented in this paper were made through photographic recordings of lightning events from November 2009 to May 2010. Lightning data from the Southern African Lightning Detection Network (SALDN) is used to match recorded light- ning strokes to photographed events. The SALDN provides the associated stroke parameters for assessment of the events in terms of peak current values as well as rise and decay times. Particular focus is given to studying positive polarity events. This includes an investigation into positive strikes to the tower and an event of a downward positive flash that appears to ini- tiate an upward flash from the tower. 1 INTRODUCTION Lightning study observations of frequently struck structures have formed an important component of lightning research [1–4]. Since lightning has a tendency to attach to the tallest object in its immediate area — these structures are typically tall or isolated. Brixton Tower (also known as Sentech Tower) is a structure that stands 250 m tall in Johannesburg, South Africa [1]. It is an ideal site for observing lightning activity, due to its elevated topographical location, physical height and lower-rise buildings in the immediate vicinity. An observation point was set up to photograph lightning strikes to the structure. Several events are compared to the corresponding lightning data from the South African Lightning Detection Network (SALDN). Some of these events, which feature mostly positive polarity flashes, are presented and analysed in this paper. 2 BACKGROUND Brixton Tower stands quite prominently as the tallest structure in the immediate area. This topo- graphical advantage prompted the setup of the surveil- lance system to collect optical lightning data attaching to the tower for a work involving the reconstruction of three-dimensional models from photographs [5]. Light- ning data from the SALDN is used to quantify current parameters of the attaching lightning discharges to the tower. Using both optical and SALDN data, motiva- tion is presented for using Brixton Tower as a observa- tion point for lightning events. This takes the form of an investigation into the flash count of the tower, up- ward vs. downward strikes, and positive vs. negative polarity strikes. 2.1 Surveillance Considerations A low-cost surveillance camera was set up to face Brixton Tower from an observation point at the University of the Witwatersrand. The local area has a high ground flash density, Ng, of 7.5 – 12 flashes/km2/year [6, 7]. Photographs of the lightning activity was triggered by motion detection. The cam- era was situated indoors, behind a glass window, which explains some blemishes in the frames and light distor- tions due to rain droplets. An infrared filter was placed over the camera lens to reduce the light intensity to the image sensor. The observation point was specifically set up for a project that requires optical lightning data. Therefore, no corresponding electromagnetic fields, or current val- ues were measured for the associated lightning events at the surveillance site. The surveillance camera used has a frame-rate of 10 frames per second with the use of a pre-buffer, essential for capturing the images [5]. This leaves a general time-resolution within the range of 100±20 ms. Since only one perspective of the light- ning event is photographed, most of the spatial distri- bution of the events were limited to a two dimensions. The reliability of the motion detection triggering is un- known, and it is possible that some events may not have been captured. 2.2 The Southern African Lightning Detection Net- work (SALDN) The SALDN is a lightning location system consist- ing of 20 Vaisala LS7000 sensors (19 sensors in South Africa and 1 located in Swaziland) [7, 8]. The light- ning detection network was commissioned by the South African Weather Service (SAWS) and has been opera- 1073-1 tional since January 2006. At present, the South African system has not been calibrated using ground-truth data. An early investi- gation was performed into the ground stroke count of the area around Brixton Tower using the historical data from the SALDN presented in Figure 1. A ground flash density of 20 flashes/km2/year is suggested, assuming an average stroke number per flash of 2.5 [9]. This preliminary study of the SALDN is subject to further investigation. Figure 1: Ground stroke count for Brixton Tower (and Hillbrow Tower) area using SALDN data for 801 days of obser- vation on an approximate 1 km2 grid. In order to compare the SALDN data with the pho- tographs, strokes reported by the SALDN need to be matched to the photographs through timing and posi- tion of known strikes. The preferred method of doing this would be to compare times, however, since the surveillance was not initially intended for comparison purposes, it was not synchronised to a standard time. It was noted that the camera clock was approximately 2:30 minutes off standard time. Consequently, absolute time comparison is difficult. However, as Figure 1 shows, a high density of strokes occurs in the location of the Brixton Tower at (26◦ 11’ 32.82” S, 28◦ 00’ 24.73” E) and Hillbrow Tower at (26◦ 11’ 12.51” S 28◦ 02’ 57.66” E) — a nearby tower 4.8 km east north-east of Brixton. Clearly, the SALDN is recording lightning strokes to the Brix- ton Tower although there is a slight offset in the re- ported location. Given this, the assumption is made that strokes reported within this area and within the approximate time of the correlating photographs are, indeed, the photographed strikes. The identi- fied strokes had a maximum latitudinal deviation of 26◦ 10’ 48” S to 26◦ 12’ 00” S and a longitudinal devia- tion of 27◦ 57’ 00” E to 28◦ 01’ 30” E. The reported data was examined for up to 5:00 minutes after the recorded time of a photograph. 2.3 Preliminary Flash Count to the Tower A flash count investigation from existing data will serve as an indicator for the high lightning activity to the tower. Using Eriksson’s empirically derived equa- tion in Equation 1 [10], the expected annual light- ning incidence, N , to the 250 m tall tower is 15 to 24 flashes/year. N = 24× 10−6 ×H2.05s ×Ng (1) where Hs is the height of the structure in m and Ng is the ground flash density in flashes/km2/year. An effec- tive height is recommended [2], but since the tower is slender in comparison to its height, the physical height is used. Using Equation 2 [11], the probability of up- ward flashes occurring on Brixton Tower is 61.53%. Pu = 52.8ln(Hs)− 230 (2) The predicted flash count to the tower and upward probability is compared to the observed incidence in Table I. Table. I. Flash Incidence to Brixton Tower. Result Upward (flashes/year) Probability Eriksson 61.53% Ng = 7.5 15 - Ng = 12 24 - Surveillance* 19 63.16%** SALDN 20 - * Lightning incidence for only 7 months of a year. ** 12 of 19 recorded flashes displayed upward branching, the remaining flashes were inconclusive on the direction of propaga- tion. The surveillance has been operational for the bulk of the 2009/2010 thunderstorm season in South Africa. A total of 19 strikes to the Brixton Tower were recorded by the surveillance, which falls between the two calcu- lated flash densities of 15 to 24. Although the pre- diction accounts for a year’s worth of data, the thun- derstorm season is expected to provide the bulk of the flashes to the tower since it includes a large portion of the South African thunderstorm season. This shows that the flash density has shown an increase since 7.5 flashes/km2/year was reported. Of the 19 strikes to the tower, 14 could be con- fidently identified from the SALDN data. Within this 1073-2 (a) (b) Figure 2: Downward flash triggers upward flash from Brixton Tower (a) downward flash 16:29:33.850 (b) upward flash 16:29:33.970 dataset, 3 strikes were recorded with a positive polarity (21.4%), and 11 were recorded with a negative polarity (78.6%). 3 ANALYSIS OF SURVEILLANCE The surveillance provides evidence of lightning flashes to the tower. Two notable observations have been made, which include an event in which a down- ward flash triggers an upward flash, and an investiga- tion into positive strikes observed. 3.1 Downward Triggers Upward Figure 2 (a)-(b) presents what appears to be a downward strike, which initiates the triggering of an upward strike through the enhancement of the local electric field. This data was taken during a short day- time thunderstorm on 2009-11-02, 16:29. 3.1.1 Descending Flash Analysis The first frame shown in Figure 2 (a) demonstrates a highly charged channel from the cloud charge centre in the left side of the frame to a structure behind the Brixton Tower. The downward path does not seem very tortuous although it has a minor branch directly behind the tower. The attachment point of the main chan- nel has a two-dimensional distance of 176.5 m from the base of the tower, and 235.3 m from its minor branch attachment. These distance values were obtained using the a pixel-to-distance ratio using the tower height as a reference. A flash proceeded by a large amount of cloud activ- ity, (mostly) single stroke flash, long horizontal chan- nels and minimal branching are characteristics of pos- itive lightning [12, 13]. This is further supported bythe SALDN, which recorded a positive stroke located within the two-dimensional distance of the primary channel from the downward flash in Figure 2 (a). The detected stroke had a recorded return stroke of 16 kA with a rise time of 10.6µs and a peak-to-zero time of 14.2µs. It appears that the upward flash was not recorded by the system. Since the downward channel has been determined as a positive flash, conventional attractive radius calcula- tions do not apply to this situation. Petrov and Waters formulated an expression to relate positive downward stroke return current, Ip and height of the structure to the striking distance (or attractive radius, Ra) [14]. Petrov and D’Alessandro later revised the expression to accommodate structure heights greater than 200 m [15]. An attractive radius R+a of 28 m is determined for apositive peak current of 16 kA, which shows that there is little possibility of the stroke leader intercepting any upward leaders from the tower. R+a = 0.103[(Hs + 30)Ip]2/3 (3) Figure 3: Scaled overhead view of the downward positive flash de- tected by the SALDN with respect to the surveillance setup. a1−4: Downward flash indicators, b1: Brixton Tower, c1: Charge centre indicator, O1: Surveillance location. 1073-3 (a) (b) Figure 4: Positive strikes to the tower as recorded by the surveillance (a) 2010-01-07 (b) 2010-04-20. Figure 3 shows a graphical representation of the analysis performed for the downward flash. The down- ward stroke detected by the SALDN is marked by a1 with an error ellipse around the point of detec- tion. There lies a 50% probability that the stroke ap- pears within the error ellipse. The downward stroke as viewed by surveillance in Figure 2 (a) is represented by the extended line from the camera at O1 through a2 which is 176.5m south of the tower location. This line intersects with the error ellipse at a3 and a4, which provides a higher probability of the stroke termination point location between the two points. This criterion alone does not explicitly provide con- clusions that the descending positive leader could not intercept an ascending negative leader from the tower. The path of the downward leader from a charge centre in the clouds must be evaluated to confidently conclude that attachment to the tower was not possible in this situation. The charge activity in the clouds is assumed to be the position of the charge center. This is marked by c1 in Figure 3, using the high-rise building directly below the charge centre as an indicator. A line is ex- tended from the camera through c1 to provide a depth perception lacking in the frame, which indicates the possible locations of the charge center. Unfortunately, further analysis cannot be performed due to the lack of a second optical perspective. This illustrates the im- portance of obtaining a three-dimensional perspective of the lightning channel. 3.1.2 Ascending Flash Analysis The second frame in Figure 2 (b) clearly demon- strates a branched upward strike from the Brixton Tower 120 ms later. This frame shows that the down- ward strike is still illuminated. The upward leader is assumed to be a negative leader for two reasons; charge intensification will be negative at the tip of the tower, induced by a positive stroke, and the upward stroke ap- pears to be highly branched, which is a common char- acteristic of negative leaders. Most upward lightning assessments consider the positive ascending leader scenario i.e. Rizk’s upward leader inception criteria in [16–19], but do not consider the negative ascending leader scenario. This assess- ment cannot be taken further without knowledge of the leader inception criteria for a negative leader. Fur- thermore, the charge intensification of the tower cannot be determined due to unknown initial conditions of the tower tip before the downward stroke and due to the unknown propagation of the downward channel path. 3.2 Observed Positive Strokes Positive strikes are known to be less frequent than their negative counterpart. There were a total of three positive strokes recorded by the surveillance camera with corresponding SALDN data. Stroke 2009-11-02 is the downward positive stroke mentioned in Section 3.1, the only stroke not attached to the tower. The remain- ing two are presented in Figure 4, where (a) has com- pletely overexposed the frame without any evidence of branching (in any of the captured frames) and (b) has evidence of upward branching. Each of the strikes contain only one recorded stroke, as expected. The SALDN data also records rise times (τ1) and peak-to- zero times (τ2) for each detected stroke, as presented in Table II. Equations reproducing positive-polarity waveshape curves have not been produced due to the limited num- ber of recorded positive strokes [20]. Heidler’s func- tion Equation 4 was implemented to produce the wave- 1073-4 shapes in Figure 5 for demonstrative purposes, even though it was emperically derived for negative first strokes [21]. Table. II. Parameters measured by the SALDN for observed positive strokes to and around Brixton Tower. Stroke Ip (kA) τ1 (µs) τ2 (µs) Q0(C)* 2009-11-02 16 10.6 14.2 3.6 2010-01-07 19 2.6 30.2 19.7 2010-04-20 7 9.8 15.6 2.4 * The charge value is estimated using Equation 6 and the pa- rameters in Table II. i0(t) = I0η ( t τ1 )n ( 1 + tτ1 )n exp (−t τ2 ) (4) where η = exp ( −τ1 τ2 (nτ2 τ1 ) 1 n ) (5) The drawback to using Equation 4 was that steep- ness factor parameter n was varied in order to obtain the correct peak current. By tending n to ∞ the cur- rent peak tends to the measured current values, but the front time becomes increasingly steep, with the wave- form only rising approximately 10µs after it was ini- tially meant to rise. For the strokes on 2009-11-02 and 2010-04-20, n=4 and 2010-01-07 n=30 to achieve the correct peak current values. 0 10 20 30 40 50 600 2 4 6 8 10 12 14 16 18 20 Time (µs) Cur ren t (kA ) Positive Strokes 2009−11−02 2010−01−07 2010−04−20 Figure 5: Simulated waveforms of positive strokes using Equa- tion 4 to and around Brixton Tower from parameters in Table II. Q0 = (I0τ2 η )∫ ∞ 0 ξne−ξ (τ1/τ2)n + ξn dξ (6) where ξ = t/τ2 (7) It can be seen that 2010-01-07 has a large area un- der the curve. By performing charge transfer calcula- tions from Equation 6 shown in Table II [21], the charge of this stroke appears to be significantly greater than the other two strokes. This fact could account for the overexposed frame in Figure 4 (a), despite its relatively low current peak of 19 kA compared to the median peak documented by Saba et al of 28 kA [13]. 4 FUTURE WORK AND ANALYSIS This work has been limited by using two- dimensional spatial distribution. Work is currently in progress to provide another perspective of the tower at an approximate 90◦ separation. The additional view point will provide the possibility for reconstructing a three-dimensional channel of the flash. A full analysis of the flash count of Brixton Tower needs to be made after at least a year’s worth of in- formation has been captured, which will provide a more accurate indication of the relationship between expected probabilities and recorded data. This may provide an increased flash count, which would suggest a higher ground flash density in Johannesburg. At this stage is no instrumentation on the tower, and therefore the SALDN provides the only measured lightning parameters. Steps will be taken to provide in- strumentation to correspond with the photographic im- ages. Furthermore, the SALDN will be fully evaluated in terms of detection efficiency and location accuracy using ground-truth data in the future. 5 CONCLUSIONS From the work presented in this paper, photo- graphic records of lightning strikes to Brixton Tower have relevance to general lightning assessments, includ- ing upward vs. downward and positive polarity vs. negative polarity analyses, and observations of unique lightning events. Although the SALDN has not been tested rigor- ously against ground-truth data, it is evident that flash densities are higher at high-rise towers (Brixton and Hillbrow Towers). This provides confidence in using the lightning data from the SALDN in these assessments, particularly in the absence of measurements conducted at the site. This paper presents the limitations of using one op- tical perspective, therefore providing scope for three- dimensional reconstruction of lightning discharge chan- nels. 1073-5 6 ACKNOWLEDGEMENTS The authors would like to thank the South African Weather Service (SAWS) for their support and for pro- viding the SALDN data used in this paper. They would also like to thank CBI-electric for funding the Chair of Lightning at the University of the Witwatersrand and for direct support of the Research Group. They would also like to thank Eskom for the support of the Light- ning/EMC Research Group through the TESP pro- gramme. Thanks are extended to the department of Trade and Industry (DTI) for THRIP funding as well as to the National Research Foundation (NRF) for di- rect funding of the Research Group. 7 REFERENCES [1] S. Ngqungqa. A Critical Evaluation and Analysis of Meth- ods of Determining the Number of Times that Lightning will Strike a Structure. Master’s thesis, Faculty of Engi- neering and the Built Environment, University of the Wit- watersrand, Johannesburg, South Africa, January 2005. [2] A. Eriksson. Lightning and Tall Structures. The Transac- tions of the SA Institute of Electrical Engineers (SAIEE), 1978. [3] A. Hussein, M. Milewski, A. Abdelraziq, W. Janischewskyj, and F. Jabbar. Visual Characteristics of CN Tower Light- ning Flashes. ICLP — Kanazawa, Japan, vol. 28, no. I-11, 2006. [4] F. Rachidi. Modeling Lightning Return Strokes to Tall Structures: A Review. Journal of Lightning Research, vol. 1, 2007. [5] Y. Liu, A. Rapson, and K. Nixon. Laboratory Investiga- tion into Reconstructing a Three Dimensional Model of a Discharge Channel using Digital Images. SAUPEC — Stel- lenbosch, South Africa, vol. 18, p. 83, 2009. [6] National Regulatory Services, NRS. NRS042: Guide for the Protection of Electronic Equipment Against Damaging Transients, 1996. [7] I. Jandrell, R. Blumenthal, R. Anderson, and E. Trengove. Recent Lightning Research in South Africa with a Special Focus on Keraunopathology. ISH — Cape Town, South Africa, vol. 16, p. 2, 2009. [8] R. Evert and G. Schulze. Impact of a New Lightning Detec- tion and Location System in South Africa. Inaugural IEEE Power Engineering Society Conference and Exposition in Africa — Stellenbosch, South Africa, 2005. [9] T. Gill. Initial Steps in the Development of a Comprehen- sive Lightning Climatology of South Africa. Master’s the- sis, School of Geography, Archaeology and Environmental Studies: Climate Research Group, University of the Wit- watersrand, Johannesburg, South Africa, January 2005. [10] A. Eriksson. The Incidence of Lightning Strikes to Power Lines. IEEE Transactions on Power Delivery, vol. 2, no. 3, 1987. [11] A. Eriksson and D. Meal. The Incidence of Direct Lightning Strikes to Structures and Overhead Lines. Lightning and Power Systems IEE Conference — London, , no. 236, pp. 67–71, 1984. [12] V. Rakov and M. Uman. Lightning — Physics and Effects. Department of Electrical and Computer Engineering, Uni- versity of Florida: Cambridge University Press, 2003. [13] M. M. Saba, M. G. Ballarotti, L. Z. Campos, and O. Pinto Jr. High-Speed Video Observations of Positive Lightning. IX International Symposium on Lightning Pro- tection — Foz do Iguacu, Brazil , 2007. [14] N. Petrov and R. Waters. Striking Distance of Lightning to Earthed Structures: Effect of Stroke Polarity. High Voltage Engineering Symposium, vol. 2, no. 467, 1999. [15] N. Petrov and F. D’Alessandro. Assessment of Protec- tion System Positioning and Models Using Observations of Lightning Strikes to Structures. Proc. R. Soc. A, , no. 462, pp. 723–742, 2002. [16] F. A. Rizk. A Model for Switching Impulse Leader Incep- tion and Breakdown of Long Air-Gaps. IEEE Transaction on Power Delivery, vol. 4, no. 1, pp. 596–606, 1989. [17] F. A. Rizk. Switching Impulse Strength of Air Insulation: Leader Inception Criterion. IEEE Transaction on Power Delivery, vol. 4, no. 4, pp. 2187–2195, 1989. [18] F. A. Rizk. Modeling of Lightning Incidence to Tall Struc- tures — Part 1: Theory. IEEE Transaction on Power De- livery, vol. 9, no. 1, pp. 162–171, 1990. [19] F. A. Rizk. Modeling of Lightning Incidence to Tall Struc- tures — Part 2: Application. IEEE Transaction on Power Delivery, vol. 9, no. 1, pp. 172–193, 1990. [20] Lightning and Insulator Subcommittee of the T&D Com- mittee. Parameters of Lightning Strokes: A Review. IEEE Transactions on Power Delivery, vol. 20, no. 1, pp. 346– 358, 2005. [21] F. Heidler, J. Cvetic´, and B. Stanic´. Calculation of Light- ning Current Parameters. IEEE Transactions on Power Delivery, vol. 14, no. 2, 1999. 1073-6 117 Appendix C Ground-Work for System C.1 Preamble This appendix is a paper that was accepted and presented for publication by the South African Universities’ Power Engineering Conference (SAUPEC) in 2009, hosted in Stellenbosch, South Africa. The paper is entitled: Laboratory Inves- tigation into Reconstructing a Three Dimensional Model of a Discharge Channel Using Digital Images. C.2 Paper Description The paper describes the ground work for the system, which details the development of a system that converts 2D images of a discharge channel into a 3D model. The discharge was created in a controlled environment using impulse generator. Digital capture devices were placed in five different configurations to investigate optimal placement. A 550 kV impulse discharge with arc length 0.83 m was captured using three wireless web-interface cameras. Optical and digital filtering was used to pre- processing of the images before the 3D modelling stage. A software application was developed for the model reconstruction, which was implemented in the form of an adaptable modelling framework. A simple modelling algorithm has been implemented to complete the proof of concept. The model ultimately can be used to aid in understanding the shape, formation and propagation of a lightning discharge channel for scientific research. LABORATORY INVESTIGATION INTO RECONSTRUCTING A THREE DIMENSIONAL MODEL OF A DISCHARGE CHANNEL USING DIGITAL IMAGES Y. C. Liu, A. J. Rapson and K. J. Nixon University of the Witwatersrand, School of Electrical and Information Engineering, Johannesburg, South Africa Abstract. This paper details the development of a system that converts two dimensional (2D) images of a discharge channel into a three dimensional (3D) model. The discharge was created in a controlled environment using impulse generator. Digital capture devices were placed in five different configurations to investigate optimal placement. A 550 kV impulse discharge with arc length 0.83 m was captured using three wireless web-interface cameras. Optical and digital filtering was used to pre-processing of the images before the 3D modelling stage. A software application was developed for the model reconstruction, which was implemented in the form of an adaptable modelling framework. A simple modelling algorithm has been implemented to complete the proof of concept. The model ultimately can be used to aid in understanding the shape, formation and propagation of a lightning discharge channel for scientific research. Key words. 3D Modelling, Computation, Framework, Image Filtering, Lightning Photography, SPARKY. 1. INTRODUCTION The advancement of technology in the field of computer processing power and rendering capabilities has provided the platform to create three dimensional (3D) models of discharge channels. Such models can be used to determine many aspects of a discharge channel, namely the arc length, the angles at the origin, termination, branches, and speed. Ultimately, the objective would be to reconstruct a discharge channel on a large scale, such as High Voltage (HV) arcs in the form of lightning, and equipment flashovers. A software application was developed to reconstruct a 3D model of a discharge channel from digital images. This is a preliminary investigation into the reconstruction of a 3D model, which will ultimately provide a proof of concept. The application was tested by creating a discharge channel within a controlled environment. An impulse discharge, replicating a lightning discharge was elected for testing, as it is the more challenging discharge to capture digitally. If the test for an impulse discharge is proven successful, all other discharge types would be easier to implement. This experiment is a small scale contribution toward a practical application. The final aim for the system is to provide a solution that is cost effective, abstracts the user from complexity and has an adaptable modelling system. An investigation on previous work in this field is presented. Using new techniques and the results from previous work it was possible to develop a suitable methodology. In this paper the modelling framework is briefly discussed, the experimental setup is explained and execution is examined. The testing procedure and obtained results will be presented, followed by a discussion of suitable applications and future work requirements. 2. BACKGROUND A brief discussion on existing solutions pertaining to aspects of the problem is produced. This includes an examination of past solutions and the problems relating to the photography of an impulsive discharge. 2.1 Previous Solutions Creating a 3D model of a discharge channel is not a new concept. In 2005 John Morkel and Brian Wylie used still analogue cameras and advanced neural networks to capture and generate a model [1, 2]. While their work demonstrates that modelling of a discharge channel is possible, much work needs to be done before a completed modelling solution is developed. 2.2 Photography of an Impulse Discharge The duration of a typical pulse of a lightning (otherwise referred to as an impulse) discharge only lasts approximately 30-90 µs [3]. To capture a channel of such a short interval onto an image, suitable capture devices need to be acquired. Data acquisition techniques differ between the implementation of digital and analogue photography methods. The exposure time must be reduced such that the intense light produced by the discharge does not overexpose the image sensor (digital) or the film (analogue). The relevant information desired for capture is specifically the visual wavelengths of light. 3. APPROACH/METHODOLOGY The approach developed to generate, capture and model a discharge channel is divided into two sections, namely the modelling framework and the experimental setup. The modelling framework covers the software and imaging techniques to create the model. The experimental setup involves the generation and capture of the impulse discharge channel. A broad overview of the approach is illustrated in Figure 1. Figure 1: Overview of the approach developed. 4. MODELLING FRAMEWORK The adaptive modelling framework developed is named SPARKY, as it models HV discharges in 3D space. The framework is open source (under the GNU General Public License, version 3), to allow future developers to easily expand and adapt the framework to their needs and enhance the initial functionality. SPARKY is cross-platform, independent of the underlying operating system, allowing it to be run on almost any platform. This ensures that the framework can be adapted to any configuration. 4.1 SPARKY Architecture In order to provide an interactive model, a suitable rendering library is required. To reduce the time required for development, a pre-existing library is used. The library chosen for this framework is Visualization Toolkit (VTK), as it is free for use and has been extensive testing [4]. The architecture of SPARKY is established over several layers. Each layer interacts with the layer above and below, as illustrated in Figure 2. This level of abstraction helps to decouple the layers from the implementation of classes that surround it. The interaction between the various layers use well defined interfaces, to ensure proper operation. Operating System User Interface SPARKY Core Visualization Toolkit (VTK) Graphics Interfaces Figure 2: Architecture illustrating layer interaction. The User Interface provides both a command line interface for user input and an interactive rendering window. The information is exchanged between the User Interface and the underlying framework via SPARKY Core. In order to save and load digital images and models, a set of readers and writers are grouped under InputOutput. As VTK is not part of the code implemented in SPARKY, Interfaces are required. To ensure that the digital images meet the requirements for the modelling, Filtering is required. The modelling algorithms are stored under Modelling. Rendering provides abstraction between SPARKY and VTK for the interactive model. To aid in debugging a simple Logging system is provided. 4.2 Digital Filtering The use of digital filters is necessary to process the images to usable data. SPARKY requires monotone images of identical sizes. (a) (b) (c) Figure 3: An image processed using various digital filters (a) smoothing filter, (b) black and white Boolean filter (c) track, compare and crop. The images in Figure 3 display a progression of the three filter layers used in the digital filtering process. A smoothing filter in Figure 3 (a) levels out the edges of the discharge. The black and white Boolean filter in Figure 3 (b) converts the greyscale image to a monotone image, representing the discharge as pure white pixels and redundant information as pure black. The filter in Figure 3 (c) tracks the discharge within the frame and extrapolates the discharge information and cropping the significant data from the image. A set of images are processed through the last filter to obtain the maximum size of the discharge. This filter takes into consideration the rotation required of the individual image. The images are resized to the maximum dimensions of the discharge, and cropped so that the image sizes are all identical. 4.3 Three Dimensional Placement Figure 4: Basic model reconstruction method. In order to reconstruct the model, the digital images need to be placed to match the experimental setup, as illustrated in Figure 4. Placing the images in 3D space before being modelled, allows for the algorithm to focus on determining a model without any image processing requirements. The captured images can be rotated to correct for camera orientation, such as clockwise, counter- clockwise and a full 180˚ as necessary. 4.4 Generating the 3D Model As the algorithm is non-trivial, it has been divided into several modules, each performing a single task. The current implementation is able to use two or three images to generate a model. The interaction between the three core modules is presented in Figure 5. The division of the algorithm supports abstraction during the implementation. Figure 5: Core modules for the reconstruction algorithm. The algorithm is simplified to layers along the y-axis. This method eliminates the third dimension, reducing the algorithm to a 2D problem. Normals of the white segments (discharge) are projected to the origin of the setup, where they are compared to the normals from other perspectives (as shown in Figure 4). The normals for all the images are generated in the Generate Normals module. This module ensures that only a full valid set of normals is generated. The normals are used in Reconstruct the 3D Model to find the points of intersection. These points are used to generate the cylinders that define the model. If the end-user enables the option to average the cylinders, the module Average the Model is called. This module determines a single cylinder for every y- axis (height). This option cannot be used when modelling branched discharge channels. A second option (only available for three image reconstructions), First Detect, can be invoked by the user. This option adjusts the algorithm to define the first circle as valid, and the remaining ones as possible. These remaining circles are then only valid if additional images can verify them. 4.5 Rendering The rendering process in SPARKY is a two step process: capture the 3D model back to 2D images for analysis, and provide an interactive model. The model is automatically captured by placing the camera as in the experimental setup and saving a screenshot, which is repeated for all angles. After this is completed, the end user can interact with the model by altering the camera by: panning, zooming, rolling, varying the azimuth, and elevation. 5. EXPERIMENTAL SETUP The experimental setup examines the setup concerning the HV laboratory; the equipment required for digital capture and camera placement considerations. 5.1 High Voltage Laboratory The HV laboratory provides a means to produce an impulsive discharge channel within a controlled environment. This provides a predetermined position of a discharge for experimentation and offers a predictable voltage level of the discharge. The experiment in the HV laboratory replicates a downward positive lightning discharge. The general setup of the HV laboratory is illustrated in Figure 6. Figure 6: Experimental setup for data capture of a discharge channel. An impulse (Marx) generator was used to create the highest direct current (dc) voltage as possible [5]. A gap length of 0.83 m was produced, which determines the height of the discharge channel. The breakdown in air was obtained at approximately 550 kV with the given gap length. The gap setup used a rod-to-rod configuration, which primarily provided a single branchless channel. 5.2 Digital Capture There are two stages to the photography of the discharge: the capture device considerations (acquisition and configuration), and optical filtering. The device selected for digital capture was the Axis 207W wireless web camera [6], primarily used for surveillance purposes. The image sensor available in this camera is a CMOS sensor. The camera has a maximum frame rate of 30 frames per second (fps) and a resolution of 640 × 480. Three of these cameras were used to investigate three different angular perspectives of a discharge for 3D reconstruction. This camera was chosen for a number of reasons: networking capabilities; wireless option; web interface; triggering options; cross platform operating system potential; additional functionality and output formats. Disadvantages of using these cameras were the limited image quality, fixed iris, no zooming functionality and a high start up current. The cameras are protected from interference caused by the discharge by floating the circuit on an isolation transformer. (a) (b) (c) Figure 7: Images captured with various optical filters (a) cross polarised filter, (b) cross polarised and infrared filter, and (c) cross polarised, infrared and violet filter. One of the challenges of capturing image data on a discharge channel is the high light intensity associated with it. Optical filters were used to isolate relevant information in the frame. The images in Figure 7 display a progression of three filter layers used to isolate the visible wavelengths of light. The first filter in Figure 7 (a) consists of a cross polarised filter, which dampens the amount of visible light reaching the capture device. The second filter in Figure 7 (b) was added to reduce the amount of infrared, and the third in Figure 7 (c) reduced violet wavelengths. (a) (b) (c) Figure 8: Captured images at 90° angle separation (a) on camera 1, (b) on camera 2, (c) on camera 3. Error! Reference source not found. displays a typical set of optically filtered images resulting from this stage. The cameras were synchronised using a network time protocol server. A pre-trigger time buffer was set to ensure that the relevant information is captured. The camera was activated by a website trigger. The information was managed using a file transfer protocol server. The information was received as individual JPEG files. The discharge only appeared on one of the incoming frames, which was expected due to the low frame rate. 5.3 Camera Placement Optimal placement of the devices was required for reconstructing the 3D model of the discharge. There were several factors that needed to be taken into account: location, height, distance, and angles. The location was important to consider for safety reasons. The capture devices needed to be protected against the HV discharge, whereby a safety perimeter was set up at a radius of 1.7 m away from the intended discharge. Identical heights were accomplished at 1.035 m above the ground. The distances of each capture device to the intended striking area were determined by the specific focal length of the device, such that the captured image contained the same height of the discharge arc. The capture devices were placed in several angular formations to establish optimum camera angles. The formations also provided feedback on the accuracy of the 3D algorithm. There were five angles tested: 30°, 45°, 60°, 90°, and 120°. This provided a wide range of angles to evaluate results. 6. TESTING PROCEDURE The testing of the entire system provides a means of determining the accuracy of the model, while ensuring that the software operates without error. 6.1 Software To ensure that the source code developed for the framework performs as expected, several testing techniques were used. These techniques include: validation of the user requirements, proving the source code is functional, obtaining results from end- user tests and verification of platform independence. There are four definitions that can be used to measure the overall effectiveness of the design as a framework. Maintainability: As the framework was developed using a prototyping approach, the source code implemented is not highly maintainable, requiring preventive maintenance to be performed. No perfective maintenance is required as the end-user requirements have been achieved. Functionality: Functionality is defined as the ability of the software solution to meet requirements when it is used under specified conditions [7]. When considering the overall requirements, it can be seen that the overall system is functional. Reliability: Reliability refers to the ability of the software solution to maintain a level of performance under specified conditions [7]. With the limited sample data sets, the overall system performs consistently with no visible problems. The framework appears to be reliable. Coupling: Coupling is used to measure how dependant classes are on one another [7]. From the architecture, it is clear that the underlying VTK library interfaces directly with seven of the units, making the framework extremely coupled to VTK. 6.2 Algorithm The testing procedure for the algorithm was used to determine if the models could be used for scientific research. The testing was performed using two independent tests: a) A visual comparison of the input images to the model, dependent on human judgement is made. b) A tester application, SPARKY Tester, was developed to detect inconsistent pixels in the images and return a percentage error. The visual comparison indicated the overall tracking of the model to the discharge, while the tester application provided a percentage error. Table 1: Testing procedure used for model analysis. Case Images Required Average First Detect 001 3 Yes Yes 002 3 Yes No 003 3 No Yes 004 3 No No 005 2 - Yes 006 2 - Yes 007 2 - Yes The model can be rendered by altering the algorithm configuration, as discussed in Section 4.4. Table 1 displays the seven different test cases implemented for each set of images. A total of seventy tests were presented for all the cases and angles. 7. RESULTS Screen shots were taken of the 3D models in the angular placements of the original images. Two types of testing were implemented: visual assessment and pixel comparison techniques. Since a discharge channel cannot be reproduced, it was difficult to verify which angle produced the optimum solution. Only two sets of images were taken from each angular configuration, due to limited experimental time. The results from the pixel comparison tests are displayed in Table 2. Table 2: Results from all the test cases in each camera angle configuration. Case Percentage of pixel mismatch (%) 30° 45° 60° 90° 120° 001 10.59 8.43 8.01 11.84 12.51 002 9.07 13.20 13.02 13.27 11.95 003 18.47 6.94 15.12 10.70 9.83 004 10.29 13.55 12.43 12.56 11.30 005 8.06 6.35 9.70 11.96 12.30 006 12.96 14.09 10.87 10.29 12.32 007 9.23 10.33 7.77 - 6.92 Average 11.24 10.41 10.99 11.77 11.02 It was observed that camera placements at 45° provided the least percentage error of 6.35 %. This is an acute angled configuration that can only provide images for a limited perspective of the discharge. It was not possible to validate the perspectives on the opposite region of the channel. The quantised results from SPARKY Tester in Table 2 present an overall error of approximately 11%. 8. DISCUSSION There are several areas which can be improved upon to provide a complete solution. The expansions expected for the modelling framework and camera placement are presented. 8.1 Modelling Framework As the framework is still under development, there are several factors that currently limit the framework: c) User Interface: Define an adaptable graphical user interface to transfer information. d) Improve the Filtering and Modelling hierarchy: Allow for better integration of future modules. e) Due to interfacing issues to the VTK library, smart pointers have not been implemented throughout all the classes. f) The underlying code is not decoupled sufficiently from VTK and wrapper classes need to be implemented. These four limitations need to be resolved before further functionality is added, to reduce underlying framework errors. 8.2 Camera Placement Accurate comparison of the angular configurations can only be achieved with an array of multiple cameras arranged in the required formation. This will provide an adequate number of images for comparisons over a single discharge. This needs to be supplemented with a precise camera placing strategy. If the cameras can be placed more accurately, comparisons with reconstructed model results could be more adequately achieved. 8.3 Future Work There are two main reasons for developing this product. Firstly, it allows more scientific research based on natural lightning by mounting cameras around high-rise buildings. Secondly, this principle can be expanded to use x-ray plates to capture the propagation of the strike through the earth’s surface. Before this solution can be implemented for applications in scientific research, several areas of expansion are required. 8.4 Modelling Framework The framework functionality can be expanded as follows: Video Playback: To enable end-users to view the propagation of the lightning strike, the framework must be expanded to allow multiple images to be loaded. These images must then be modelled individually and provide an interface similar to a video recorder, to step through the sequence of models. Modelling Libraries: The advanced modelling algorithms require external libraries for implementation. Based on the algorithm, suitable libraries must be sourced and tested. The models can then be tested to determine their suitability for scientific study. 8.5 Digital Capture The solution can be improved by implementing capture devices with additional functions, such as optical zoom, iris exposure control. Zoom functions would improve the image size and quality, also provide extra safety for the devices. The function for iris control would improve the exposure of the image, allowing for a more accurate capture of the discharge. An extension to the project would include a fourth dimension: time. The frame rate required for this option is expected to be in the range of 100,000 fps. This would ultimately provide a 3D reconstruction of a lightning discharge channel propagating through space. 8.6 Testing Procedure The analysis of the system results requires a high level of user interaction. A more automated system needs to be developed. The system should return the error to the user with the rendered model. This will enable the user to interpret the model without additional steps. 9. CONCLUSION The overall solution was implemented to prove the plausibility of the concept. As a result, the system was successfully executed to produce 3D reconstructed models of lightning discharges from several a single framed images. The modelling framework was analysed to indicate future work that needs to be performed, before the addition of more advanced algorithms should be considered. The algorithm that was designed can create a model from two or three images. When using three images for reconstruction, the model error increases, due to misalignment of the individual cameras placement and limitations on the implemented algorithm. The quantised modelling error provides a total inaccuracy of only 11%; on top of that several improvements can be added as extensions to the already acceptable solution. The inaccuracy of the model shows that it is not suitable for scientific research. The impulse discharge was successfully captured using the Axis 207W capture devices and extrapolated using a combination of optical and digital filters. An optimal angular placement was obtained at 45° camera separation. The captured data was usable for reconstructing the visible light emitted from a discharge. The implementation of the future work indicated in this paper will further expand this solution from a plausible concept to a practical application. ACKNOWLEDGEMENT The authors would like to thank Eskom TESP, THRIP and the NRF for funding this research. They also express their gratitude to CBi-electric: low voltage for funding of the Lightning/EMC Research Group and for support of the CBi-electric Chair of Lightning. REFERENCES [1] J. Morkel, “3D Reconstruction of Electrical Discharge Channels From 2D Images: Image Processing and Reconstruction Algorithm”, School of Electrical and Information Engineering, University of the Witwatersrand, South Africa, 2005. [2] B. Wylie, “3D Reconstruction of Electrical Discharge Channels from 2D Images: Simulated Lightning Model and Photography of Laboratory Discharges”, School of Electrical and Information Engineering, University of the Witwatersrand, South Africa, 2005. [3] V. A. Rakov, M. A. Uman, Lightning – Physics and Effects, Department of Electrical and Computer Engineering, University of Florida, Cambridge University Press, 2003. [4] Kitware, The Visualisation Toolkit User’s Guide, Kitware Inc., www.kitware.com, Version 5, 2006. [5] E. Kuffel, W.S. Zaengl, J. Kuffel, “High Voltage Engineering”, Pergamon Press, 1984. [6] Axis Communications AB, “AXIS207 User’s Manual Rev 3.0”, August 2006. [7] H. van Vliet, Software Engineering, Principles and Practice, John Wiley and Sons Ltd, New York, Second edition, 2002 124 Appendix D High Voltage Testing on Large Channel Paths with Discontinuities D.1 Preamble This appendix is a paper that was accepted and presented for publication by the International Symposium on High Voltage Conference (ISH) in 2011, hosted in Hannover, Germany. The paper is entitled: A Method of Creating Graphical 3D Reconstructions of High Voltage Discharge Channels Using Digital Images. D.2 Paper Description The paper briefly describes the three-dimensional reconstruction system and tests the capability of the system with an irregular gap geometry in the SABS high voltage testing laboratory at NETFA. Two image perspectives of each flashover were taken from a 5.85 m floating object setup of switching impulse U50 tests. This investigation marks the first usage of Axis P1344 cameras. An example of the reconstruction process is provided of the discontinuous irregular discharge channel shape and presents the reconstruction in the three-dimensional interactive environment. The paper concludes the successful reconstruction of single-channelled flashover discharge channels with with a discontinity. A METHOD OF CREATING GRAPHICAL THREE-DIMENSIONAL RECONSTRUCTIONS OF HIGH VOLTAGE DISCHARGE CHANNELS USING DIGITAL IMAGES Y.C.J. Liu1*, K.J. Nixon1, I.R. Jandrell1 1 School of Electrical and Information Engineering, University of the Witwatersrand, Johannesburg, South Africa, *Email: Yu-Chieh.Liu@wits.ac.za Abstract: This paper describes a method used for graphically reconstructing three- dimensional flashover discharge channels within an interactive virtual environment. The system for reconstructing high voltage discharge channels is presented, with an example of the reconstruction process using tests from a 5.85 m floating object setup of switching impulse U50 tests. This work provides the possibility of studying photographed flashover events in the form of a reconstructed model with the ability to zoom, tilt and rotate the channel within a three-dimensional environment. 1 INTRODUCTION Flashover is often a desired effect in high voltage testing, but in the case of flashover occurring in live, operating equipment, the resulting damage can be catastrophic. Burn marks, damaged insulation and carbon by-products are usually the only visual indication of failure due to flashover. Even if an operator is available to witness the failure, the naked eye may not be able to fully perceive the extent of damage, as the discharge channel of a flashover is fast and almost instantaneous with µs durations. By obtaining a three-dimensional (3D) representation of a flashover discharge channel, the channel can be properly analysed in a three- dimensional visualised space. This paper will discuss the three-dimensional reconstruction of single-channelled flashover discharges from a large floating object setup, a total gap length (from high voltage electrode to earth electrode) of 5.85 m. An example will be presented throughout this paper, from the image acquisition to the completed reconstructed model. 2 BACKGROUND Although it is not customary to photograph high voltage discharge channels in the laboratory, similar discharge channels are usually photographed in the form of lightning. With the development of more sophisticated camera technology, a move toward high speed cameras has opened up even more possibilities in researching the mechanisms behind these fast- occurring transients. In addition, there are obvious visual parallels that can be drawn between lightning and high voltage flashover channels. This paper makes use of only standard speed camera images of flashover channels to demonstrate a reconstruction procedure that can be extendable to high speed camera footage. There is significant value in understanding the physical distribution of a high voltage discharge channel, as this is often an indication of weaknesses in equipment designs and understanding how the electric fields are affected in live-testing. The physical distribution of high voltage discharge channels is typically considered using photography of the discharge channel from a single perspective. One photographic perspective also lacks the ability to fully grasp the spatial propagation of the channel, which highlights a need to develop a system that is capable of reconstructing a discharge channel within three-dimensional space. 3 SYSTEM OVERVIEW A system was designed and developed to reconstruct high voltage discharges in three dimensions using photographic images coupled with the locations of cameras in relation to the test setup. An important feature of its design is the reusability of the system to different types of discharge channels, which specifically takes Boolean black and white images discharges as inputs. This system was previously tested using 0.83 m long single-channelled high voltage discharges in a small scale test [1], [2], and in a lightning environment using one image of a branched lightning discharge as a preliminary investigation [3]. Each of these tests proved to be successful in reconstructing a three-dimensional model from test images. Figure 1 provides a block diagram representing each stage of the reconstruction process. This paper describes an overview of the modelling procedure; from obtaining photographs of the high voltage discharge channels, to creating the models in a three-dimensional interactive virtual environment. Figure 1: Overview of the system for the three-dimensional lightning reconstruction application. 3.1 Reconstruction Application The reconstruction framework and algorithm was developed in C++ using a visualization toolkit library (VTK). The application framework accepts two or three image perspectives as inputs to the system. Two image inputs enable the reconstruction of single-channeled discharges, and three image inputs enable reconstruction of multiple channeled discharges. 3.1.1 Image Processing An image of a flashover often includes extra information that is not required in the reconstruction of the channel. The framework includes a number of built-in automated digital filters to eliminate this redundant information. These filters replace pixels that represent the discharge channel with white pixels (pixel value of 255), and negative space information as black pixels (pixel value of -255). Depending on the quality of the input images, manual image processing may be implemented to correctly categorise ambiguous grey pixels. 3.1.2 Reconstruction Algorithm The digitally processed images are placed in the three- dimensional virtual environment in corresponding position to original relative camera positions as demonstrated by Figure 2a for 90º camera separations. In this example, the simplest demonstrative sets of data are used; i.e. mirror images of the branched data, and a flat 90º angle. The reconstructed flashover discharge channel is centred about the y-axis (i.e. x = 0 and z = 0) in this virtual environment. The modelling problem is three-dimensional and can be complicated if all the dimensions are tackled at once. Therefore, the modelling algorithm has been simplified to a series of two-dimensional geometric problems. For example, consider a single-channelled discharge channel that has two camera perspectives demonstrated in Figure 2b. Looking at the scenario from a bird’s eye view, the first white pixel band at the top of each image extends three perpendicular normals from each image towards the y-axis. Each normal is extended from a specific point in the one-pixel high band of white pixels. The points are demonstrated in Figure 2b and listed below: a. Leftmost white pixel b. Rightmost white pixel in a continuous band c. Middle position between point a. and b. The middle normals of each image are compared for an intersection. If an intersection between the normals exists, a one-pixel high cylinder is created, The intersection points of the leftmost and rightmost white pixel positions are used to calculate the radius of the cylinder as demonstrated in Figure 2b. This process is repeated to produce a reconstructed model that is constructed by a series of stacked cylinders. This method fails if the channel width is too thin (i.e. one or two pixels wide), and when the angle of separation between the perspectives is too small, i.e. less than 30º or too oblique (150º-210º). y xz (a) (b) Figure 2: A graphical representation of the three-dimensional reconstruction algorithm which reduces the problem to a series of two-dimensional geometric solutions. (a) Processed lightning images placed in at positions of 90º-separations in a three-dimensional virtual environment with a simple representation of extended normals to reconstruct a channel. (b) Overhead two-dimensional perspective with relevant points in a data image extending geometric normals towards the y-axis. (a) (b) Figure 3: Physical laboratory setup (a) Floating object U50 setup with varying gap distances dG1 and dG2. (b) Two camera setup, laterally separated by 94º in relation to the DUT (experimental setup). Table 1: Gap configurations recorded during U50 tests of the floating object setup in Figure 3a. Gap Configuration dG1 (mm) dG2 (mm) 1 1170 3510 2 1560 3120 3 1950 2730 4 EXPERIMENTAL SETUP The experimental setup will discuss specifics of the gap configuration and the camera setup. 4.1 Discharge Environment Image test datasets of flashovers were obtained from a floating object, double rod-to-rod gap configuration in air, with rounded tip electrodes. The gap configuration is illustrated by Figure 3a, where dG1 is the distance of the gap between the high voltage electrode and the floating object and dG2 is the distance of the gap between the lower portion of the floating object and the ground electrode. A U50 test procedure was implemented to the setup using a 90/3010 µs switching impulse with an approximate peak voltage of 1.45 MV applied to the high voltage electrode at the top of the setup. Iterations of the gap configuration were obtained by varying the position of the floating electrode between the fixed high voltage and earth electrodes. Of the full range of U50 tests, three gap configurations were recorded, which are presented in Table 1. 4.2 Image Acquisition Two camera perspectives were used during the U50 tests of the floating object setup. Figure 4a and 4b show the two perspectives of the same flashover of one gap configuration 1 breakdown (taken from Table 1). The cameras were placed approximately 13 m away from the test setup (DUT) with a lateral separation of 94º. Figure 3b) indicates the general floor plan with the camera positions in relation to the experimental setup. Identical surveillance cameras were used, which have several specific functions that allowed for automating the recording process, listed below: 1. 8-20 V input power 2. Trigger by motion detection 3. Pre-buffer 4. Local memory storage Given the large input voltage range of the cameras, each camera was electrically isolated during the test runs, using small 12 V (5 Ah) lead acid batteries. The customisable motion detection functionality enabled the camera to trigger without any manual intervention. A one second pre-buffer was implemented to ensure information was not lost, and 3-second duration videos were stored on a local removable SD card. The cameras were operating at 15 frames per second with image dimensions of 1280 × 800. These settings produced videos with one or two (or none) frames with flashover image information. (a) Camera 1 (0º) (b) Camera 2 (94º) Figure 4: Sample set of images of flashover occurring over a floating object with Gap Configuration 1 as presented in Table 1 for three-dimensional reconstruction. (a) (b) (c) (a) (b) (c) (i) Perspective 1 (0º) (ii) Perspective 2 (94º) Figure 5: Reconstruction model input images and correlating images of outputs. (i) Perspective 1 relating to Camera 1 at an angular reference of 0º. (ii) Perspective 2 relating to Camera 2 at 94º of Camera 1. (a) Digitally filtered image. (b) Three-dimensional reconstruction in three-dimensional environment. (c) Test image presenting the difference between image (a) and (b). Figure 6: Three-dimensional model in the virtual interactive environment, flanked by image data on either side. Perspective 1 image place at 0º (right) Three-dimensional reconstruction (middle) Perspective 2 image place at 94º (left). 5 MODEL AND VIRTUAL ENVIRONMENT The channel information is isolated from the original images through digital filtering, in Figure 5a – for perspective 1 and 2 (i and ii). The digital filtering process also required a manual scaling of images, to ensure that the correct comparative data is used. The three-dimensional model is constructed using the digitally filtered images and the resulting an image of three-dimensional model taken at the same corresponding angle to the original perspective for comparison, as demonstrated in Figure 5b. Figure 6 illustrates a sample window of the interactive virtual environment, featuring the reconstructed flashover model demonstrated in Figure 5. The reconstructed model is placed in the centre of the setup, with a set of x-y-z axes at the base of the model. On either side of the model is the digitally filtered images (placed in respective positions to the original perspectives), of which normals were extended from in order to create the model. 6 TESTING Visually, it is evident that the reconstructed model correctly follows the path of the flashover channel in the image. As the original flashover channel information can only be projected from the photographed information, the testing procedure primarily tests the accuracy of the reconstruction algorithm, by comparing input data to output data. Figure 5c – for perspective 1 and 2 (i and ii) – demonstrates an image highlighting (with white pixels) the difference between the digitally filtered image and the image of the model in the corresponding perspective. It can be seen that perspective 2 demonstrates a larger mismatch in pixels, than perspective 1. This is expected, since part of the original image is over-exposed due to the recording mechanics of CMOS camera chips. Since the reconstruction algorithm takes the average width of the channel from each of the images, it could be assumed that the reconstructed model is represented as thicker than it should be. This is also buffered by the fact that the photographed channel width is dependent on the exposure time of the CMOS sensors, which would vary for individual cameras operating on isolated circuits. 7 FUTURE WORK The reconstruction of single-channelled flashover discharges does not demonstrate the full capability of the reconstruction system. Tests using simple discharge channels will be implemented in the future, which would include complex lightning channel structures. Currently, there is a significant amount of manual modifications that are made in the digital filtering process, which is mostly represented by the manual scaling of images. Future work requires the implementation of an automated reconstruction system. Furthermore, since current methods of testing only consider image mismatches, a more accurate and comprehensive testing framework needs to be implemented to quantify the error associated with the reconstruction algorithm – this will have a large effect on branched channel structures. 8 CONCLUSION The algorithm has been shown to provide successful path reconstructions of single- channelled flashover discharge channels, for a floating object experimental setup. Further investigations include the three-dimensional reconstruction of branched channels and complex lightning channels. Several modifications need to be implemented to the current system for better automation and an accurate testing framework. 9 ACKNOWLEDGMENTS The authors would like to thank Eskom for the support of the High Voltage Engineering Research Group through the TESP programme. They would also like to thank CBI-electric for support, the department of Trade and Industry (DTI) for THRIP funding as well as to the National Research Foundation (NRF) for direct funding. 10 REFERENCES [1] Liu, Y.C. Rapson, A.J. Nixon K.J, “Laboratory Investigation into Reconstructing a Three- dimensional Model of a Discharge Channel using Digital Images”, SAUPEC – Stellenbosch, South Africa, Vol. 18 pp. 83, 2009. [2] Liu, Y.C. Nixon, K.J. Jandrell, I.R., “Preliminary Investigation into Three-Dimensional Reconstruction of Laboratory High Voltage Discharges using Photographs taken from Different Elevation Perspectives”, Ground LPE – Salvador, Brazil, Vol. 4, No. P8, 2010. [3] Liu, Y.C. Nixon, K.J., “A Preliminary Investigation into 2D Reconstruction of Branched Lightning Discharge Channels in a 3D Environment”, SAUPEC – Johannesburg, South Africa, Vol. 19 No. G-2 pp. 295-299, 2010 130 Appendix E Small-Scale Investigation on Reconstruction with Cameras at Different Elevations E.1 Preamble This appendix is a paper that was accepted and presented for publication by the In- ternational Conference on Grounding and Earthing & 4th International Conference on Lightning Physics and Effects Conference (LPE) in November 2010, hosted in Salvador, Brazil. The paper is entitled: Preliminary Investigation into Three- Dimensional Reconstruction of Laboratory High Voltage Discharges us- ing Photographs Taken from Different Elevation Perspectives. E.2 Paper Description This paper describes the investigation on processing discharge channel reconstruc- tions with cameras at different elevations at relatively small angular variations. Limited conclusions can be made on this investigation, but it can be shown that reconstructed model qualities are dependent on the image qualities from the cameras. GROUND’2010 & 4th LPE International Conference on Grounding and Earthing & 4th International Conference on Lightning Physics and Effects Salvador - Brazil November, 2010 PRELIMINARY INVESTIVATION INTO THREE-DIMENSIONAL RECONSTRUCTION OF LABORATORY HIGH VOLTAGE DISCHARGES USING PHOTOGRAPHS TAKEN FROM DIFFERENT ELEVATION PERSPECTIVES Yu-Chieh J. Liu Ken J. Nixon Ian R. Jandrell School of Electrical & Information Engineering, University of the Witwatersrand, Johannesburg, South Africa Abstract – High voltage discharge channels have been re- constructed in three-dimensions using photographic im- ages at different height perspectives. This work precedes the reconstruction of lightning discharges attaching to tall towers, in particular, Brixton Tower in South Africa. One of the challenges presented in this environment includes the selection of camera locations facing the tower which will likely be associated with height perspectives. The results of preliminary small scale tests performed in the high voltage laboratory are presented for a 0.66 m gap with elevation angles between 0º-18º. It is found that the two cameras pro- vide inconsistent image data, which may require a pre- processing stage for three-dimensional reconstruction. 1 - INTRODUCTION The study of lightning activity at tall structures has been an integral part of research into the meteorological phe- nomenon. At present, most lightning research using opti- cal recordings has mostly been limited to two- dimensional perspectives. Several papers detail the use of two camera perspectives used to provide depth per- ception of the channel [1-3], but none have attempted a three-dimensional reconstruction of the discharge chan- nel. This paper will detail a laboratory investigation into the reconstruction of high voltage discharge channels, with the intention of expanding to field experiments with natural or triggered lightning attachment to a tall tower. Modifications of an existing three-dimensional recon- struction method will be presented for the channel re- construction [4-5]. This work investigates the challenge of reconstructing a three-dimensional channel using optical cameras record- ing at different elevations. This is a preliminary investiga- tion that looks into the accuracy of the algorithm used to normalize images at elevation to an eye-level approxima- tion. 2 - BACKGROUND A 250 m tall tower, namely Brixton Tower, is situated in Johannesburg, South Africa and is being monitored for lightning activity through photographic surveillance [6]. Additional perspectives will be set up to provide the depth perception required for three-dimensional recon- struction. Figure 1 shows the expected scenario for obtaining opti- cal lightning data striking Brixton Tower. There are two prospective recording sites for photographing lightning flashes to Brixton Tower from different perspectives. There is an approximate 70º lateral angular separation between the two sites, which should provide significant depth perception for three-dimensional reconstruction. Although the sites provide appropriate depth perception, the locations of these two sites would present some diffi- culties for reconstruction, as Site 1 is approximately eye- level, whereas Site 2 has a large acute angled perspec- tive. Figure 1: The camera placement expected for lightning channel reconstruction of lightning strokes occurring on Brixton Tower. Associated heights, distances and expected angular elevations are included. Eye level Zenith 20° 50° 40° 70° Camera Elevation Range Figure 2: Camera elevation range to the discharge channel with respect to the zenith – angles ranging from 40°-70° . In this ex- ample, a rod-to-rod gap configuration is used. 3 - BASIC CONSIDERATIONS A laboratory investigation is essential to evaluate the effectiveness of reconstructions with cameras at different elevations before reconstructing lightning channels on a large-scale setup. The investigation simulates the ex- pected channel reconstruction challenge of differing camera elevations, and therefore evaluating the three dimensional algorithm for this scenario. High voltage discharge channels were created a rod-to-rod gap confi- guration. The expected channel length for this investiga- tion was approximately 0.66 m. 3.1 - CAMERA CONSIDERATIONS The use of three surveillance cameras was intended for the laboratory testing. The test configurations were de- fined to provide a preliminary evaluation of the effective- ness of the three-dimensional reconstruction algorithm. The two cameras used were of the same model, which have a motion detection triggering mechanism and an image pre-buffer. The cameras were placed 2 m away from the discharge channel, which is relatively close range and therefore optical filters were used for each camera to dampen the intensity of the channel. 3.1 - CAMERA PLACEMENT There were two tests that were implemented: Mirrored test (cameras placed at 180º separation) and 90º sepa- ration test. Each of these tests had one camera at eye level, while the height of the second camera varied in each scenario, as provided in Table 1. These heights do not provide a zenith angle up to 40º which is the angle required for Site 2 from Figure 1. The zenith angles pro- vided in Table 1 will provide a proof of concept for the elevation reconstruction method. For the consistency through this paper, Camera 1 was defined as the refer- ence camera, at 0° and 0 cm elevation. Camera 2 was varied accordingly. Table 1: Camera height variations and the corresponding eleva- tion angles. Height below eye level (cm) Elevation Angle (α) Zenith Angle (β) 18.00 5.14º 84.82º 35.26 10º 80º 65.00 18º 72º The mirrored test provides a quantifiable comparison for a channel path that is always random. Twelve samples of the mirrored test with the cameras both at approximately eye-level were obtained. A further five samples were taken of each varied height from Table 1 of one camera. General error trends will be used to determine the effec- tiveness of the modified algorithm which will account for cameras at different elevations. 4 – THREE-DIMENSIONAL RECONSTRUCTION The three-dimensional reconstruction method illustrated in Figure 3 was developed by Liu and Rapson in 2008 [4]. The algorithm that reconstructed three-dimensional models of high voltage channels assumed that the cam- eras photographed images of equal elevation from two or three perspectives. Liu later reconstructed lightning channels attaching to Brixton Tower with only one cam- era perspective, by using a mirrored image and a white straight-lined image in the three-dimensional environ- ment [5]. This method, illustrated in Figure 3, successful- ly reconstructed a two-dimensional branched lightning channel in an interactive three-dimensional environment. A revision of this algorithm must be considered to ac- count for multiple captured photograph perspectives from cameras located at different elevations. 4.1 – RECONSTRUCTION METHOD The images taken from the test setup were filtered to Boolean black and white images using Liu and Rapson’s three-dimensional reconstruction application. This was necessary for the reconstruction application to clearly identify the discharge channel information from the im- age, and remove any grey-scale ambiguity. Figure 4 (a) and (b) provide an example of a photograph taken of a discharge channel which is filtered to black and white Boolean pixels, removing any grayscale ambiguity for the channel information. Figure 4 (c) shows an image of the rendered model. This image is taken at the same angular separation as the test environment of the camera. Figure 4 (d) follows the example into the testing stage, which provides the pixel mismatch indicated by the white pixels. These pixels are counted by a tester application, which provides the value for the ε parameter in Equation (1). The example provided in Figure 4 was an image taken from Camera 2 at eye-level (0 cm elevation). y xz Figure 3: Example of reconstruction of mirror-image a test using the existing algorithm for three-dimensional reconstruction of eye-level camera perspectives. This shows the projection of normals from white pixels to the center; intersections define the discharge channel. (a) (b) (c) (d) Figure 4: An example of the testing process from Camera 2 (a) Original image (b) Digitally filtered black and white Boolean image (c) Rendered model (d) Pixel mismatch of (b) and (c). Figure 5: Results obtained from the mirrored test to obtain a percentage mismatch for each camera and each elevation test. Figure 6: Results obtained from the 90° separation test to obtain a percentage mismatch for each camera and each elevation test. 5 – TESTING Although the mirrored tests cannot provide any three- dimensional definition, it has value in determining the accuracy of image data that is obtained. Reconstructing high voltage channels from these tests would require the implementation of Liu’s method mentioned in Section 4 and illustrated in Figure 3. The model accuracy was determined using a tester ap- plication that compares the pixel mismatch of two given images [4-5]. A percentage mismatch is determined us- ing Equation (1), where ε is the pixel mismatch deter- mined by the tester application, h and w account for the height and width of the tested image in pixels. The tester application requires identical image sizes, so there could only be one value for h and w. 100% × × = wh error ε (1) The error calculation may provide a misleading result, as it takes into account the total error of the entire image, and not only of the significant channel information. There were a few reasons that may have accounted for the error: the thickness of the channel did not match; and the image of the model was slightly off-centered, providing a mismatched image for comparison. Ten samples were taken of the mirrored test with both cameras at the same elevation. All subsequent test con- figurations had five samples recorded. 6 – RESULTS Figure 5 and Figure 6 provide the resulting average trends obtained for the mirrored and 90° separation test from the values shown in Table 2. The test results would show a larger percentage error for the test with Camera 2 at the lowest elevation if camera elevation plays a significant role in the reconstruction process. From Table 2, the results from Camera 2 ap- peared to provide an accurate description of what would be expected for the mirrored tests. There is a steady upward trend to higher percentage mismatches to the digitally filtered image, and the image taken from the reconstructed model. This expectation breaks down for each of all other scenarios, and the consistency of Cam- era 2 is questioned with a resulting trend for the 90° se- paration test that reverses the original expectation. The large percentage errors obtained from Camera 1 may be attributed to its higher light sensitivity than that of Camera 2, which was evident in each of the photographs taken for each test. Although the cameras are identical, with the use of identical optical filters and equal radial placements from the discharge channel, the cameras had both been used for different surveillance periods preceding these experiments. The consistent results from Camera 1 can be considered as a correct representation of what may be expected in the larger scale scenario, as the largest angle of eleva- tion (referred to α as in Figure 1) of 18°. Tests using more extreme angles of elevation need to be performed to provide any conclusive comments. The example of a reconstructed discharge channel in Figure 4 (a) demonstrates how inconsistencies from simple tests can be identified. The modeling algorithm used for this channel uses first edge detection [4]. This produces a segment of the channel whenever normals meet (demonstrated in Figure 3). It is evident that there are two channels created over one another; the one in front appearing to be shorter in length. This presents the need for preprocessing the image data possibly by scal- ing the smaller image. This inconsistency may occur from the curvature of the camera, imperfect camera placements and non-specific filtering schemes for differ- ent light intensities. Table 2: Averaged percentage errors for each discharge chan- nel reconstruction test for cameras located at different eleva- tions, using the percentage error calculation presented in Equa- tion (1). Camera 1 is placed at 0 cm elevation for each scenario. Percentage error for each test (%) Camera 2 Elevation (cm) Mirrored Test 90° Separation Test Camera 1 Camera 2 Camera 1 Camera 2 0 9.59* 2.61* 8.92 4.70 -18 7.25 7.12 8.02 1.96 -35 8.06 9.91 8.49 0.84 -65 7.43 12.57 13.87 0.14 * Ten samples were taken for the mirrored test at cameras of equal elevation. Five samples were taken for all other scena- rios. Figure 7: An example of a three-camera configuration for photo- graphing the high voltage discharges in terms of angular separa- tion and elevation. Figure 8: Image eye-level normalization method for an image taken at a different elevation. 7 - DISCUSSION It can be seen from the results that the use of identical cameras (and setup) can still provide inconsistencies in the reconstruction of discharge channels. These incon- sistencies can be addressed through modification of the reconstruction system (which may include a reassess- ment of the algorithm used). 7.1 – THREE CAMERA CONFIGURATION A more comprehensive laboratory test will be performed with the availability of a third camera. Several camera placement configurations will be considered for a branched discharge channel, which will provide a proof of concept for a more accurate representation of upward lightning that occurs from Brixton Tower. Examples are shown in Figure 2 and Figure 7. In particular: 1. A reference Camera 1 will be placed at eye- level to the high voltage discharge channel, at 0º separation). 2. A lower elevation Camera 2 will be placed be- low eye-level with zenith angles (β) ranging from 40º - 70º. This camera will also be varied later- ally (θ) from 30°-90° separation from Camera 1. 3. An eye-level mirrored Camera 3 will be placed 180° from Camera 2 for eye-level normalization comparison. 7.2 – MODIFICATIONS FOR CAMERA ELEVATIONS The easiest way to account for images taken from differ- ent camera elevations would be to normalize the images to eye-level as shown in Figure 8. This would avoid any unnecessary modification to the existing modeling algorithm. Since this method is based on pixels, it may present resolution problems for the normalized image. Once the image is normalized to eye-level, it can be compared with the mirrored eye-level image in order to test the accuracy of the normalization method. 7.3 – LARGE SCALE EXPERIMENTS Liu successfully reconstructed two-dimensional branched lightning channel models using one camera perspective into a three-dimensional interactive environment using Liu and Rapson’s reconstruction application [5]. This work has shown that discharge channel reconstructions can be accomplished for small elevation angles without any modification to the reconstruction algorithm. With the ground work set in place, large scale reconstructions will be attempted for lightning attachment to Brixton Tower. 7 - CONCLUSION This investigation has shown that elevation angles be- tween 0° and 18° have inconclusive results. Camera 2 has provided an expected trend in one of the test confi- gurations by increasing the pixel mismatch according to a greater angle of elevation. Camera 1 provided a mostly random trend, which may suggest that the elevation an- gles are too slight to show any significant difference. Tests using the modification method mentioned in Sec- tion 7.2 may provide more conclusive results. The use of a third camera will provide an extra reference point to the random shape of the high voltage discharge channel; although this may even present more inconsis- tencies to the reconstruction. Identical camera setups may still introduce inconsisten- cies into the discharge channel reconstructions. More preprocessing steps need to be taken to reduce the re- sulting errors from the image data inconsistencies. 8 – ACKNOWLEDGEMENTS The authors would like to thank CBI-electric for funding the Chair of Lightning at the University of the Witwater- srand and for direct support of the Research Group. They would also like to thank Eskom for the support of the Lightning/EMC Research Group through the TESP programme. Thanks are extended to the department of Trade and Industry (DTI) for THRIP funding as well as to the National Research Foundation (NRF) for direct fund- ing of the Research Group. 9 - REFERENCES [1] Eriksson, A.J., “Lightning and Tall Structures”, The Trans- actions of the SA Institute of Electrical Engineers (SAIEE), 1987. [2] Cummins, K., Saba, M.M.F., Warner, T.A., Weidman, C., Campos, L.Z.S, Fleenor, S.A., Saraiva, A.C.V., Scheftic, W.D., “A Multi-Camera High-Speed Video Study of Cloud- to-Ground Lightning in South Arizona --- Preliminary Re- sults”, International Conference on Lightning Protection (ICLP) – Uppsala, Sweden, vol. 29, no. 1c1, 2008. [3] Asakawa, A., Miyake, K., Yokoyama, S., Shindo, T., Yoko- ta, T., Sakai, T., “Two Types of Lightning Discharges To a High Stack on the Coast of the Sea of Japan in Winter”, IEEE Transactions on Power Delivery, vol. 12, no. 3, pp 1222-1231, 1997. [4] Liu, Y.C., Rapson, A.J., Nixon, K.J., “Laboratory Investiga- tion into Reconstructing a Three Dimensional Model of a Discharge Channel using Digital Images”, South African Universities’ Power Engineering Conference (SAUPEC) – Stellenbosch, South Africa, vol. 18, pp 18-23, 2009. [5] Liu, Y.C., Nixon, K.J., “A Preliminary Investigation into 2D Reconstruction of Branched Lightning Discharge Channels in a 3D Environment”, South African Universities’ Power Engineering Conference (SAUPEC) – Johannesburg, South Africa, vol. 19, Paper G-2, pp 295-299, 2010. [6] Liu, Y.C.J, Hunt, H.G.P, Grant, M.D., Nixon, K.J., “Obser- vations of Lightning Discharges on Brixton Tower”, Interna- tional Conference on Lightning Protection (ICLP) – Cagliari, Italy, vol. 30, no. 1073, 2010. Main author Name: Yu-Chieh (Jessie) Liu Address: School of Electrical and Information Engineering, Uni- versity of the Witwatersrand, Johannesburg, 2050, South Africa Fax: +27 11 403-1929; Phone: +27 11 717-7201 E-mail: Yu-Chieh.Liu@students.wits.ac.za 136 Appendix F Preliminary Testing on One Image Perspective of Lightning F.1 Preamble This appendix is a paper that was accepted and presented for publication by the South African Universities’ Power Engineering Conference (SAUPEC) in 2010, hosted in Johannesburg, South Africa. The paper is entitled: A Preliminary Investigation into 2D Reconstruction of Branched Lightning Discharge Channels in a 3D Environment . F.2 Paper Description The paper describes the results for reconstruction testing of actual lightning events. This mainly tests the modelling framework’s ability to reconstruct models from actual lightning pictures that incorporate branching of the channel, thus producing 2D reconstructed models within a 3D environment. A PRELIMINARY INVESTIGATION INTO 2D RECONSTRUCTION OF BRANCHED LIGHTNING DISCHARGE CHANNELS IN A 3D ENVIRONMENT Y.C. Liu and K.J. Nixon Dept. of Electrical and Information Engineering, University of the Witwatersrand, Johannesburg, South Africa Abstract. The study of lightning models provides insight into understanding the behaviour of the natural phenomenon. By producing 3D lightning models, a greater understanding of the spatial propagation of a lightning channel can be obtained. A preliminary study was performed to determine whether branched lightning channels could be modelled from one photograph in a 3D environment. Photographs of lightning strikes were obtained using Axis 207 surveillance cameras. Cross-polarised optical filters were used to limit the captured light intensity of the strike. The digital images captured from the cameras were processed manually using an image editor. Three images were used to create a model; the orginal image, a white straight-line image and a mirrored image of the original. These images were placed with 90◦ separation in the 3D environment. Fourteen branched models were reconstructed. An average error of 1.68% was calculated for an image comparison between the filtered image and a model image. This paper extends on work performed by Liu and Rapson in 2008. Key Words. 3D reconstruction model, branched lightning channels, lightning photography, image processing. 1. INTRODUCTION L IGHTNING models form the basis of researchinto further investigating the physical behaviour of the natural phenomenon [1]. By obtaining a three dimensional (3D) representation of a lightning dis- charge, the channel can be properly analysed in a 3D visualised space. A system was implemented to capture two dimensional (2D) images of a discharge channel and represent the lightning discharge as a 3D model. Liu and Rapson designed, developed and implemented a preliminary system [2], which was tested primarily using single-channelled high voltage discharges in a controlled laboratory environment. This paper extends their work, by testing the mod- elling capabilities of branched lightning channels. This paper provides an overview of the modelling procedure; from photographing the lightning chan- nels, to creating the models in a 3D environment. Examples are provided for each stage using one model dataset. Five models are presented to provide a variation of results. 2. PROBLEM STATEMENT The nature of lightning occurrences is studied to broaden the understanding of the lightning mecha- nism. This knowledge provides a beneficial contri- bution to lightning protection systems and further understanding the nature of this phenomenon. Light- ning protection becomes evident with a cloud-to- ground (CG) strike with the potential to cause damage to electrically sensitive devices, power distribution lines and even structural buildings [3]. The physical distribution of lightning events is typically considered using photography of the discharge channel from a single perspective. This solution lacks the ability to fully grasp the spatial propagation of the channel, which highlights a need to develop a system that is capable of reconstructing a discharge channel within 3D space. The reconstruction must ultimately be able to determine the channel’s directional data and distin- guish between split branches. By constructing a 3D model of a discharge channel, a better understanding of how the path of a large channel or lightning strike develops its pattern. 3. BACKGROUND The difficulties involved with the photography of lightning, and a brief summary of the 3D modelling solution developed by Liu and Rapson will be briefly discussed. 3.1 Photography of Lightning: The basis of modelling a lightning discharge requires photographs of the channel. The difficulties involved with capturing images of a lightning strike include: the flash duration and the unpredictability of the oc- currence. For research purposes, it is difficult to verify whether the correct data of the channel is captured on the photograph. There are several research solutions to the photographing lightning channel attachments to tall structures, such as studies performed on the Fukui Chimney in Japan [4], CN Tower in Toronto, Canada [5] [6] [7]. These papers investigate lightning attachments to tall structures using digital images from conventional video cameras, or high-speed cam- eras. These studies provide valuable insight into the photography of lightning discharges. No mention of a 3D model is included in these papers, although some produce images from multiple capture devices to provide a sense of spatial distribution. Cummins et al provide preliminary experimental results that could ultimately lead to producing a time-resolved 3D model of CG lightning discharges [8]. 3.2 Liu and Rapson’s Solution The 3D reconstruction of general high voltage chan- nels provides insight into their formation, and ulti- mately its spatial propagation. yx z (a) (b) Fig. 1: A basic representation of the reconstruction method (a) 3D reconstruction algorithm (b) A 2D representation of the algorithm using cylinders for modelling [2]. Liu and Rapson devised a method of recreating the laboratory scenario in a software application, extend- ing normals from the image to the central y-axis, and creating a pixel-high cylinder where the normals meet [2]. Figure 1 (a) and (b) illustrate a simplified representation of the algorithm functionality. The system produces a 3D model of a discharge chan- nel samples from in a controlled environment. They focused on reconstructing unbranched high voltage channels in a laboratory environment. This modelling algorithm provided a total error of 11% from 70 tests, through the comparison of the filtered image to an image of the model from the same perspective. 4. SYSTEM OVERVIEW The system developed by Liu and Rapson [2] was modified to account for a physical investigation, which is the focus of this paper. The physical inves- tigation considers a discharge environment in a real- world scenario, which includes the capturing of image test data from lightning strikes. The system described in Figure 2 will attempt to render an accurate 2D model of the channel in 3D space. The following lists a summary of the system and contents of this paper. 1) The discharge environment is selected to pro- vide image samples of the lightning strikes. 2) The method of acquiring photographs, and op- timising the data is discussed. 3) The image processing required for reconstruct- ing the model is demonstrated, including the data filtering and description of the algorithm used. 4) An example of the reconstructed model will be presented with a discussion on the modelling capabilities. 5) The testing framework and the sampled results will be presented and discussed. 5. DISCHARGE ENVIRONMENT AND DATA ACQUISITION The test data was taken in the late thunderstorm season in Johannesburg, South Africa. The reason for obtaining test data in this location was due to its high ground flash density. The capture of image data includes the consideration of the devices used and optical filters required. Figure 3 displays a set of test images resulting from this stage. The images provide a time-resolved lightning strike with multiple strokes. This would provide a scope for future reconstruction of time-resolved models. (a) (b) Fig. 3: Consecutive images with 10 ms time separation taken of a cloud-to-cloud (CC) lightning strike. The camera used for digital capture was the Axis 207W wireless surveillance IP camera [9]. The camera was set according to the settings as demon- strated in Table 1. These were chosen as per the implemented system in [2]. Table 1: Camera configuration for the physical investigation. Parameter Value Frame rate (fps) 15 Pre-Buffer (s) 2 Resolution (pixels) 640× 480 Colour Grayscale Triggering method Motion detection Captured images require the data of only the in- tense light of the discharge channel. For the pur- pose of the experiment, only wavelengths of the visible light spectrum were desired for modelling the discharge [10]. The insignificant data needed to be filtered out. Optical filters were required to obtain the usable data in the images. A combination of cross- polarised filters and camera configurations provided images that could be used for the reconstruction. The images in Figure 4 demonstrated the different varia- tions in the captured images using different layers of optical filters. A disadvantage to using optical filters is the possible loss of image detail brought about by damaged lenses but this is neglected for the purpose of this experiment. Discharge Environment Data Acquisitioning Data Conditioning Reconstructed Model - Live Lightning Events - Capture Devices - Data Filtering: Optical - Data Filtering: Digital - Algorithm - 3D Environment Testing Framework - Image Comparison Fig. 2: Block diagram demonstrating the expected system overview and flow. (a) (b) Fig. 4: Different images taken with and without filters. (a) No filters (b) Cross-polarised filters. Figure 4 (a) shows the image captured of a lightning discharge channel without optical filters. It is ob- served that the image is extremely overexposed. Two linearly polarised lenses are placed perpendicularly to construct a cross-polarised filter, which reduces the intensity of light entering the lens. The image captured from this filter is illustrated in Figure 4 (b). 6. DATA CONDITIONING The images needed be to filtered further so the channel information could be isolated. Due to the greyscale ambiguities from the photographed images, digital filtering was required. Once the images were filtered to explicit black and white images, the rel- evant data was extrapolated from the images and conditioned to provide a reconstructed model. 6.1 Data Filtering: Digital The application requires black and white images to extract the relevant data points from the image. The white pixels represent the channel information, and the black pixels are ignored. The digital filtering pro- vides a means to isolate the channel information. The images were manually processed, and then filtered again in the application. This may seem ambiguous, but the purpose of manually filtering the images ensured that the less pronounced branches in the channel were portrayed in the model. The filtering in the application just ensures that the inserted images have usable data. (a) (b) Fig. 5: Manually processed images taken of lightning strike. The images in Figure 5 depict the result of manually filtering the photographs from Figure 3, using an im- age editor. These images were overlayed and amalga- mated to combine the discharge channel information, as shown in Figure 6. Each of these images can be used as individual test samples. Fig. 6: Amalgamated lightning strike from individual images. The images were inserted into the modelling frame- work in the preparation of data conditioning. The filtering process includes a tracking function, to de- termine the relevant channel information from the image, and crops it to a smaller size, to decrease the processing time of the reconstruction. 6.2 Algorithm The 3D algorithm was written in C++ programming language, integrated with VTK — an open source, cross-platform visualisation toolkit. The application could reconstruct a model using two or three im- ages; each configuration may have different options for reconstruction. Using the VTK 3D environment, the filtered images were arranged on a set of axes in 3D space, mapping the experimental setup. The algorithm was designed to process the setup in layers over the y-axis. This method eliminated the third dimension, reducing the algorithm to a 2D problem, as demonstrated in Figure 1. Normals of the white segments were projected to the centre of the setup, where they were compared to the normals from other perspectives. Each layer of the discharge was assumed to have a cylindrical body. The centres of two images determined the centre point of the cylinder, where the average thickness of the images determined the radius of the cylinder. The third image was used to verify the existence of the cylinder. y xz Fig. 7: Algorithm for one image reconstruction. Since only one image perspective was taken per lightning strike, it was expected that the model could not have any 3D definition. Thus, a white straight- line image was placed 90◦ from the original image, as depicted in Figure 7. Due to algorithm limitations for two images, the split branches in the channel were not accounted for, and only the main channel at which the points intersected was modelled. This was resolved by using three images place with a 90◦ separation. The third image was created using the image editor to provide a mirrored imaged of the original. This was placed 180◦ from the original image to identify the channel branching. 7. MODEL Fourteen models were constructed using test data ob- tained in the physical investigation. Figure 8 provides an example of the models that were created. A visual comparison of the model with the filtered image used for the reconstruction is presented. The image of the reconstructed model was taken from the same perspective as the filtered image for the appropriate comparison. (a) (b) Fig. 8: Filtered image (a) compared to reconstructed model (b). It can be observed that the algorithm is not perfect, and does not flawlessly reconstruct the channel path, even with the ambiguity of the mirrored image. The reconstruction seems to break down when the channel thickness thins in the path. This could be explained by the fact that the original image and the mirrored image do not get perfectly aligned to receive the logical identifier as an indication that a cylinder exists. This property is confirmed in some of the other samples which produce continuation of thicker channels and corresponding paths. 8. TESTING AND RESULTS In order to quantitatively verify the model accuracy, the images in Figure 8 were compared using a tester application. An image difference in pixels was pro- duced, identifying the pixel mismatch between the two images. Equation 1 provides the error calculation for the model verification, where ε is the pixel mis- match determined by the tester application, h and w account for the height and width of the tested image in pixels. % error = εh× w × 100 (1) Table 2: Testing information for model Parameter Value Image difference ε 321.51 Height h (pixels) 500 Width w (pixels) 160 Percentage Error (%) 0.40 There could only be one value for h and w, since the tester application requires identical image sizes. The error calculation takes into account the total error of the entire image, and not only of the significant channel information. This may provide a misleading result, since the calculation is a function of the image size (which includes the redundant black pixels). Equation 1 presents an error of 0.40% for the created model in Figure 8 using the information in Table 2. All fourteen samples were tested with the results provided in Figure 9 with an average error of 1.68%. It should be noted that Model 1 in Figure 9 is the model demonstrated as the running example within this paper. The error ranges from 0.16 to 8.47%, which is a considerably large range and could be accounted for by several different factors. There were a few things that specifically accounted for the error: the thickness of the channel did not match; there were missing links in the channel path; and the image of the model was slightly off-centred, providing a mismatched image for comparison. 1 2 3 4 5 6 7 8 9 10 11 12 13 14 0 1 2 3 4 5 6 7 8 9 Model Number Pe rce nta ge Er ror (% ) Fig. 9: Results for error calculation of branched test models. It was only possible to determine the error of the filtered image to the image acquired from the model from the same perspective. Other errors occuring in the system that should be taken into account, but could not be quantified include: lightning to optically filtered images, optically filtered images to manually filtered images, manually filtered images to applica- tion filtered images. 9. ANALYSIS The models of fourteen datasets were successfully reconstructed. The models provided an average error in comparison to the filtered images of 1.68%, even though the error calculation has been identified as being misleading. Also, the cylinder radius for the channel was determined by the thickness of the straight-line image placed 90◦ relative to the lightning image, which could account for the inaccuracies of the model thickness. This work presents the first recorded testing data of the algorithm using branched channels acquired from a physical investigation. The full system error could not be easily quantified. The average error of the high voltage discharges from [2] can be seen to differ by an order of magnitude to the average error obtained in the physical investi- gation of this paper. This could be accounted for by several factors from the laboratory investigation: more tested datasets and a combination of the different algorithm configurations (differing when using 2 or 3 images), more images with possible inaccurate angular placements in the environment setup. 10. FUTURE WORK More models need to be reconstructed and tested for the physical investigation in order to provide a better perspective on the algorithm performance. This will also provide better comparisons to the test data obtained from the experimental investigation. A detailed testing platform needs to be established, taking into account only the significant information, instead of testing the entire image. This includes determining the reason for the offsetted image of the model for error comparison, thus providing a better means for comparison. Currently, a more comprehen- sive testing framework is being developed. This test would compare two images with a branched channel which would determine the points of branching and channel path termination. This would map out the position of the points in question and compare the number of significant points and accuracy of the image of the reconstructed model. Of course, this paper provides a proof of concept to obtaining 3D models of lightning discharges. This provides a platform for reconstructing the lightning models using multiple-perspective images of a strike. This would require a scaled version of the work performed in [2]. 11. CONCLUSION This paper presented a preliminary investigation into considering the plausibility of modelling a 2D light- ning image in a 3D environment. It has been shown that it is possible to capture lightning images us- ing an Axis 207 surveillance camera with a cross- polarised optical filter. The channel information was extracted from the image using manual and applica- tion filtering. Fourteen branched discharge channels were successfully modelled using three images per photograph. The algorithm configuration using three images with a 90◦ -separation provided an error of 1.68% from fourteen test models. A comprehensive testing method needs to be developed to obtain a more accurate error calculation. Additional test data needs to be obtained in order to provide more models for comparison. And lastly, this proves that in theory, by scaling the system in [2], a 3D model of a branched lightning channel can be obtained. REFERENCES [1] V. Rakov and M. Uman. Lightning — Physics and Effects. Department of Electrical and Computer Engineering, Univer- sity of Florida: Cambridge University Press, 2003. [2] Y. Liu, A. Rapson, and K. Nixon. “Laboratory Investi- gation into Reconstructing a Three Dimensional Model of a Discharge Channel using Digital Images.” SAUPEC — Stellenbosch, South Africa, vol. 18, p. 83, 2009. [3] S. Prentice and R. Golde. Lightning Volume 1: Physics of Lightning — Frequency of Lightning Discharges, chap. 100, pp. 100–100. Department of Electrical Engineering, University of Queensland, Brisbane, Australia: Acedemic Press Inc., New York, 1977. [4] M. Miki, A. Wada, and A. Asakawa. “Observations of Upward Lightning in Winter at the Coast of Japan Sea with a High-speed Video Camera.” ICLP — Avignon, France, vol. 27, no. 1a2, 2004. [5] A. Hussein, W. Janischewskyj, F. Noor, and M. Milewski. “Characteristics of Lightning Flashes Striking the CN Tower below its Tip.” ICLP — Avignon, France, vol. 27, no. 4p8, 2004. [6] A. Hussein, M. Milewski, A. Abdelraziq, W. Janischewskyj, and F. Jabbar. “Visual Characteristics of CN Tower Lightning Flashes.” ICLP — Kanazawa, Japan, vol. 28, no. I-11, 2006. [7] A. Hussein, V. Todorovski, M. Milewski, K. Cummins, and W. Janischewskyj. “Characteristics of Lightning Strikes at and in the Vicinity of the CN Tower.” ICLP — Uppsala, Sweden, vol. 29, no. 1c4, 2008. [8] K. Cummins, M. Saba, T. Warner, C. Weidman, L. Campos, S. Fleenor, A. Saraiva, and W. Scheftic. “A Multi-Camera High-Speed Video Study of Cloud-to-Ground Lightning in South Arizona — Preliminary Results.” ICLP — Uppsala, Sweden, vol. 29, no. 1c1, 2008. [9] Axis Communications AB. AXIS207 Users Manual Rev 3.0, August 2006. [10] R. Serway and J. Jewett. Physics for Scientists Engineers with Modern Physics. Thomson Bokes/Cole, 6th ed., 2004. 142 Appendix G Single-channelled Lightning Testing G.1 Preamble This appendix is a paper that was accepted and presented for publication by the International Conference on Atmospheric Lightning (ICAE) in 2011, hosted in Rio de Janeiro, Brazil. The paper is entitled: A Method of Creating Graphical Three-Dimensional Reconstructions of Lightning Discharge Channels us- ing Digital Images. G.2 Paper Description This paper briefly describes the reconstruction method and uses lightning image information from Tuscon USA in 2007 courtesy of Dr Marcelo Saba. Two image perspectives, separated laterally by approximately 34◦, were taken of the single- channelled lightning flash, and this paper describes the reconstruction process of the flash in question. XIV International Conference on Atmospheric Electricity, August 08-12, 2011, Rio de Janeiro, Brazil A Method of Creating Graphical Three-Dimensional Reconstructions of Lightning Discharge Channels using Digital Images Y.C. Liu1, K.J. Nixon1, I.R. Jandrell1 1. School of Electrical & Information Engineering, University of the Witwatersrand, Johannesburg, South Africa ABSTRACT: This paper describes a method used for graphically reconstructing three-dimensional lightning channels within an interactive virtual environment. Typically, lightning is optically observed using one or two perspectives of a specific stroke or flash. Two camera perspectives provide depth to the channel that one perspective lacks, but these are limited to an ability to discern the contents. This work provides the possibility of studying a lightning discharge channel from an actual event in the form of a reconstructed model with the ability to zoom, tilt and rotate the channel within a three-dimensional environment. 1. INTRODUCTION Lightning models form the basis of research into further investigating the physical behaviour of the natural phenomenon [Rakov and Uman, 2003]. By obtaining a three-dimensional (3D) representation of a lightning discharge, the channel can be properly analysed in a three-dimensional visualised space. A system was implemented to capture two-dimensional (2D) images of a discharge channel and represent the lightning discharge as a three-dimensional model. 2. PROBLEM STATEMENT Lightning research started with ground-level observations [Malan, 1963]. These fast, almost instantaneous events with µs durations were recorded in a two-dimensional capacity with standard camera technology. The physical distribution of lightning events is typically considered using photography of the discharge channel from a single perspective. This limitation leads to some critical assumptions about the nature of lightning channel propagation which become translated to theoretical analyses. This solution also lacks the ability to fully grasp the spatial propagation of the channel, which highlights a need to develop a system that is capable of reconstructing a discharge channel within three-dimensional space. The reconstruction must be able to successfully determine the directional data of the channel and distinguish between split branches. 3. SYSTEM OVERVIEW A system was designed and developed to reconstruct three-dimensional reconstruction of lightning discharges using photographic images coupled with geographical locations of the cameras in relation to the lightning termination point. This system was previously tested using single-channeled high voltage discharges in a small scale test [Liu et al, 2009; Liu et al, 2010b], and in a lightning environment using one image of a branched lightning discharge as a preliminary investigation [Liu and Nixon, 2010a]. Each of these tests proved successful in recreating a three-dimensional reconstruction of test images. ____________________ ∗ Correspondence to: Yu-Chieh (Jessie) Liu, University of the Witwatersrand, Johannesburg, South Africa. E-mail: yu-chieh.liu@wits.ac.za XIV International Conference on Atmospheric Electricity, August 08-12, 2011, Rio de Janeiro, Brazil 2 Figure 1 provides a block diagram representing each stage of the reconstruction process. This paper describes an overview of the modelling procedure; from obtaining photographs of the lightning channels, to creating the models in a three-dimensional interactive virtual environment. Figure 1: Overview of the system for the three-dimensional lightning reconstruction application. 3.1 Reconstruction Application The application created for the reconstruction of the three-dimensional lightning models was developed in C++ using a visualization toolkit library (VTK). The application framework accepts two or three images of the same lightning flash from two or more perspectives. The option for two images was developed for single-channeled discharges, as branched channels would create ambiguities in the reconstruction. This ambiguity was solved by developing an option for three images. The current reconstruction algorithm requires image perspectives with a lateral separation of approximately 30º to 150º for optimal reconstruction. 3.1.1. Image Processing The reconstruction application identifies the lightning pixel data using a number of built-in automated digital filters. These filters replace pixels that represent the lightning flash with white pixels (pixel value of 255), and redundant information as black pixels (pixel value of -255). Depending on the quality of the input images, manual image processing may be implemented to correctly catergorise ambiguous grey pixels. 3.1.2. Reconstruction Algorithm The processed images are placed in the three-dimensional virtual environment, in the corresponding position to its original camera position as demonstrated by Figure 2a for 90º camera separations. In this virtual environment, the lightning discharge channel is centered about the y-axis (i.e. x = 0 and z = 0). The three-dimensional reconstruction algorithm has been simplified to a series of two-dimensional geometric problems. For example, consider a single-channeled discharge channel that has two camera perspectives demonstrated in Figure 2b. From the first white pixel band at the top of each image, three perpendicular normals are extended from each image towards the y-axis. Each normal is extended from a specific point in the 1-pixel high band of white pixels. The points are demonstrated in Figure 2b and listed below: a. Leftmost white pixel b. Rightmost white pixel in a continuous band c. Middle position between point a. and b. The middle normals of each image are compared for an intersection. If an intersection between the normals exists, a one-pixel high cylinder is created, using the intersection points of the leftmost and rightmost white pixel positions to calculate the radius of the cylinder as demonstrated in Figure 2b. This process is repeated to produce a reconstructed model that is constructed by a series of stacked cylinders. XIV International Conference on Atmospheric Electricity, August 08-12, 2011, Rio de Janeiro, Brazil 3 y xz (a) (b) Figure 2: A graphical representation of the three-dimensional reconstruction algorithm which reduces the problem to a series of two-dimensional geometric solutions. (a) Processed lightning images placed in at positions of 90º-separations in a three-dimensional virtual environment with a simple representation of extended normals to reconstruct a channel. (b) Overhead two-dimensional perspective with relevant points in a data image extending geometric normals towards the y-axis. 3.2 Lightning Image Test Data Two perspectives of a lightning flash were recorded in Tuscon USA in 2007 [Saba, 2010]. The cameras were positioned at a lateral separation of approximately 34º. The two images can be seen in Figure 3a and 3b. (a) (b) Figure 3: Lightning images taken in Tuscon USA in 2007 of the same flash from two different perspectives approximately 34º apart [Saba, 2010]. (a) Camera 1. (b) Camera 2. 4. MODEL AND TESTING A three dimensional model has been reconstructed using the images in Figure 3a and 3b. The input images and resulting model of the reconstruction application is shown in Figure 4. Camera 1 perspective is shown in Figure 4a and 4b, and Camera 2 perspective required a manual scaling process and is shown in Figure 4c and 4d. The yellow vertical rod is representative of the y-axis mentioned in Figure 2a. Visually, it is evident that the reconstructed model correctly follows the path of the lightning channel in the image. In Figure 4b, the mid-section is missing some information, and further inspection indicates that the area correlates to a very thin channel width in Figure 4a. This has been a common observation from previous tests, and is explained by the fact that normals may not be generated if a channel is one-pixel wide. XIV International Conference on Atmospheric Electricity, August 08-12, 2011, Rio de Janeiro, Brazil 4 (a) (b) (c) (d) Figure 4: Reconstruction model input images and correlating images of outputs. (a) Digitally filtered Camera 1 image. (b) Three-dimensional reconstruction of Camera 1 image compared to (a) in three-dimensional environment. (c) Digitally filtered Camera 2 image. (d) Three-dimensional reconstruction of Camera 2 image compared to (c) in three-dimensional environment. 5. FUTURE WORK AND CONCLUSIONS Current work involves the reconstruction of larger data-sets, including branched lightning flashes. Furthermore, a testing framework needs to be implemented to accurately quantify the error associated with the reconstruction algorithm. A testing framework currently exists, but is based solely on pixel mismatches from input and output images, which can be misleading for comparisons of larger images to smaller images. The algorithm has been shown to provide successful path reconstructions of single-channeled lightning discharge channels, but fails when pixel widths of channels become too thin. Further investigations into solving this discontinuity problem will need to be conducted without having to compromise the input image data. ACKNOWLEDGEMENTS The authors would like to thank Dr Marcelo Saba for providing the lightning image data used in this paper. The authors would also like to thank CBI-electric for funding the Chair of Lightning at the University of the Witwatersrand and for direct support of the Research Group. They would also like to thank Eskom for the support of the Lightning/EMC Research Group through the TESP programme. Thanks are extended to the department of Trade and Industry (DTI) for THRIP funding as well as to the National Research Foundation (NRF) for direct funding of the Research Group. REFERENCES Liu, Y.C. Rapson, A.J. Nixon K.J (2009), Laboratory Investigation into Reconstructing a Three Dimensional Model of a Discharge Channel using Digital Images, SAUPEC – Stellenbosch, South Africa, Vol. 18 pp. 83 Liu, Y.C. Nixon, K.J. (2010a), A Preliminary Investigation into 2D Reconstruction of Branched Lightning Discharge Channels in a 3D Environment, SAUPEC – Johannesburg, South Africa, Vol. 19 No. G-2 pp. 295-299. Liu, Y.C. Nixon, K.J. Jandrell, I.R. (2010b), Preliminary Investigation into Three-Dimensional Reconstruction of Laboratory High Voltage Discharges using Photographs taken from Different Elevation Perspectives, Ground LPE – Salvador, Brazil, Vol. 4, No. P8. Malan, D.J. (1969), Lightning and its Effects on High Structures, The Transactions of the S.A. Institute of Electrical Engineers, vol 60, no. 6, pp 241-242. Rakov, V. and Uman, M. (2003), Lightning – Physics and Effects. Department of Electrical and Computer Engineering, University of Florida: Cambridge University Press. Saba, M. (2010), Personal Communication, Instituto Nacional de Pesquisas Espaciais, Av. dos Astronatuas, 1758 – 12227-010 – S. José dos Campos/SP – Brazil.