CSSE463: Image Recognition Day 3 Announcements/reminders: Announcements/reminders: Lab 1 should have been turned in yesterday (due now if use a late day).

Slides:



Advertisements
Similar presentations
Image Processing in Matlab An Introductory Approach by Sabih D. Khan
Advertisements

CSSE463: Image Recognition Day 2 Roll call Roll call Announcements: Announcements: Moodle has drop box for Lab 1 Moodle has drop box for Lab 1 Next class:
Each pixel is 0 or 1, background or foreground Image processing to
Introduction to Morphological Operators
CSSE463: Image Recognition Day 3 Announcements/reminders: Announcements/reminders: Lab 1 should have been turned in yesterday (late day due now). Lab 1.
CSSE463: Image Recognition Day 3 Announcements/reminders: Announcements/reminders: Lab 1 should have been turned in yesterday (due now if use a late day).
Morphological Image Processing Md. Rokanujjaman Assistant Professor Dept of Computer Science and Engineering Rajshahi University.
Tutorial # 10 Morphological Operations I8oZE.
CSSE463: Image Recognition Day 2 Roll call Roll call Announcements: Announcements: Reinstall Matlab if you are having problems: Lab 1 has directions. Reinstall.
CSSE463: Image Recognition Day 2 Roll call Roll call Announcements: Announcements: Room change: Olin 267 starting next class Room change: Olin 267 starting.
CSSE463: Image Recognition Day 6 Yesterday: Yesterday: Local, global, and point operators all operate on entire image, changing one pixel at a time!! Local,
Introduction to Computer Vision
Processing Digital Images. Filtering Analysis –Recognition Transmission.
Binary Image Analysis: Part 2 Readings: Chapter 3: mathematical morphology region properties region adjacency 1.
Course Website: Digital Image Processing Morphological Image Processing.
Computer Vision Basics Image Terminology Binary Operations Filtering Edge Operators.
1 © 2010 Cengage Learning Engineering. All Rights Reserved. 1 Introduction to Digital Image Processing with MATLAB ® Asia Edition McAndrew ‧ Wang ‧ Tseng.
E.G.M. PetrakisBinary Image Processing1 Binary Image Analysis Segmentation produces homogenous regions –each region has uniform gray-level –each region.
Chapter 9.  Mathematical morphology: ◦ A useful tool for extracting image components in the representation of region shape.  Boundaries, skeletons,
Morphological Processing
1 Binary Image Analysis Binary image analysis consists of a set of image analysis operations that are used to produce or process binary images, usually.
CSSE463: Image Recognition Day 25 This week This week Today: Finding lines and circles using the Hough transform (Sonka 6.26) Today: Finding lines and.
Lecture Two for teens.
CSSE463: Image Recognition Day 11 Lab 4 (shape) tomorrow: feel free to start in advance Lab 4 (shape) tomorrow: feel free to start in advance Test Monday.
CSSE463: Image Recognition Day 5 Lab 2 due Wednesday, 1:30. Lab 2 due Wednesday, 1:30. Tip: by Tues 1:30  + 1 late day to use on: Tip: by Tues 1:30 
1 Regions and Binary Images Hao Jiang Computer Science Department Sept. 24, 2009.
Digital Image Processing CSC331 Morphological image processing 1.
CS 376b Introduction to Computer Vision 02 / 11 / 2008 Instructor: Michael Eckmann.
Morphological Image Processing การทำงานกับรูปภาพด้วยวิธีมอร์โฟโลจิคัล
Erosion: Erosion is used for shrinking of element A by using element B
CS654: Digital Image Analysis
Low level Computer Vision 1. Thresholding 2. Convolution 3. Morphological Operations 4. Connected Component Extraction 5. Feature Extraction 1.
CSSE463: Image Recognition Day 11 Due: Due: Written assignment 1 tomorrow, 4:00 pm Written assignment 1 tomorrow, 4:00 pm Start thinking about term project.
CS654: Digital Image Analysis
Nottingham Image Analysis School, 23 – 25 June NITS Image Segmentation Guoping Qiu School of Computer Science, University of Nottingham
CSSE463: Image Recognition Day 9 Lab 3 (edges) due Weds, 3:25 pm Lab 3 (edges) due Weds, 3:25 pm Take home quiz due Friday, 4:00 pm. Take home quiz due.
CS 376b Introduction to Computer Vision 02 / 12 / 2008 Instructor: Michael Eckmann.
 Mathematical morphology is a tool for extracting image components that are useful in the representation and description of region shape, such as boundaries,
