Image Stitching using Watersheds and Graph Cuts

Similar documents
Fast Image Stitching and Editing for Panorama Painting on Mobile Phones

Fast Image Stitching and Editing for Panorama Painting on Mobile Phones

Fast Image Labeling for Creating High-Resolution Panoramic Images on Mobile Devices

Gradient Domain Image Blending and Implementation on Mobile Devices

Photoshop Quickselect & Interactive Digital Photomontage

Panoramic Image Stitching

Perception-based Seam-cutting for Image Stitching

Targil 10 : Why Mosaic? Why is this a challenge? Exposure differences Scene illumination Miss-registration Moving objects

SURF applied in Panorama Image Stitching

IMAGE stitching is a common practice in the generation of

Mosaics. Today s Readings

Color Me Right Seamless Image Compositing

Today s lecture. Image Alignment and Stitching. Readings. Motion models

Prof. Feng Liu. Spring /17/2017. With slides by F. Durand, Y.Y. Chuang, R. Raskar, and C.

Image and Vision Computing

Scalable Seams for Gigapixel Panoramas

technique: seam carving Image and Video Processing Chapter 9

Midterm Examination CS 534: Computational Photography

Homographies and RANSAC

Stitching and Blending

E27 Computer Vision - Final Project: Creating Panoramas David Nahmias, Dan Spagnolo, Vincent Stigliani Professor Zucker Due 5/10/13

Panoramic Video Texture

CSE 527: Introduction to Computer Vision

Image Features: Local Descriptors. Sanja Fidler CSC420: Intro to Image Understanding 1/ 58

Fast Poisson Blending using Multi-Splines

Photographic stitching with optimized object and color matching based on image derivatives

Line Segment Based Watershed Segmentation

An Integrated System for Digital Restoration of Prehistoric Theran Wall Paintings

Observations. Basic iteration Line estimated from 2 inliers

Video Operations in the Gradient Domain. Abstract. these operations on video in the gradient domain. Our approach consists of 3D graph cut computation

An Algorithm for Seamless Image Stitching and Its Application

Parallax-Robust Surveillance Video Stitching

Challenges of Close-Range Underwater Optical Mapping

Feature Descriptors. CS 510 Lecture #21 April 29 th, 2013

Free Appearance-Editing with Improved Poisson Image Cloning

Chapter 3 Image Registration. Chapter 3 Image Registration

SIFT: SCALE INVARIANT FEATURE TRANSFORM SURF: SPEEDED UP ROBUST FEATURES BASHAR ALSADIK EOS DEPT. TOPMAP M13 3D GEOINFORMATION FROM IMAGES 2014

Image Segmentation. Selim Aksoy. Bilkent University

Image Segmentation. Selim Aksoy. Bilkent University

Acquisition of high resolution geo objects Using image mosaicking techniques

Announcements. Mosaics. Image Mosaics. How to do it? Basic Procedure Take a sequence of images from the same position =

Shift-Map Image Editing

A Comparison of SIFT, PCA-SIFT and SURF

Use of Shape Deformation to Seamlessly Stitch Historical Document Images

SURF: Speeded Up Robust Features. CRV Tutorial Day 2010 David Chi Chung Tam Ryerson University

Computer Vision for HCI. Topics of This Lecture

Tiled Texture Synthesis

Image Blending and Compositing NASA

CSE 252B: Computer Vision II

Announcements. Mosaics. How to do it? Image Mosaics

Topics to be Covered in the Rest of the Semester. CSci 4968 and 6270 Computational Vision Lecture 15 Overview of Remainder of the Semester

Object Detection by Point Feature Matching using Matlab

C E N T E R A T H O U S T O N S C H O O L of H E A L T H I N F O R M A T I O N S C I E N C E S. Image Operations II

A NEW FEATURE BASED IMAGE REGISTRATION ALGORITHM INTRODUCTION

The Video to Panoramic Image Converter

Image Segmentation Based on Watershed and Edge Detection Techniques

CS6670: Computer Vision

COLORIZATION OF MARKED IMAGES WITH THE RESIDUAL MARKERS REMOVAL

Image Stitching. Slides from Rick Szeliski, Steve Seitz, Derek Hoiem, Ira Kemelmacher, Ali Farhadi

Automatic Generation of An Infinite Panorama

Panoramic Stereo Video Textures

BSB663 Image Processing Pinar Duygulu. Slides are adapted from Selim Aksoy

Computer Vision I - Appearance-based Matching and Projective Geometry

Parallax-tolerant Image Stitching

