Estimation and Correction of the Distortion in Forensic Image Due to Rotation of the Photo Camera
Total Page:16
File Type:pdf, Size:1020Kb
Master Thesis Electrical Engineering February 2018 Master Thesis Electrical Engineering with emphasis on Signal Processing February 2018 Estimation and Correction of the Distortion in Forensic Image due to Rotation of the Photo Camera Sathwika Bavikadi Venkata Bharath Botta Department of Applied Signal Processing Blekinge Institute of Technology SE–371 79 Karlskrona, Sweden This thesis is submitted to the Department of Applied Signal Processing at Blekinge Institute of Technology in partial fulfillment of the requirements for the degree of Master of Science in Electrical Engineering with Emphasis on Signal Processing. Contact Information: Author(s): Sathwika Bavikadi E-mail: [email protected] Venkata Bharath Botta E-mail: [email protected] Supervisor: Irina Gertsovich University Examiner: Dr. Sven Johansson Department of Applied Signal Processing Internet : www.bth.se Blekinge Institute of Technology Phone : +46 455 38 50 00 SE–371 79 Karlskrona, Sweden Fax : +46 455 38 50 57 Abstract Images, unlike text, represent an effective and natural communica- tion media for humans, due to their immediacy and the easy way to understand the image content. Shape recognition and pattern recog- nition are one of the most important tasks in the image processing. Crime scene photographs should always be in focus and there should be always be a ruler be present, this will allow the investigators the ability to resize the image to accurately reconstruct the scene. There- fore, the camera must be on a grounded platform such as tripod. Due to the rotation of the camera around the camera center there exist the distortion in the image which must be minimized. The distorted image shall be corrected using transformation method. This task is quite challenging and crucial because any change in the images may misidentify an object for investigators. We used the Hough transform (HT) technique to resolve the distortion in the image obtained due to rotation of the camera around the camera center. Forensic image processing can help the analyst extract information from low quality, noisy image or geometrically distorted. Obviously, the desired information must be present in the image although it may not be apparent or visible. Considering challenges in complex forensic investigation, we understand the importance and sensitivity of data in a forensic images.The HT is an effective technique for detecting and finding the images within noise. It is a typical method to detect or segment geometry objects from images. Specifically, the straight-line detection case has been ingeniously exploited in several applications. The main advantage of the HT technique is that it is tolerant of gaps in feature boundary descriptions and is relatively unaffected by image noise. The HT and its extensions constitute a popular and robust method for extracting analytic curves. HT attracted a lot of research efforts over the decades. The main motivations behind such interest are the noise immunity, the ability to deal with occlusion, and the expandability of the transform. Many variations of it have evolved. They cover a whole spectrum of shape detection from lines to irregular shapes. i This master thesis presents contribution within the field of forensic im- age processing. Two different approaches, Hough Line Transformation (HLT), Hough Circular Transformation(HCT) are followed to address this problem. Error estimation and validation is done with the help of root mean square method. The performance of both the methods is evaluated by comparing them. We present our solution as an application the MATLAB environment, specifically designed to be used as a forensic tool for forensic images. Keywords: Hough Transformation, Hough Circular Transformation, Image Rotation, Forensic Scales. ii Acknowledgement First and foremost, we would like to express our deep and sincere gratitude to our supervisor Irina Gertsovich for her continuous support and motivation throughout our thesis study and research. We would like to express our deepest gratitude to the entire department of applied signal processing for helping us throughout our research and our masters education in Blekinge Institute of Technology(BTH). Also, we would like to thank our teachers Dr.Benny Lövström, Dr.Josef Ström Bartunek, Irina Gertsovich who taught us alot during our study here in BTH. A special thanks to our fellow students, friends who have been a great moral support to us during our study in BTH. Finally, a huge thanks to our family, mainly our parents for being very supportive and believing in us throughout our studies and encouraging us to travel to Sweden, to do research in the area of our interest. Sathwika Bavikadi Venkata Bharath Botta iv Contents Abstract i 1 Introduction 1 1.1 Motivation . 1 1.2 Aim and Objectives . 1 1.3 Problem Statement . 2 1.4 Research Questions . 2 1.5 Survey of Related Works . 2 1.6 Proposed Solution Based on Related Work . 3 1.7 Outline of the Thesis . 3 2 Background 4 2.1 Perspective . 4 2.2 Rotation in a Photo Camera . 4 2.3 Possible Issues During Acquisition of Scale Images . 5 2.3.1 Angle of View of the Capture of the Image . 5 2.3.2 Photograph Viewing Distance . 5 2.4 Forensic Scales . 5 3 Method 7 3.1 Hough Transformation . 7 3.2 Hough Linear Transformation . 8 3.3 Hough Circular Transformation . 9 3.4 Image Rotation . 10 3.5 Edge Detection . 10 4 Implementation 12 4.1 Analysis . 12 4.2 Proposed Method . 12 4.2.1 Equipment used to Acquire the Images . 12 4.2.2 Flow Charts . 13 4.2.3 Limitations . 13 4.3 Correcting Image Distortion using HCT . 14 4.3.1 Input Image . 14 v 4.3.2 Gray Scale . 14 4.3.3 Rotation of Image about Origin . 15 4.3.4 Edge Detection . 16 4.3.5 Measuring Rotated Angle in the Distorted Image . 17 4.3.6 Correction of Rotated Image . 17 4.3.7 Comparison between Reference Image and Restored Image 18 4.4 Correcting Image Distortion using HLT . 19 4.4.1 Input Image . 19 4.4.2 Gray Scale . 20 4.4.3 Rotation of Image about Origin . 21 4.4.4 Edge Detection . 21 4.4.5 Line Detection using HLT . 22 4.4.6 Estimating the Angle of Rotation in Distorted Image . 23 4.4.7 Correction of Rotated Image . 23 4.4.8 Comparison between Reference Image and Restored Image 24 4.5 Correcting Image Distortion Using HCT Without Reference Image 25 4.5.1 Error Analysis . 28 4.6 Correcting Image Distortion using HLT Without Reference Image 30 4.6.1 Error Analysis . 33 5 Results And Discussion 35 5.1 Comparison of HCT with HLT . 35 5.2 Discussion . 42 6 Conclusions and Future Work 44 6.1 Conclusion . 44 6.2 Future Works . 45 References 46 vi List of Figures 2.1 Forensic Scales . 6 3.1 Polar Representation of a Straight Line . 8 3.2 Image Rotation . 10 4.1 Flow Chart of Method using With Reference Image. 13 4.2 Flow Chart of Method using Without Reference Image. 13 4.3 Input Image Without any Rotation. 14 4.4 Gray Scaling of Input Image . 15 4.5 Input Image Rotated to 30° about Origin. 16 4.6 Canny Edge Detection . 16 4.7 Measuring Angle in Distorted Image . 17 4.8 Inverse Rotation of Image about Origin (Restored Image). 18 4.9 Comparing Reference Image and Restored Image . 18 4.10 Overlap of Reference Image and Restored Image. 19 4.11 Input Image Without any Rotation. 20 4.12 Gray Scaling of Input Image . 20 4.13 Input Image Rotated to 45° about Origin. 21 4.14 Canny Edge Detection . 22 4.15 Line Detection using HLT . 22 4.16 Estimating the Angle of Rotation . 23 4.17 Inverse Rotation of Image about Origin (Restored Image). 24 4.18 Comparing Reference Image and Restored Image . 24 4.19 Overlap of Reference Image and Restored Image . 25 4.20 Input Image with Unknown Angle of Rotation . 26 4.21 Gray-Scaling of Input Image . 26 4.22 Edge Detection . 27 4.23 Locating the Circles in the Image . 27 4.24 Estimation of Angle of Rotation . 28 4.25 Inverse Rotation of Image about Origin (Restored Image). 28 4.26 Error Analysis . 29 4.27 Error analysis . 29 4.28 Input Image with Unknown Angle of Rotation . 30 4.29 Gray Scaling of Input Image . 31 vii 4.30 Edge Detection of the Given Image . 31 4.31 Line Detection of the Longest Leg of the Scale . 32 4.32 Estimation of Angle of Rotation . 32 4.33 Inverse Rotation of Image about Origin (Restored Image). 33 4.34 Error Analysis . 34 4.35 Error analysis . 34 5.1 HCT for Image having L-shaped Forensic Scale with 5-circles . 36 5.2 HLT for Image having L-shaped Forensic Scale with 5-circles . 37 5.3 HCT for Image having Forensic Scale with 2-Circles . 38 5.4 HLT for Image having Forensic Scale with 2-Circles . 39 5.5 HCT for Image having Forensic Scale with 3-Circles . 40 5.6 HLT for Image having Forensic Scale with 3-Circles . 41 viii List of Tables 5.1 Comparing HCT and HLT for Scale with 5-circles . 35 5.2 Comparing HCT and HLT for Scale with 3-Circles . 42 5.3 Comparing HCT and HLT for Scale with 2-Circles . 42 5.4 Comparing Different Scales . 43 ix List of Abbreviations ABFO Scale American Board of Forensic Odontology Scale HCT Hough Circular Transformation HLT Hough Line Transformation HT Hough Transformation RCD Randomized Algorithm RMSE Root Mean Square Error x Chapter 1 Introduction 1.1 Motivation Image analysis is one of the fundamental components for variety of activities.