Image Segmentation Nitin Rane. Image Segmentation Introduction Thresholding Region Splitting Region Labeling Statistical Region Description Application.
BYST Morp-1 DIP - WS2002: Morphology Digital Image Processing Morphological Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department.
Machine Vision ENT 273 Hema C.R. Binary Image Processing Lecture 3.
CSSE463: Image Recognition Day 3 Announcements/reminders: Announcements/reminders: Lab 1 should have been turned in yesterday (due now if use a late day).
Morphological Image Processing (Chapter 9) CSC 446 Lecturer: Nada ALZaben.
Morphological Image Processing
CSSE463: Image Recognition Day 9
CSE 554 Lecture 1: Binary Pictures
CSSE463: Image Recognition Day 21
Game Theoretic Image Segmentation
CSSE463: Image Recognition Day 11
Introduction to Morphological Operators
CSSE463: Image Recognition Day 11
Morphological Operations
CSSE463: Image Recognition Day 3
CSSE463: Image Recognition Day 23
Binary Image Analysis used in a variety of applications:
CSSE463: Image Recognition Day 9
Department of Computer Engineering
Binary Image Analysis: Part 2 Readings: Chapter 3:
Midterm Exam Closed book, notes, computer Similar to test 1 in format:
CSSE463: Image Recognition Day 9
CSSE463: Image Recognition Day 2
CSSE463: Image Recognition Day 23
CSSE463: Image Recognition Day 3
ECE 692 – Advanced Topics in Computer Vision
Midterm Exam Closed book, notes, computer Similar to test 1 in format:
CSSE463: Image Recognition Day 11
CSSE463: Image Recognition Day 23
CSSE463: Image Recognition Day 11
CSSE463: Image Recognition Day 2
Binary Image Analysis used in a variety of applications:
Presentation transcript:

CSSE463: Image Recognition Day 3 Announcements/reminders: Announcements/reminders: Lab 1 should have been turned in yesterday (due now if use a late day). Lab 1 should have been turned in yesterday (due now if use a late day). Tomorrow: Lab 2 on color images. Bring laptop again. Tomorrow: Lab 2 on color images. Bring laptop again. If you see examples of Img Rec in life, please send to me! If you see examples of Img Rec in life, please send to me! Last class? Last class? Today: Today: Introduce Fruit Finder, due next Friday. Introduce Fruit Finder, due next Friday. Lots of helpful hints in Matlab. Lots of helpful hints in Matlab. Connected components and morphology Connected components and morphology Next week: Edge features Next week: Edge features Questions? Questions?

Spatial component of color Break image into parts and describe each one Break image into parts and describe each one Can describe each part with moments or histograms Regular grid Regular grid Pros? Cons? Image regions Image regions Pros? Cons? Q9

Additional reading Color gamuts Color gamuts Color coherence vectors Color coherence vectors Extension of color histograms within local neighborhoods Extension of color histograms within local neighborhoods Used in: Used in: A. Vailaya, H-J Zhang, and A. Jain. On image classification: City images vs. landscapes. Pattern Recognition 31: , Dec A. Vailaya, H-J Zhang, and A. Jain. On image classification: City images vs. landscapes. Pattern Recognition 31: , Dec Defined in: Defined in: G Pass, R Zabih, and J Miller. Comparing images using color coherence vectors. 4 th ACM Conf. Multimedia, pp 65-73, Boston, G Pass, R Zabih, and J Miller. Comparing images using color coherence vectors. 4 th ACM Conf. Multimedia, pp 65-73, Boston, Q10

Project 1: Counting Fruit How many apples? bananas? oranges? How many apples? bananas? oranges?

Why the fruit-finder? Crash-course in using and applying Matlab Crash-course in using and applying Matlab For this reason, I will direct you to some useful functions, but will not give details of all of them For this reason, I will direct you to some useful functions, but will not give details of all of them Practice feature extraction Practice feature extraction Practice writing a conference-paper style report Practice writing a conference-paper style report Formal and professional! Formal and professional! Use style similar to ICME sunset paper (Abstract, Introduction, Process, Results, …) Use style similar to ICME sunset paper (Abstract, Introduction, Process, Results, …) Lots of details in specification and rubric. Lots of details in specification and rubric.

Fruit-finding technique Observe Observe What numbers define a banana’s “yellow”? (using imtool pixel zoom) What numbers define a banana’s “yellow”? (using imtool pixel zoom) Model Model Can you differentiate between yellow and orange? Orange and red? (Decisions) Can you differentiate between yellow and orange? Orange and red? (Decisions) Note: this isn’t using a classifier yet; just our best guess at hand- tuned boundaries Note: this isn’t using a classifier yet; just our best guess at hand- tuned boundaries Classify pixels using your model (today’s how-to) Classify pixels using your model (today’s how-to) “Clean up” the results “Clean up” the results Mathematical morphology: today’s discussion! Mathematical morphology: today’s discussion! Write up your results in a professional report (as you go) Write up your results in a professional report (as you go)