Multi-modal Registration of Visual Data. Massimiliano Corsini Visual Computing Lab, ISTI - CNR - Italy

VK Multimedia Information Systems

Panoramic Image Mosaicing

Image Stitching using Harris Feature Detection

PANORAMIC IMAGE STITCHING BASED ON FEATURE EXTRACTION AND CORRELATION

Drag and Drop Pasting

Motion Estimation. There are three main types (or applications) of motion estimation:

Feature Matching and RANSAC

Image Composition. COS 526 Princeton University

Graphcut-based Interactive Segmentation using Colour and Depth cues

Automatic Colorization of Grayscale Images

SIFT: Scale Invariant Feature Transform

A System of Image Matching and 3D Reconstruction

3D Visualization through Planar Pattern Based Augmented Reality

Stacked Integral Image

Local Feature Detectors

AN ADVANCED SCALE INVARIANT FEATURE TRANSFORM ALGORITHM FOR FACE RECOGNITION

Implementation of an Image Stitching Algorithm to a Low-Cost Digital Microscope

EE368 Project Report CD Cover Recognition Using Modified SIFT Algorithm

521466S Machine Vision Assignment #3 Image Features

Recap. DoF Constraint Solver. translation. affine. homography. 3D rotation

Object Recognition with Invariant Features

Photometric Processing

Automatic Logo Detection and Removal

SURF. Lecture6: SURF and HOG. Integral Image. Feature Evaluation with Integral Image

Chaplin, Modern Times, 1936

A Fast Sequential Rainfalling Watershed Segmentation Algorithm

CS 558: Computer Vision 4 th Set of Notes

Implementation and Comparison of Feature Detection Methods in Image Mosaicing

Recap from Monday. Frequency domain analytical tool computational shortcut compression tool

Local Features: Detection, Description & Matching

Analysis of Image and Video Using Color, Texture and Shape Features for Object Identification

Panoramic Video Textures

Instance-level recognition part 2

Image stitching. Announcements. Outline. Image stitching

ROBUST LINE-BASED CALIBRATION OF LENS DISTORTION FROM A SINGLE VIEW

Transcription:

Image Stitching using Watersheds and Graph Cuts Patrik Nyman Centre for Mathematical Sciences, Lund University, Sweden patnym@maths.lth.se 1. Introduction Image stitching is commonly used in many different applications. One such application could be creating panoramas or high resolution images. To create seamless images is often very computationally demanding. On the other hand, the technological evolution of the latest years has created a customer demand for these algorithms to be used in handheld devices, such as cameras and cell phones. The methods need therefore to be faster in order to work in near real-time on mobile devices. Using one of the simpler algorithms often results in degrading artifacts, such as artificial seams or blurred regions. To favor seamless blending and clarity in the blending areas, while keeping a low computational cost, is the main motivation for this report. In this report the implementation of a fast image blending algorithm, based on the watershed algorithm and graph cuts, is presented [5]. The images are first aligned using SURF-matches. in the report belongs to this group. There are methods trying to match the intensity on pixel level, while other methods instead divide the images into segments and match the segments between the images. Pixel level matching methods often give better results than region matching methods, but are more computationally demanding [5]. One of the largest challenges using region matching is to find good regions. 2.1. Watershed segmentation In watershed segmentation one regards the image as a topological map where darker areas correspond to valleys and holes and brighter areas correspond to ridges and tops. A water source is placed in all regional minima. The water level rises and starts to flood the landscape. When water from different sources meet a barrier is built. The resulting barriers will then define the different segments [8]. One example of a watershed segmentation is shown in Figure 1. 2. Background The methods available for image blending can be divided into two categories, the first being transition smoothing and the second being optimal seam finding [1]. Transition smoothing methods try to minimize the seam between the images by smoothing the edges of the images, commonly referred to as alpha blending or feathering. The largest disadvantage of transition smoothing is that the method in it most naïve form creates blurry areas. Recently, several methods using multi-resolution blending, such as using wavelets and gradient domain blending, have been presented [5]. However, generally the methods require finding a leastsquare solution of a Poisson equation which is very computationally expensive [6]. Optimal seam finding methods try instead to place the seam where the intensity difference between the two images is as low as possible. The method implemented 2.2. Graph cuts Figure 1. Watershed regions In this report we try to find the minimum cut in a weighted s-t graph. A graph is a mathematical representation of objects (vertices or nodes) connected by links (edges or lines). Each link in a weighted graph is associated with a weight. In an s-t graph there are a source (s) and a sink (t). When searching the minimum cut one

