Opencv 2 Computer Vision Application Programming Cookbook

Total Page:16

File Type:pdf, Size:1020Kb

Opencv 2 Computer Vision Application Programming Cookbook OpenCV 2 Computer Vision Application Programming Cookbook Over 50 recipes to master this library of programming functions for real-time computer vision Robert Laganière BIRMINGHAM - MUMBAI OpenCV 2 Computer Vision Application Programming Cookbook Copyright © 2011 Packt Publishing All rights reserved. No part of this book may be reproduced, stored in a retrieval system, or transmitted in any form or by any means, without the prior written permission of the publisher, except in the case of brief quotations embedded in critical articles or reviews. Every effort has been made in the preparation of this book to ensure the accuracy of the information presented. However, the information contained in this book is sold without warranty, either express or implied. Neither the author, nor Packt Publishing, and its dealers and distributors will be held liable for any damages caused or alleged to be caused directly or indirectly by this book. Packt Publishing has endeavored to provide trademark information about all of the companies and products mentioned in this book by the appropriate use of capitals. However, Packt Publishing cannot guarantee the accuracy of this information. First published: May 2011 Production Reference: 1180511 Published by Packt Publishing Ltd. 32 Lincoln Road Olton Birmingham, B27 6PA, UK. ISBN 978-1-849513-24-1 www.packtpub.com Cover Image by Asher Wishkerman ([email protected]) Credits Author Project Coordinator Robert Laganière Srimoyee Ghoshal Reviewers Proofreader Wajihullah Biaq Joel Johnson Luis Gomez Indexer Vladislav Gubarev Tejal Daruwale Haikel Guemar Xiangjun Shi Graphics Nilesh Mohite Acquisition Editor Usha Iyer Production Coordinator Kruthika Bangera Development Editor Roger D'souza Cover Work Kruthika Bangera Technical Editor Kavita Iyer Copy Editor Neha Shetty About the Author Robert Laganière is a professor at the University of Ottawa, Canada. He received his Ph.D. degree from INRS-Telecommunications in Montreal in 1996. Dr. Laganière is a researcher in computer vision with an interest in video analysis, intelligent visual surveillance, and image- based modeling. He is a co-founding member of the VIVA research lab. He is also a Chief Scientist at iWatchLife.com, a company offering a cloud-based solution for remote monitoring. Dr. Laganière is the co-author of Object-oriented Software Engineering published by McGraw Hill in 2001. Visit the author's website at http://www.laganiere.name. I wish to thank all my students at the VIVA lab. I learn so much from them. I am also grateful to my beloved Marie-Claude, Camille, and Emma for their continuous support. About the Reviewers Wajih Ullah Baig holds a Honors. Degree in Computer Science from Hamdard University, Karachi. He works mostly with with desktop applications and has good experience working with large-scale distributed systems. He has interest in DSP, image processing, pattern recognition, and network programming. He has worked on a large-scale content-based video retrieval project which is one of its kind. Currently, he is working with the Center for Advanced Research in Engineering, Islamabad, Pakistan where he holds a position as a design engineer. As a freelancer, he contributes work for open source projects and posts codes of his own. I would like to thank all my friends and family for their support whilst reviewing the book. Especially my roommate, Dara Baig! Lluís Gómez i Bigordà holds a Masters degree in Computer Science from the Universitat Oberta de Catalunya. I would like to thank all my family and friends for their support while I was reviewing this book, especially to Antonia, my daughter. I owe you one! Vladislav Gubarev was born in 1987 in Baku, USSR. He graduated from Southern Federal University (Russia) with honors. He has a Bachelor (2007) and a Specialist (2008) diplomas of applied mathematics and computer science. He started his career as a researcher and engineer in "Laboratory of Mathematical Methods of Artificial Intelligence". He later became a co-founder of CVisionLab company which provides computer vision solutions. His areas of research interests are mostly related to image and video processing. In addition to researcher skills, he has wide experience in software development. Many thanks to my wife Agatha. She is an applied mathematician, software developer, and the person who helped me a lot in reviewing this book. Also, thanks to my colleagues—a team of great researchers and professional developers. Haïkel Guémar has been a free software enthusiast and a Fedora developer for a few years now. He currently works as a senior software engineer in a startup in Lyon (France): SysFera. Turning coffee into code, QA process, and technical coaching are part of his daily occupation. SysFera's main product is SysFera-DS, the commercial version of the award-winning open source grid computing middleware DIET. DIET is an innovative grid middleware that offers seamless, robust, and high-performance access to heterogeneous computing resources. Besides being a code monkey, Haïkel enjoys practicing kendo and watching chambara movies. Xiangjun Shi received the M.E. degree in Computer Graphics from Zhengjian University, China in 1989, M.S. degree in Statistics, and Ph.D. degree in Computer Science from Utah State University in 2006. From 1989 to 1998, he was an Assistant Professor in Hangzhou University (1989–1995) and Shantou University (1995–1998). From 1998 to 2000, he was an Associate Professor in Shantou University. Since 2007, he has worked on the design and development of Intelligent Video Surveillance System. His research interests include: Data Mining, Data Cleansing, Statistical Inference/Analysis, Digital Video Mining, Computer Vision, Pattern Recognition and Image Processing, Mathematical modeling, and Algorithm Design and Optimization. www.PacktPub.com Support files, eBooks, discount offers and more You might want to visit www.PacktPub.com for support files and downloads related to your book. Did you know that Packt offers eBook versions of every book published, with PDF and ePub files available? You can upgrade to the eBook version at www.PacktPub.com and as a print book customer, you are entitled to a discount on the eBook copy. Get in touch with us at [email protected] for more details. At www.PacktPub.com, you can also read a collection of free technical articles, sign up for a range of free newsletters and receive exclusive discounts and offers on Packt books and eBooks. http://PacktLib.PacktPub.com Do you need instant solutions to your IT questions? PacktLib is Packt's online digital book library. Here, you can access, read and search across Packt's entire library of books. Why Subscribe? f Fully searchable across every book published by Packt f Copy and paste, print and bookmark content f On demand and accessible via web browser Free Access for Packt account holders If you have an account with Packt at www.PacktPub.com, you can use this to access PacktLib today and view nine entirely free books. Simply use your login credentials for immediate access. Table of Contents Preface 1 Chapter 1: Playing with Images 7 Introduction 7 Installing the OpenCV library 8 Creating an OpenCV project with MS Visual C++ 11 Creating an OpenCV project with Qt 19 Loading, displaying, and saving images 26 Creating a GUI application using Qt 30 Chapter 2: Manipulating the Pixels 37 Introduction 37 Accessing pixel values 38 Scanning an image with pointers 41 Scanning an image with iterators 49 Writing efficient image scanning loops 51 Scanning an image with neighbor access 55 Performing simple image arithmetic 59 Defining regions of interest 63 Chapter 3: Processing Images with Classes 69 Introduction 69 Using the Strategy pattern in algorithm design 70 Using a Controller to communicate with processing modules 76 Using the Singleton design pattern 80 Using the Model-View-Controller architecture to design an application 82 Converting color spaces 85 Chapter 4: Counting the Pixels with Histograms 89 Introduction 89 Computing the image histogram 89 Table of Contents Applying look-up tables to modify image appearance 96 Equalizing the image histogram 101 Backprojecting a histogram to detect specific image content 103 Using the mean shift algorithm to find an object 108 Retrieving similar images using histogram comparison 112 Chapter 5: Transforming Images with Morphological Operations 117 Introduction 117 Eroding and dilating images using morphological filters 118 Opening and closing images using morphological filters 122 Detecting edges and corners using morphological filters 125 Segmenting images using watersheds 131 Extracting foreground objects with the GrabCut algorithm 137 Chapter 6: Filtering the Images 141 Introduction 141 Filtering images using low-pass filters 142 Filtering images using a median filter 147 Applying directional filters to detect edges 148 Computing the Laplacian of an image 156 Chapter 7: Extracting Lines, Contours, and Components 163 Introduction 163 Detecting image contours with the Canny operator 164 Detecting lines in images with the Hough transform 167 Fitting a line to a set of points 178 Extracting the components' contours 182 Computing components' shape descriptors 186 Chapter 8: Detecting and Matching Interest Points 191 Introduction 191 Detecting Harris corners 192 Detecting FAST features 203 Detecting the scale-invariant SURF features 206 Describing SURF features 212 Chapter 9: Estimating Projective Relations in Images 217 Introduction 217 Calibrating a camera 219 Computing the fundamental matrix
Recommended publications
  • Edge Detection of Noisy Images Using 2-D Discrete Wavelet Transform Venkata Ravikiran Chaganti
    Florida State University Libraries Electronic Theses, Treatises and Dissertations The Graduate School 2005 Edge Detection of Noisy Images Using 2-D Discrete Wavelet Transform Venkata Ravikiran Chaganti Follow this and additional works at the FSU Digital Library. For more information, please contact [email protected] THE FLORIDA STATE UNIVERSITY FAMU-FSU COLLEGE OF ENGINEERING EDGE DETECTION OF NOISY IMAGES USING 2-D DISCRETE WAVELET TRANSFORM BY VENKATA RAVIKIRAN CHAGANTI A thesis submitted to the Department of Electrical Engineering in partial fulfillment of the requirements for the degree of Master of Science Degree Awarded: Spring Semester, 2005 The members of the committee approve the thesis of Venkata R. Chaganti th defended on April 11 , 2005. __________________________________________ Simon Y. Foo Professor Directing Thesis __________________________________________ Anke Meyer-Baese Committee Member __________________________________________ Rodney Roberts Committee Member Approved: ________________________________________________________________________ Leonard J. Tung, Chair, Department of Electrical and Computer Engineering Ching-Jen Chen, Dean, FAMU-FSU College of Engineering The office of Graduate Studies has verified and approved the above named committee members. ii Dedicate to My Father late Dr.Rama Rao, Mother, Brother and Sister-in-law without whom this would never have been possible iii ACKNOWLEDGEMENTS I thank my thesis advisor, Dr.Simon Foo, for his help, advice and guidance during my M.S and my thesis. I also thank Dr.Anke Meyer-Baese and Dr. Rodney Roberts for serving on my thesis committee. I would like to thank my family for their constant support and encouragement during the course of my studies. I would like to acknowledge support from the Department of Electrical Engineering, FAMU-FSU College of Engineering.
    [Show full text]
  • Study and Comparison of Different Edge Detectors for Image
    Global Journal of Computer Science and Technology Graphics & Vision Volume 12 Issue 13 Version 1.0 Year 2012 Type: Double Blind Peer Reviewed International Research Journal Publisher: Global Journals Inc. (USA) Online ISSN: 0975-4172 & Print ISSN: 0975-4350 Study and Comparison of Different Edge Detectors for Image Segmentation By Pinaki Pratim Acharjya, Ritaban Das & Dibyendu Ghoshal Bengal Institute of Technology and Management Santiniketan, West Bengal, India Abstract - Edge detection is very important terminology in image processing and for computer vision. Edge detection is in the forefront of image processing for object detection, so it is crucial to have a good understanding of edge detection operators. In the present study, comparative analyses of different edge detection operators in image processing are presented. It has been observed from the present study that the performance of canny edge detection operator is much better then Sobel, Roberts, Prewitt, Zero crossing and LoG (Laplacian of Gaussian) in respect to the image appearance and object boundary localization. The software tool that has been used is MATLAB. Keywords : Edge Detection, Digital Image Processing, Image segmentation. GJCST-F Classification : I.4.6 Study and Comparison of Different Edge Detectors for Image Segmentation Strictly as per the compliance and regulations of: © 2012. Pinaki Pratim Acharjya, Ritaban Das & Dibyendu Ghoshal. This is a research/review paper, distributed under the terms of the Creative Commons Attribution-Noncommercial 3.0 Unported License http://creativecommons.org/licenses/by-nc/3.0/), permitting all non-commercial use, distribution, and reproduction inany medium, provided the original work is properly cited. Study and Comparison of Different Edge Detectors for Image Segmentation Pinaki Pratim Acharjya α, Ritaban Das σ & Dibyendu Ghoshal ρ Abstract - Edge detection is very important terminology in noise the Canny edge detection [12-14] operator has image processing and for computer vision.
    [Show full text]
  • Feature-Based Image Comparison and Its Application in Wireless Visual Sensor Networks
    University of Tennessee, Knoxville TRACE: Tennessee Research and Creative Exchange Doctoral Dissertations Graduate School 5-2011 Feature-based Image Comparison and Its Application in Wireless Visual Sensor Networks Yang Bai University of Tennessee Knoxville, Department of EECS, [email protected] Follow this and additional works at: https://trace.tennessee.edu/utk_graddiss Part of the Other Computer Engineering Commons, and the Robotics Commons Recommended Citation Bai, Yang, "Feature-based Image Comparison and Its Application in Wireless Visual Sensor Networks. " PhD diss., University of Tennessee, 2011. https://trace.tennessee.edu/utk_graddiss/946 This Dissertation is brought to you for free and open access by the Graduate School at TRACE: Tennessee Research and Creative Exchange. It has been accepted for inclusion in Doctoral Dissertations by an authorized administrator of TRACE: Tennessee Research and Creative Exchange. For more information, please contact [email protected]. To the Graduate Council: I am submitting herewith a dissertation written by Yang Bai entitled "Feature-based Image Comparison and Its Application in Wireless Visual Sensor Networks." I have examined the final electronic copy of this dissertation for form and content and recommend that it be accepted in partial fulfillment of the equirr ements for the degree of Doctor of Philosophy, with a major in Computer Engineering. Hairong Qi, Major Professor We have read this dissertation and recommend its acceptance: Mongi A. Abidi, Qing Cao, Steven Wise Accepted for the Council: Carolyn R. Hodges Vice Provost and Dean of the Graduate School (Original signatures are on file with official studentecor r ds.) Feature-based Image Comparison and Its Application in Wireless Visual Sensor Networks A Dissertation Presented for the Doctor of Philosophy Degree The University of Tennessee, Knoxville Yang Bai May 2011 Copyright c 2011 by Yang Bai All rights reserved.
    [Show full text]
  • Computer Vision: Edge Detection
    Edge Detection Edge detection Convert a 2D image into a set of curves • Extracts salient features of the scene • More compact than pixels Origin of Edges surface normal discontinuity depth discontinuity surface color discontinuity illumination discontinuity Edges are caused by a variety of factors Edge detection How can you tell that a pixel is on an edge? Profiles of image intensity edges Edge detection 1. Detection of short linear edge segments (edgels) 2. Aggregation of edgels into extended edges (maybe parametric description) Edgel detection • Difference operators • Parametric-model matchers Edge is Where Change Occurs Change is measured by derivative in 1D Biggest change, derivative has maximum magnitude Or 2nd derivative is zero. Image gradient The gradient of an image: The gradient points in the direction of most rapid change in intensity The gradient direction is given by: • how does this relate to the direction of the edge? The edge strength is given by the gradient magnitude The discrete gradient How can we differentiate a digital image f[x,y]? • Option 1: reconstruct a continuous image, then take gradient • Option 2: take discrete derivative (finite difference) How would you implement this as a cross-correlation? The Sobel operator Better approximations of the derivatives exist • The Sobel operators below are very commonly used -1 0 1 1 2 1 -2 0 2 0 0 0 -1 0 1 -1 -2 -1 • The standard defn. of the Sobel operator omits the 1/8 term – doesn’t make a difference for edge detection – the 1/8 term is needed to get the right gradient
    [Show full text]
  • Features Extraction in Context Based Image Retrieval
    =================================================================== Engineering & Technology in India www.engineeringandtechnologyinindia.com Vol. 1:2 March 2016 =================================================================== FEATURES EXTRACTION IN CONTEXT BASED IMAGE RETRIEVAL A project report submitted by ARAVINDH A S J CHRISTY SAMUEL in partial fulfilment for the award of the degree of BACHELOR OF TECHNOLOGY in ELECTRONICS AND COMMUNICATION ENGINEERING under the supervision of Mrs. M. A. P. MANIMEKALAI, M.E. SCHOOL OF ELECTRICAL SCIENCES KARUNYA UNIVERSITY (Karunya Institute of Technology and Sciences) (Declared as Deemed to be University under Sec-3 of the UGC Act, 1956) Karunya Nagar, Coimbatore - 641 114, Tamilnadu, India APRIL 2015 Engineering & Technology in India www.engineeringandtechnologyinindia.com Vol. 1:2 March 2016 Aravindh A S. and J. Christy Samuel Features Extraction in Context Based Image Retrieval 3 BONA FIDE CERTIFICATE Certified that this project report “Features Extraction in Context Based Image Retrieval” is the bona fide work of ARAVINDH A S (UR11EC014), and CHRISTY SAMUEL J. (UR11EC026) who carried out the project work under my supervision during the academic year 2014-2015. Mrs. M. A. P. MANIMEKALAI, M.E SUPERVISOR Assistant Professor Department of ECE School of Electrical Sciences Dr. SHOBHA REKH, M.E., Ph.D., HEAD OF THE DEPARTMENT Professor Department of ECE School of Electrical Sciences Engineering & Technology in India www.engineeringandtechnologyinindia.com Vol. 1:2 March 2016 Aravindh A S. and J. Christy Samuel Features Extraction in Context Based Image Retrieval 4 ACKNOWLEDGEMENT First and foremost, we praise and thank ALMIGHTY GOD whose blessings have bestowed in us the will power and confidence to carry out our project. We are grateful to our most respected Founder (late) Dr.
    [Show full text]
  • Computer Vision Based Human Detection Md Ashikur
    Computer Vision Based Human Detection Md Ashikur. Rahman To cite this version: Md Ashikur. Rahman. Computer Vision Based Human Detection. International Journal of Engineer- ing and Information Systems (IJEAIS), 2017, 1 (5), pp.62 - 85. hal-01571292 HAL Id: hal-01571292 https://hal.archives-ouvertes.fr/hal-01571292 Submitted on 2 Aug 2017 HAL is a multi-disciplinary open access L’archive ouverte pluridisciplinaire HAL, est archive for the deposit and dissemination of sci- destinée au dépôt et à la diffusion de documents entific research documents, whether they are pub- scientifiques de niveau recherche, publiés ou non, lished or not. The documents may come from émanant des établissements d’enseignement et de teaching and research institutions in France or recherche français ou étrangers, des laboratoires abroad, or from public or private research centers. publics ou privés. International Journal of Engineering and Information Systems (IJEAIS) ISSN: 2000-000X Vol. 1 Issue 5, July– 2017, Pages: 62-85 Computer Vision Based Human Detection Md. Ashikur Rahman Dept. of Computer Science and Engineering Shaikh Burhanuddin Post Graduate College Under National University, Dhaka, Bangladesh [email protected] Abstract: From still images human detection is challenging and important task for computer vision-based researchers. By detecting Human intelligence vehicles can control itself or can inform the driver using some alarming techniques. Human detection is one of the most important parts in image processing. A computer system is trained by various images and after making comparison with the input image and the database previously stored a machine can identify the human to be tested. This paper describes an approach to detect different shape of human using image processing.
    [Show full text]
  • Ffmpeg Filters Documentation Table of Contents
    FFmpeg Filters Documentation Table of Contents 1 Description 2 Filtering Introduction 3 graph2dot 4 Filtergraph description 4.1 Filtergraph syntax 4.2 Notes on filtergraph escaping 5 Timeline editing 6 Options for filters with several inputs (framesync) 7 Audio Filters 7.1 acompressor 7.2 acopy 7.3 acrossfade 7.3.1 Examples 7.4 acrusher 7.5 adelay 7.5.1 Examples 7.6 aecho 7.6.1 Examples 7.7 aemphasis 7.8 aeval 7.8.1 Examples 7.9 afade 7.9.1 Examples 7.10 afftfilt 7.10.1 Examples 7.11 afir 7.11.1 Examples 7.12 aformat 7.13 agate 7.14 alimiter 7.15 allpass 7.16 aloop 7.17 amerge 7.17.1 Examples 7.18 amix 7.19 anequalizer 7.19.1 Examples 7.19.2 Commands 7.20 anull 7.21 apad 7.21.1 Examples 7.22 aphaser 7.23 apulsator 7.24 aresample 7.24.1 Examples 7.25 areverse 7.25.1 Examples 7.26 asetnsamples 7.27 asetrate 7.28 ashowinfo 7.29 astats 7.30 atempo 7.30.1 Examples 7.31 atrim 7.32 bandpass 7.33 bandreject 7.34 bass 7.35 biquad 7.36 bs2b 7.37 channelmap 7.38 channelsplit 7.39 chorus 7.39.1 Examples 7.40 compand 7.40.1 Examples 7.41 compensationdelay 7.42 crossfeed 7.43 crystalizer 7.44 dcshift 7.45 dynaudnorm 7.46 earwax 7.47 equalizer 7.47.1 Examples 7.48 extrastereo 7.49 firequalizer 7.49.1 Examples 7.50 flanger 7.51 haas 7.52 hdcd 7.53 headphone 7.53.1 Examples 7.54 highpass 7.55 join 7.56 ladspa 7.56.1 Examples 7.56.2 Commands 7.57 loudnorm 7.58 lowpass 7.58.1 Examples 7.59 pan 7.59.1 Mixing examples 7.59.2 Remapping examples 7.60 replaygain 7.61 resample 7.62 rubberband 7.63 sidechaincompress 7.63.1 Examples 7.64 sidechaingate 7.65 silencedetect
    [Show full text]
  • Edge Detection 1-D &
    Edge Detection CS485/685 Computer Vision Dr. George Bebis Modified by Guido Gerig for CS/BIOEN 6640 U of Utah www.cse.unr.edu/~bebis/CS485/Lectures/ EdgeDetection.ppt Edge detection is part of segmentation image human segmentation gradient magnitude • Berkeley segmentation database: http://www.eecs.berkeley.edu/Research/Projects/CS/vision/grouping/segbench/ Goal of Edge Detection • Produce a line “drawing” of a scene from an image of that scene. Why is Edge Detection Useful? • Important features can be extracted from the edges of an image (e.g., corners, lines, curves). • These features are used by higher-level computer vision algorithms (e.g., recognition). Modeling Intensity Changes • Step edge: the image intensity abruptly changes from one value on one side of the discontinuity to a different value on the opposite side. Modeling Intensity Changes (cont’d) • Ramp edge: a step edge where the intensity change is not instantaneous but occur over a finite distance. Modeling Intensity Changes (cont’d) • Ridge edge: the image intensity abruptly changes value but then returns to the starting value within some short distance (i.e., usually generated by lines). Modeling Intensity Changes (cont’d) • Roof edge: a ridge edge where the intensity change is not instantaneous but occur over a finite distance (i.e., usually generated by the intersection of two surfaces). Edge Detection Using Derivatives • Often, points that lie on an edge are detected by: (1) Detecting the local maxima or minima of the first derivative. 1st derivative (2) Detecting the zero-crossings of the second derivative. 2nd derivative Image Derivatives • How can we differentiate a digital image? – Option 1: reconstruct a continuous image, f(x,y), then compute the derivative.
    [Show full text]
  • Edge Detection (Trucco, Chapt 4 and Jain Et Al., Chapt 5)
    Edge detection (Trucco, Chapt 4 AND Jain et al., Chapt 5) • Definition of edges -Edges are significant local changes of intensity in an image. -Edges typically occur on the boundary between twodifferent regions in an image. • Goal of edge detection -Produce a line drawing of a scene from an image of that scene. -Important features can be extracted from the edges of an image (e.g., corners, lines, curves). -These features are used by higher-levelcomputer vision algorithms (e.g., recogni- tion). -2- • What causes intensity changes? -Various physical events cause intensity changes. -Geometric events *object boundary (discontinuity in depth and/or surface color and texture) *surface boundary (discontinuity in surface orientation and/or surface color and texture) -Non-geometric events *specularity (direct reflection of light, such as a mirror) *shadows (from other objects or from the same object) *inter-reflections • Edge descriptors Edge normal: unit vector in the direction of maximum intensity change. Edge direction: unit vector to perpendicular to the edge normal. Edge position or center: the image position at which the edge is located. Edge strength: related to the local image contrast along the normal. -3- • Modeling intensity changes -Edges can be modeled according to their intensity profiles. Step edge: the image intensity abruptly changes from one value to one side of the discontinuity to a different value on the opposite side. Ramp edge: astep edge where the intensity change is not instantaneous but occur overafinite distance. Ridge edge: the image intensity abruptly changes value but then returns to the starting value within some short distance (generated usually by lines).
    [Show full text]
  • Sift Based Image Stitching
    Journal of Computing Technologies (2278 – 3814) / # 14 / Volume 3 Issue 3 SIFT BASED IMAGE STITCHING Amol Tirlotkar, Swapnil S. Thakur, Gaurav Kamble, Swati Shishupal Department of Information Technology Atharva College of Engineering, University of Mumbai, India. { amoltirlotkar, thakur.swapnil09, gauravkamble293 , shishupal.swati }@gmail.com Abstract - This paper concerns the problem of image Camera. Image stitching is one of the methods that can be stitching which applies to stitch the set of images to form used to create large image by the use of overlapping FOV a large image. The process to generate one large [8]. The drawback is the memory requirement and the panoramic image from a set of small overlapping images amount of computations for image stitching is very high. In is called Image stitching. Stitching algorithm implements this project, this problem is resolved by performing the a seamless stitching or connection between two images image stitching by reducing the amount of required key having its overlapping part to get better resolution or points. First, the stitching key points are determined by viewing angle in image. Stitched images are used in transmitting two reference images which are to be merged various applications such as creating geographic maps or together. in medical fields. Most of the existing methods of image stitching either It uses a method based on invariant features to stitch produce a ‘rough’ stitch or produce a ghosting or blur effect. image which includes image matching and image For region-based image stitching algorithm detect the image merging. Image stitching represents different stages to edge, prepare for the extraction of feature points.
    [Show full text]
  • Edge Detection CS 111
    Edge Detection CS 111 Slides from Cornelia Fermüller and Marc Pollefeys Edge detection • Convert a 2D image into a set of curves – Extracts salient features of the scene – More compact than pixels Origin of Edges surface normal discontinuity depth discontinuity surface color discontinuity illumination discontinuity • Edges are caused by a variety of factors Edge detection 1.Detection of short linear edge segments (edgels) 2.Aggregation of edgels into extended edges 3.Maybe parametric description Edge is Where Change Occurs • Change is measured by derivative in 1D • Biggest change, derivative has maximum magnitude •Or 2nd derivative is zero. Image gradient • The gradient of an image: • The gradient points in the direction of most rapid change in intensity • The gradient direction is given by: – Perpendicular to the edge •The edge strength is given by the magnitude How discrete gradient? • By finite differences f(x+1,y) – f(x,y) f(x, y+1) – f(x,y) The Sobel operator • Better approximations of the derivatives exist –The Sobel operators below are very commonly used -1 0 1 121 -2 0 2 000 -1 0 1 -1 -2 -1 – The standard defn. of the Sobel operator omits the 1/8 term • doesn’t make a difference for edge detection • the 1/8 term is needed to get the right gradient value, however Gradient operators (a): Roberts’ cross operator (b): 3x3 Prewitt operator (c): Sobel operator (d) 4x4 Prewitt operator Finite differences responding to noise Increasing noise -> (this is zero mean additive gaussian noise) Solution: smooth first • Look for peaks in Derivative
    [Show full text]
  • Edge Detection
    Edge detection Digital Image Processing, K. Pratt, Chapter 15 Edge detection • Goal: identify objects in images – but also feature extraction, multiscale analysis, 3D reconstruction, motion recognition, image restoration, registration • Classical definition of the edge detection problem: localization of large local changes in the grey level image → large graylevel gradients – This definition does not apply to apparent edges, which require a more complex definition – Extension to color images • Contours are very important perceptual cues! – They provide a first saliency map for the interpretation of image semantics Contours as perceptual cues Contours as perceptual cues What do we detect? • Depending on the impulse response of the filter, we can detect different types of graylevel discontinuities – Isolate points (pixels) – Lines with a predefined slope – Generic contours • However, edge detection implies the evaluation of the local gradient and corresponds to a (directional) derivative Detection of Discontinuities • Point Detection Detected point Detection of Discontinuities • Line detection R1 R2 R3 R4 Detection of Discontinuities • Line Detection Example: Edge detection • mage locations with abrupt I changes → differentiation → high pass filtering f[,] m n Intensity profile n m ∂ f[,] m n ∂n n Types of edges Continuous domain edge models 2D discrete domain single pixel spot models Discrete domain edge models b a Profiles of image intensity edges Types of edge detectors • Unsupervised or autonomous: only rely on local image features
    [Show full text]