LING 111 Teaching DemoLING 111 Teaching Demo
By Tenghui Zhu ([email protected])
Introduction to Edge Detection
Image Segmentation
OverviewOverview
• Review on Image Data Structures
• Purpose of Image Segmentation
• Basic Image Segmentation Algorithm – Edge Detection
OverviewOverview
• Review on Image Data Structures
• Purpose of Image Segmentation
• Basic Image Segmentation Algorithm – Edge Detection
Image Data StructuresImage Data Structures
grayscale images : (Center)each pixel = a value between 0 - 255.
monochrome images: (Left)each pixel = a single 0 or 1 value
Color Images: (Right)each pixel = three values (red, green and blue - RGB).
Image Data StructuresImage Data Structures
grayscale images : (Center)each pixel = a value between 0 - 255.
monochrome images: (Left)each pixel = a single 0 or 1 value
Color Images: (Right)each pixel = three values (red, green and blue - RGB).
OverviewOverview
• Review on Image Data Structures
• Purpose of Image Segmentation
• Basic Image Segmentation Algorithm – Edge Detection
One Image Segmentation applicationOne Image Segmentation applicationOne Image Segmentation applicationOne Image Segmentation application
Any other Image Segmentation application ?Any other Image Segmentation application ?Any other Image Segmentation application ?Any other Image Segmentation application ?
• Satellite Images for CIA• Medical Images for NIH • Face Recognize for FBI • Etc…
OverviewOverview
• Review on Image Data Structures
• Purpose of Image Segmentation
• Basic Image Segmentation Algorithm – Edge Detection
Edge Detection—3x3 FilteringEdge Detection—3x3 Filtering
8 9 9 11 11 11 8 3 9 3 9 11 2 8 3 5 5 9 8 6 8 6 8 11 2 2 4 4 6 9 6 9 11 4 4 6
1/9 1/9 1/9
1/9 1/9 1/9
1/9 1/9 1/9
(3 + 5 + 5 + 8 + 6 + 8 + 4 + 4 + 6) / 9 = 5.44
Round(3 + 5 + 5 + 8 + 6 + 8 + 4 + 4 + 6) / 9 = 5or
Edge Detection—3x3 FilteringEdge Detection—3x3 Filtering
8 9 9 11 11 11 8 3 9 3 9 11 2 8 3 5 5 9 8 6 8 6 8 11 2 2 4 4 6 9 6 9 11 4 4 6
1/9 1/9 1/9
1/9 1/9 1/9
1/9 1/9 1/9
(3 + 5 + 5 + 8 + 6 + 8 + 4 + 4 + 6) / 9 = 5.44
Round(3 + 5 + 5 + 8 + 6 + 8 + 4 + 4 + 6) / 9 = 5or
55
OverviewOverview
• Review on Image Data Structures
• Purpose of Image Segmentation
• Basic Image Segmentation Algorithm – Edge Detection
Next time, we will talk about another basic Image Segmentation Algorithm -- Histogram
Segmented ImageSegmented Image
Image after segmentation – we get a outline of her face, hat, shadow etc
OverviewOverview
• Review on Image Segmentation– Algorithm (Without User Interaction)
• Edge Detection• Statistics (Histogram etc…)
– Tools (With User Interaction)• Magic Wand • Intelligent Scissors • Graph Cut
ConclusionsConclusions ConclusionsConclusions
GrabCut – powerful interactive extraction tool
Iterated Graph Cut based on colour and contrast
Regularized alpha matting by Dynamic Programming