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
Computational Biology, Part 23 Biological Imaging II Robert F. Murphy Copyright  1996, 1999, All rights reserved.
Advertisements

Some Basic Morphological Algorithm
Morphology – Chapter 10. Binary image processing Often it is advantageous to reduce an image from gray level (multiple bits/pixel) to binary (1 bit/pixel)
Binary Morphology A method for … –Dilation –Erosion –Opening –Closing -750-
Digital Image Processing Lecture 12: Image Topology
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.
Morphological Image Processing Md. Rokanujjaman Assistant Professor Dept of Computer Science and Engineering Rajshahi University.
Tutorial # 10 Morphological Operations I8oZE.
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.
CSE554Binary PicturesSlide 1 CSE 554 Lecture 1: Binary Pictures Fall 2013.
CSE554Binary PicturesSlide 1 CSE 554 Lecture 1: Binary Pictures Fall 2014.
Chapter 3 Binary Image Analysis. Types of images ► Digital image = I[r][c] is discrete for I, r, and c.  B[r][c] = binary image - range of I is in {0,1}
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.
1 Regions and Binary Images Hao Jiang Computer Science Department Sept. 25, 2014.
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.
Erosion: Erosion is used for shrinking of element A by using element B
CS654: Digital Image Analysis
CSSE463: Image Recognition Day 6 Yesterday: Local, global, and point operators use different context, but all Yesterday: Local, global, and point operators.
Low level Computer Vision 1. Thresholding 2. Convolution 3. Morphological Operations 4. Connected Component Extraction 5. Feature Extraction 1.
CS654: Digital Image Analysis
CSSE463: Image Recognition Day 29 This week This week Today: Surveillance and finding motion vectors Today: Surveillance and finding motion vectors Tomorrow:
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.
CSSE463: Image Recognition Day 3 Announcements/reminders: Announcements/reminders: Lab 1 should have been turned in yesterday (due now if use a late day).
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
Digital Image Processing CCS331 Relationships of Pixel 1.
Content Based Coding of Face Images
CSSE463: Image Recognition Day 9
CSE 554 Lecture 1: Binary Pictures
Game Theoretic Image Segmentation
HIT and MISS.
Introduction to Morphological Operators
Statistical Approach to a Color-based Face Detection Algorithm
Morphological Operations
CSSE463: Image Recognition Day 3
Binary Image Analysis used in a variety of applications:
EEEB0765 Digital Signal Processing for Embedded Systems 8 Video and Image Processing in Embedded Systems (I) Assoc. Prof. Dr. Peerapol Yuvapoositanon.
CSSE463: Image Recognition Day 9
Department of Computer Engineering
CSSE463: Image Recognition Day 6
Binary Image Analysis: Part 2 Readings: Chapter 3:
CSSE463: Image Recognition Day 6
CSSE463: Image Recognition Day 9
CSSE463: Image Recognition Day 3
ECE 692 – Advanced Topics in Computer Vision
CSSE463: Image Recognition Day 23
CS654: Digital Image Analysis
CSSE463: Image Recognition Day 7
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. Tomorrow: Lab 2 on color images. Bring laptop. 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?

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, …)

Fruit-finding technique Observe Observe What is a banana’s “yellow”? (numerically, using imtool) What is a banana’s “yellow”? (numerically, using imtool) 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 Classify pixels using your model “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

Functions in Matlab Contents of foo.m: function retVal = dumbSum(x,y) … retVal = x+y; Can return multiple values of any type: [mask, count, threshold] = foo(img) Note that you don’t use return here.

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

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

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.

Lab 2 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 1:30 Each lab is due the following Weds. at 1:30 Start now! Start now!