Presentation is loading. Please wait.

Presentation is loading. Please wait.

Implementing the By: Matthew Marsh Supervisors: Prof Shaun Bangay Mrs Adele Lobb segmentation technique as a plugin for the GIMP.

Similar presentations


Presentation on theme: "Implementing the By: Matthew Marsh Supervisors: Prof Shaun Bangay Mrs Adele Lobb segmentation technique as a plugin for the GIMP."— Presentation transcript:

1 Implementing the By: Matthew Marsh Supervisors: Prof Shaun Bangay Mrs Adele Lobb segmentation technique as a plugin for the GIMP

2 Problem statement: The open source community require a quick, easy to use segmentation tool with matting capabilities. The open source community require a quick, easy to use segmentation tool with matting capabilities. Aim: The GIMP is an open source image editing package that requires such a tool. The GIMP is an open source image editing package that requires such a tool. The GIMP allows extra tools to be added as plugins The GIMP allows extra tools to be added as plugins Implement a quick, easy to use segmentation tool with matting capabilities as a plugin for the GIMP Implement a quick, easy to use segmentation tool with matting capabilities as a plugin for the GIMP

3 What is image segmentation? The process of separating an image into foreground and background parts. The process of separating an image into foreground and background parts. Foreground = object of interest Foreground = object of interest Background = the rest of the image Background = the rest of the image

4 Image Segmentation Cont Every pixel has an alpha value, which sets its opacity Every pixel has an alpha value, which sets its opacity Image segmentation labels all foreground pixels with a full alpha value of 1, Image segmentation labels all foreground pixels with a full alpha value of 1, Background pixels labelled with a value of 0 Background pixels labelled with a value of 0 Can cause jagged edges in finely textured objects Can cause jagged edges in finely textured objects Matting smoothes these edges Matting smoothes these edges

5 Matting Labels pixels with alpha values between the maximum and minimum values Labels pixels with alpha values between the maximum and minimum values Creates edges which vary smoothly from background to foreground. Creates edges which vary smoothly from background to foreground. The image on the right is known as the alpha matte The image on the right is known as the alpha matte

6 How computers perform segmentation Information encapsulated in the digital image is used to calculate the best segmentation. Information encapsulated in the digital image is used to calculate the best segmentation. Edge detection and region detection methods are most commonly used to segment images. Edge detection and region detection methods are most commonly used to segment images. Boundary information is the edge information in an image which can be gained by noting the difference between the colours of nearby pixels. A large difference in colour will indicate an edge. Boundary information is the edge information in an image which can be gained by noting the difference between the colours of nearby pixels. A large difference in colour will indicate an edge. A region is the area enclosed by an edge, and the colours of neighbouring pixels in a region are similar. A region is the area enclosed by an edge, and the colours of neighbouring pixels in a region are similar.

7 “GrabCut” Need to decide on a segmentation technique Need to decide on a segmentation technique “GrabCut” has been chosen “GrabCut” has been chosen Uses both region and boundary information Uses both region and boundary information Uses new graph cut technique Uses new graph cut technique Includes a method of border matting Includes a method of border matting

8 How “GrabCut” Works

9 Clue Marking Clues are used to build up region models Clues are used to build up region models One model for foreground and one for background One model for foreground and one for background Region models determine weights between pixel and Source and Sink nodes Region models determine weights between pixel and Source and Sink nodes

10 Types of region models 3 types of region models have been developed 3 types of region models have been developed Greyscale histograms Greyscale histograms Gaussian Mixture Models Gaussian Mixture Models Colour histograms Colour histograms

11 Greyscale Histograms

12 Gaussian Mixture Models The 1D Gaussian Function The 2D Gaussian Function

13 3D Gaussians A Gaussian Mixture Model is the weighted sum of several Gaussians. A Gaussian Mixture Model is the weighted sum of several Gaussians. Encapsulate the concept of a colour Encapsulate the concept of a colour Each Gaussian is centred around a common colour in the image Each Gaussian is centred around a common colour in the image A GMM has several common colours A GMM has several common colours In this plug-in 5 Gaussians in foreground, 5 in background In this plug-in 5 Gaussians in foreground, 5 in background

14 Colour Histograms The sum of three histograms The sum of three histograms One histogram for each colour channel One histogram for each colour channel Thus a Red, Green and Blue histogram in RGB colour space Thus a Red, Green and Blue histogram in RGB colour space The probability of a pixel lying in the foreground region model is the sum of the probabilities of its red value lying in the red histogram, its blue in the blue etc. The probability of a pixel lying in the foreground region model is the sum of the probabilities of its red value lying in the red histogram, its blue in the blue etc.

15 Matting Implementation “GrabCut” adopts an approach of border matting “GrabCut” adopts an approach of border matting Assume a smooth alpha profile Assume a smooth alpha profile Defined by the sigmoid function Defined by the sigmoid function

16 Border Matting Windows

17 Segmentation Results Greyscale histograms proved to work well Greyscale histograms proved to work well Implementation is fairly fast Implementation is fairly fast Results are good Results are good GMM’s proved to be slow due to the calculation of the initial 5 Gaussians – also the initialization affected the results substantially GMM’s proved to be slow due to the calculation of the initial 5 Gaussians – also the initialization affected the results substantially Colour histograms also work well, and are basically just an extension onto greyscale histograms Colour histograms also work well, and are basically just an extension onto greyscale histograms

18 Segmentation results cont

19 Matting results Input image Matting significantly improved the segmentation results in most cases. Matting significantly improved the segmentation results in most cases. Image with matting Image without matting

20 Conclusion Have completed my project goal – provide open source community with a segmentation tool Have completed my project goal – provide open source community with a segmentation tool Have implemented the “GrabCut” paper and tested their claims Have implemented the “GrabCut” paper and tested their claims The “GrabCut” segmentation technique is definitely usable, and produces good results. The “GrabCut” segmentation technique is definitely usable, and produces good results.


Download ppt "Implementing the By: Matthew Marsh Supervisors: Prof Shaun Bangay Mrs Adele Lobb segmentation technique as a plugin for the GIMP."

Similar presentations


Ads by Google