Region processing Binary image analysis Binary image analysis Today, we’ll only consider binary images composed of foreground and background regions Today, we’ll only consider binary images composed of foreground and background regions Example: apple and non-apple Example: apple and non-apple Use find to create a mask of which pixels belong to each Use find to create a mask of which pixels belong to each Q1

Matlab How-to create a mask Lots of “Random” tidbits that I used in my solution: Lots of “Random” tidbits that I used in my solution: zeros zeros size size find find Q2-3

Modifying the mask requires us to define which pixels are neighbors

Neighborhoods Do we consider diagonals or not? Do we consider diagonals or not? 4-neighborhood of pixel p: 4-neighborhood of pixel p: Consists of pixels in the 4 primary compass directions from p. Consists of pixels in the 4 primary compass directions from p. 8-neighborhood of pixel p: 8-neighborhood of pixel p: Adds 4 pixels in the 4 secondary compass directions from p. Adds 4 pixels in the 4 secondary compass directions from p. Q4-5

Morphological operations (Sonka, ch 13) Morphology = form and structure (shape) Morphology = form and structure (shape) For binary images For binary images Done via a structuring element (usually a rectangle or circle) Done via a structuring element (usually a rectangle or circle) Basic operations: Basic operations: Dilation, erosion, closing, opening Dilation, erosion, closing, opening

Dilation Given a structuring element, adds points in the union of the structuring element and the mask Given a structuring element, adds points in the union of the structuring element and the mask Intuition: Adds background pixels adjacent to the boundary of the foreground region to the foreground. Intuition: Adds background pixels adjacent to the boundary of the foreground region to the foreground. Def, for image X and structuring element B: Def, for image X and structuring element B: Q7a

Dilation in action Strel = 2x1, centered on dot

Dilation Matlab: imdilate(bw, structureElt) Matlab: imdilate(bw, structureElt) Typically want symmetric structuring elements Typically want symmetric structuring elements structureElt (for 8 neighborhood) found by: structureElt (for 8 neighborhood) found by: structureElt = strel(‘square’, 3); % for erosion using 3x3 neighborhood structureElt = strel(‘square’, 3); % for erosion using 3x3 neighborhood structureElt (for 4 neighborhood) found by: structureElt (for 4 neighborhood) found by: structureElt = strel([0 1 0; 1 1 1; 0 1 0]); structureElt = strel([0 1 0; 1 1 1; 0 1 0]); help strel lists 11 others help strel lists 11 others Demo for intuition: Enlarges a region Demo for intuition: Enlarges a region Def: Def: Q7a

Erosion Removes all pixels on the boundary Removes all pixels on the boundary Matlab: imerode(bw, structureElt) Matlab: imerode(bw, structureElt) Q7b

Closing and Opening Closing (imclose) Closing (imclose) Dilate, then erode Dilate, then erode Fills internal holes in a region, while maintaining approximate pixel count Fills internal holes in a region, while maintaining approximate pixel count Eliminates inlets on the boundary Eliminates inlets on the boundary Opening (imopen) Opening (imopen) erode, then dilate erode, then dilate Removes small regions Removes small regions Eliminates peninsulas on the boundary Eliminates peninsulas on the boundary To make dilation more aggressive, To make dilation more aggressive, Dilate n times, then erode n times. Dilate n times, then erode n times. Or, use a larger structuring element Or, use a larger structuring element Example: compare dilating twice using a 3x3 square with dilating once using a 5x5 square. Example: compare dilating twice using a 3x3 square with dilating once using a 5x5 square.

Connected Components Goal: to label groups of connected pixels. Goal: to label groups of connected pixels. Assign each block of foreground pixels a unique integer Assign each block of foreground pixels a unique integer 4-connectivity vs. 8-connectivity matters 4-connectivity vs. 8-connectivity matters Matlab help: search for connected components, and use bwlabel function Matlab help: search for connected components, and use bwlabel function Demo Demo You’ll likely devise an algorithm to do this as part of week 3 take-home test. You’ll likely devise an algorithm to do this as part of week 3 take-home test. Q6

Lab 2 What format? See nice lab 1 What format? See nice lab 1 You will work with a partner for each lab You will work with a partner for each lab Can stay same or change Can stay same or change I have posted a simpler 10-point grading rubric at the top of each lab I have posted a simpler 10-point grading rubric at the top of each lab Please ask questions and complete as much as you can in class Please ask questions and complete as much as you can in class Each lab is due the following Weds at the same time as the start of class Each lab is due the following Weds at the same time as the start of class Start now! Start now!