tries to find the cut that separates the source from the sink to the lowest cost, i.e. the lowest total sum of the weights cut [3]. An example of a graph and its minimum cut is shown in Figure 2. Figure 2. Examples of a graph its minimum graph cut. The total cost is 8 (2+4+1+1). 3. Method 3.1. Image alignment To align the two images, SURF descriptors [2] were calculated in the images, shown in Figure 3. SURF was chosen since it is faster than, for example, SIFT and often also more robust. The descriptors were matched by considering the Euclidean distance, i.e. a descriptor in the first image was assigned to the descriptor in the second image being the closest with respect to Euclidean distance. Outliers were then removed by running a RANSAC algorithm [4]. Iteratively, four matches were randomly chosen and used to estimate a projective transformation between the images. This was repeated 500 times. The best transformation, i.e. the transformation that could transform the largest number of points correctly, was used to transform the second image into the first one, see Figure 4. 3.2. Segmentation of the intersection After alignment of the images the inverted intensity difference (Figure 5) between the images was calculated, according to the following formula: D(x, y) = 255 max(i 1 (x, y) I 2 (x, y)) (1) where I 1 is the first image and I 2 the second image. The watershed segmentation was then performed on the inverted difference image, see Figure 6. By segmenting the difference image, regions which are the least similar Figure 3. Corresponding SURF descriptors in the first and second image. Figure 4. The second image transformed. are aggregated. When trying to find the best seam those areas should be avoided. 3.3. Graph cut labeling The source and sink of the problem were defined as the non-overlapping regions from the first and second image, respectively. The segments from the watershed algorithm were set as the nodes in the graph. The total sum in the difference image of the boundary pixels between two segments was set as the weight between the segments. Using a max-flow algorithm the minimum cut was found. The minimum cut was then the opti-

Figure 5. The inverted difference image between the first and second image. Figure 8. The final result - the stitched image. Figure 6. Watershed regions created from segmenting the inverted difference image. mal seam between the two images, see Figure 7. The stitched image is shown in Figure 8. Figure 7. The minimum cut and, hence, the optimal seam. 4. Results Pictures from two different settings have been used to evaluate the method presented. The method has been compared to a simple feathering method, where a vertical seam is used and the border areas has been blurred in order to decrease the visibility of the seam. The first set of images was taken using a cell phone camera out through the author s office window. Note that there is a difference in exposure between the two images. The second set of images is two frames from a film clip found on YouTube [7]. In the first comparison (Figure 9, 10, 11) one can clearly see the seam for the simple method, while it is much harder to spot the seem for the method presented herein. In the second comparison (Figure 12, 13, 14) one can clearly see that the surfer has been cut in half using the simple feathering method. Even though there are differences in the water texture between the images the method presented in this paper found a seem that is not visible. Overall, one can conclude that the method presented is successful in creating seamless image blendings. References [1] A. Agarwala, M. Dontcheva, M. Agrawala, S. Drucker, A. Colburn, B. Curless, D. Salesin, and M. Cohen. Interactive digital photomontage. ACM Transactions on Graphics, 23(3):294 302, 2004. [2] H. Bay, T. Tuytelaars, and L. V. Gool. Surf: Speeded up robust features. In In Proceedings of the European Conference on Computer Vision, pages 404 417, 2006. [3] Y. Boykov, O. Veksler, and R. Zabih. Fast approximate energy minimization via graph cuts. IEEE Transactions on Pattern Analysis and Machine Intelligence, 23:1222 1239, 2001. [4] M. A. Fischler and R. C. Bolles. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Readings in computer vision: issues, problems, principles, and paradigms, pages 726 740, 1987. [5] N. Gracias, M. Mahoor, S. Negahdaripour, and A. Gleason. Fast image blending using watersheds and graph cuts. Image Vision Comput., 27(5):597 607, 2009. [6] A. Levin, A. Zomet, S. Peleg, and Y. Weiss. Seamless image stitching in the gradient domain. In In Proceedings of the European Conference on Computer Vision, 2006. [7] OnlyHDVideos. Wave house (in hd), http://www.youtube.com/watch?v=mus6k19devc, March 2009. [8] L. Vincent and P. Soille. Watersheds in digital spaces: an efficient algorithm based on immersion simulations. IEEE Transactions on Pattern Analysis and Machine Intelligence(13):583 598, 1991.

Figure 9. Images taken with a cell phone. Figure 10. Result from using feathering. Figure 11. Result using graph cut stitching.

Figure 12. Images downloaded from YouTube. Figure 13. Result from using feathering. Figure 14. Result using graph cut stitching.