CSSE463: Image Recognition Day 6 Yesterday: Local, global, and point operators use different context, but all Yesterday: Local, global, and point operators.

Slides:



Advertisements
Similar presentations
Boundary Detection - Edges Boundaries of objects –Usually different materials/orientations, intensity changes.
Advertisements

EDGE DETECTION ARCHANA IYER AADHAR AUTHENTICATION.
Instructor: Mircea Nicolescu Lecture 6 CS 485 / 685 Computer Vision.
DREAM PLAN IDEA IMPLEMENTATION Introduction to Image Processing Dr. Kourosh Kiani
Sliding Window Filters and Edge Detection Longin Jan Latecki Computer Graphics and Image Processing CIS 601 – Fall 2004.
EDGE DETECTION.
1Ellen L. Walker Edges Humans easily understand “line drawings” as pictures.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Lecture 4 Edge Detection
CSSE463: Image Recognition Day 6 Yesterday: Yesterday: Local, global, and point operators all operate on entire image, changing one pixel at a time!! Local,
Computer Vision Group Edge Detection Giacomo Boracchi 5/12/2007
Edge detection. Edge Detection in Images Finding the contour of objects in a scene.
EE663 Image Processing Edge Detection 2 Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
MSU CSE 803 Stockman Linear Operations Using Masks Masks are patterns used to define the weights used in averaging the neighbors of a pixel to compute.
Canny Edge Detector1 1)Smooth image with a Gaussian optimizes the trade-off between noise filtering and edge localization 2)Compute the Gradient magnitude.
Lecture 3: Edge detection, continued
1 Image Filtering Readings: Ch 5: 5.4, 5.5, 5.6,5.7.3, 5.8 (This lecture does not follow the book.) Images by Pawan SinhaPawan Sinha formal terminology.
Segmentation (Section 10.2)
Introduction to Computer Vision CS / ECE 181B Thursday, April 22, 2004  Edge detection (HO #5)  HW#3 due, next week  No office hours today.
EE663 Image Processing Edge Detection 3 Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Lecture 2: Image filtering
Lecture 4: Edge Based Vision Dr Carole Twining Thursday 18th March 2:00pm – 2:50pm.
MSU CSE 803 Linear Operations Using Masks Masks are patterns used to define the weights used in averaging the neighbors of a pixel to compute some result.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Computer Vision Spring ,-685 Instructor: S. Narasimhan WH 5409 T-R 10:30 – 11:50am.
Discrete Images (Chapter 7) Fourier Transform on discrete and bounded domains. Given an image: 1.Zero boundary condition 2.Periodic boundary condition.
Edges. Edge detection schemes can be grouped in three classes: –Gradient operators: Robert, Sobel, Prewitt, and Laplacian (3x3 and 5x5 masks) –Surface.
Edge Detection Today’s reading Cipolla & Gee on edge detection (available online)Cipolla & Gee on edge detection From Sandlot ScienceSandlot Science.
SHINTA P. Juli What are edges in an image? Edge Detection Edge Detection Methods Edge Operators Matlab Program.
CSC508 What You Should Be Doing Code, code, code –Programming Gaussian Convolution Sobel Edge Operator.
CS654: Digital Image Analysis Lecture 24: Introduction to Image Segmentation: Edge Detection Slide credits: Derek Hoiem, Lana Lazebnik, Steve Seitz, David.
EE 4780 Edge Detection.
October 7, 2014Computer Vision Lecture 9: Edge Detection II 1 Laplacian Filters Idea: Smooth the image, Smooth the image, compute the second derivative.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Sejong Univ. Edge Detection Introduction Simple Edge Detectors First Order Derivative based Edge Detectors Compass Gradient based Edge Detectors Second.
Chapter 9: Image Segmentation
CSE 6367 Computer Vision Image Operations and Filtering “You cannot teach a man anything, you can only help him find it within himself.” ― Galileo GalileiGalileo.
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities May 2, 2005 Prof. Charlene Tsai.
Announcements Project 0 due tomorrow night. Edge Detection Today’s readings Cipolla and Gee (handout) –supplemental: Forsyth, chapter 9Forsyth For Friday.
Lecture 04 Edge Detection Lecture 04 Edge Detection Mata kuliah: T Computer Vision Tahun: 2010.
Digital Image Processing Lecture 17: Segmentation: Canny Edge Detector & Hough Transform Prof. Charlene Tsai.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
Edge Segmentation in Computer Images CSE350/ Sep 03.
Computer Vision Image Features Instructor: Dr. Sherif Sami Lecture 4.
Instructor: Mircea Nicolescu Lecture 7
Digital Image Processing CSC331
September 26, 2013Computer Vision Lecture 8: Edge Detection II 1Gradient In the one-dimensional case, a step edge corresponds to a local peak in the first.
Sliding Window Filters Longin Jan Latecki October 9, 2002.
1 Edge Operators a kind of filtering that leads to useful features.
April 21, 2016Introduction to Artificial Intelligence Lecture 22: Computer Vision II 1 Canny Edge Detector The Canny edge detector is a good approximation.
Winter in Kraków photographed by Marcin Ryczek
EDGE DETECTION Dr. Amnach Khawne. Basic concept An edge in an image is defined as a position where a significant change in gray-level values occur. An.
Edge Detection slides taken and adapted from public websites:
Jeremy Bolton, PhD Assistant Teaching Professor
Computer Vision Lecture 9: Edge Detection II
a kind of filtering that leads to useful features
a kind of filtering that leads to useful features
Edge Detection Today’s reading
CSSE463: Image Recognition Day 6
Linear Operations Using Masks
CSSE463: Image Recognition Day 6
Edge Detection Today’s reading
CSSE463: Image Recognition Day 6
Introduction Computer vision is the analysis of digital images
CSSE463: Image Recognition Day 6
Canny Edge Detector Smooth image with a Gaussian
Image Filtering Readings: Ch 5: 5. 4, 5. 5, 5. 6, , 5
Winter in Kraków photographed by Marcin Ryczek
IT472 Digital Image Processing
IT472 Digital Image Processing
Presentation transcript:

CSSE463: Image Recognition Day 6 Yesterday: Local, global, and point operators use different context, but all Yesterday: Local, global, and point operators use different context, but all operate on entire image, operate on entire image, changing one pixel at a time!! changing one pixel at a time!! Lab due tomorrow 1:30 pm. Lab due tomorrow 1:30 pm. Fruit-finder deadline Friday, 11:59pm Fruit-finder deadline Friday, 11:59pm Please leave time for a solid write-up Please leave time for a solid write-up See rubric online for standards See rubric online for standards Questions? Questions? Today: edge features (another local operator) Today: edge features (another local operator) Sonka 5.3 Sonka 5.3

There are only two people in this world: 1. Those who index their arrays starting at 1 1. Those who index their arrays starting at 0 Thanks to 463 student Thomas Root for clarifying this for us.

Edge Features – Why? “Edginess” (# edges) and their directions can give you info about the scene content Orientation of the image Natural vs. manmade images Edges can be used to segment the image. Color information is usually used as well. Specifically, boundaries occur where the chroma and/or luminance change (drastically). We could use to enhance the fruit-finder in a later assignment (not now).

Outline for next 2 sessions Concept: How to find “edges” in 1D signal Concept: How to find “edges” in 1D signal Edges in 2D images Edges in 2D images Limitations Limitations Edges vs edgels, Canny edge detector Edges vs edgels, Canny edge detector

Intuition: Finding edges What’s an edge? What’s an edge? How to find changes in intensity? How to find changes in intensity? How to find first derivative? How to find first derivative? Image Intensity First deriv.

Finding derivatives (1D) Let y be intensity of point at location x Let y be intensity of point at location x Def: Def: Fix  x = 1 pixel Fix  x = 1 pixel dy/dx = y 2 -y 1 dy/dx = y 2 -y 1 f: [ ]; f’:[ ]; Correlate image with filter [-1,1] to find positions of change. Correlate image with filter [-1,1] to find positions of change. Edges “between” pixels. Edges “between” pixels. What is significance of magnitude of first deriv. ? What is significance of magnitude of first deriv. ?

Applying Filters Example for differential with  x = 2 pixels: Example for differential with  x = 2 pixels: (Better; no output “between” pixels) ½-½-½-½0½ -½-½-½-½0½ -½-½-½-½0½ Image Mask Output … Could you do Could you do Ramps? Impulse? Step edges? (on quiz) Ramps? Impulse? Step edges? (on quiz) Properties Properties If no contrast? If no contrast? Q1,3

Why should the values in an edge filter sum to 0? What if they didn’t? What if they didn’t? Consider running it on a homogeneous region: 40, 40, 40, 40, 40, 40 Consider running it on a homogeneous region: 40, 40, 40, 40, 40, 40 Q2

2D Edges Local operators Local operators Prewitt operators Prewitt operators Sobel masks Sobel masks Roberts 2x2 cross-operators Roberts 2x2 cross-operators Gradient: magnitude Gradient: magnitude Gradient direction Gradient direction

Gradients fxfx fyfy ff Vector pointing in direction of greatest change: We want its magnitude and direction

1. Find partials using filters Note that this is 1D filter, but averaged over 3 rows (for df/dx) or 3 cols (for df/dy) and with 1/6 factored out to allow integer multiplication Q4,Q5

Demo My homemade edgefinder My homemade edgefinder Finds vertical and horizontal edges using filters Finds vertical and horizontal edges using filters Combines to find edge magnitude Combines to find edge magnitude Combines to find edge direction Combines to find edge direction Re-scale for display Re-scale for display Similar to part of Lab 3. Similar to part of Lab 3. So I can’t post code So I can’t post code

2. Find edge gradient magnitude Definition: the gradient,, is the vector pointing in the direction of greatest change. Definition: the gradient,, is the vector pointing in the direction of greatest change. To find its magnitude: To find its magnitude: Q2

3. Find edge gradient direction tan -1 (y,x) tan -1 (y,x) Matlab’s atan2(y,x) gives full range, [-  Matlab’s atan2(y,x) gives full range, [-   /2 dir=arctan(-1,0) = -  /2  dir=arctan(0,-1) =   /2 dir=arctan(1,0)=  /2 dir=arctan(0,1)= 0 Direction is thus the angle formed by the x-axis and the line “pointing towards” light region. Direction is thus the angle formed by the x-axis and the line “pointing towards” light region. Q3-4

Color edges Rarely used historically Rarely used historically Intuition: edges occur between regions of different hue but same intensity. Intuition: edges occur between regions of different hue but same intensity. One technique patented by David Cok, Eastman Kodak Co. One technique patented by David Cok, Eastman Kodak Co.

Limitations of edgel-finders Natural variation Natural variation Shadows and highlights can obscure edges Shadows and highlights can obscure edges Internal vs. external edges Internal vs. external edges We might want the outline of an article of clothing, but the stripes in our shirt are edges too. We might want the outline of an article of clothing, but the stripes in our shirt are edges too. Noise! Noise! Signal-to-noise ratio important in determining how hard it is to find edges. Signal-to-noise ratio important in determining how hard it is to find edges. Q5

Dealing with noise by smoothing Our goal is to combine smoothing and edgel detection. Our goal is to combine smoothing and edgel detection. Smooth using Gaussian Find edges by finding zero-crossings of 2 nd deriv. filter (1 -2 1) Can combine by using a difference of Gaussian (DOG) filter Can combine by using a difference of Gaussian (DOG) filter Then find zero- crossings 3x3 11x11

Edgels vs. Edges Edgels are unconnected groups of pixels detected by a mask Edgels are unconnected groups of pixels detected by a mask Edges are longer segments found by grouping edgels Edges are longer segments found by grouping edgels Intuitively, we think of edges Different data structure Different data structure How might you process a “raw” edge image? How might you process a “raw” edge image?

From mask output to edgels: ideas Threshold away “weak” output Threshold away “weak” output What threshold to use? What threshold to use? Always fixed or should it vary? Always fixed or should it vary? “Thin” edges by nonmaximum suppression. “Thin” edges by nonmaximum suppression. Idea: If an edge is 5 pixels wide, we can replace it with only the innermost segment. Idea: If an edge is 5 pixels wide, we can replace it with only the innermost segment. Remove the edge response of an pixel not greater than its 2 neighbors in the direction of the gradient. Remove the edge response of an pixel not greater than its 2 neighbors in the direction of the gradient. Q6

Canny edge detection First smoothes the intensity image First smoothes the intensity image Parameter  controls how many edges found Parameter  controls how many edges found Non-maximal suppression Non-maximal suppression Uses two thresholds: Uses two thresholds: High: to initiate contour following High: to initiate contour following Low: to follow along a contour Low: to follow along a contour Result: segments from noise are less likely to be found (unless the noise is too strong) Result: segments from noise are less likely to be found (unless the noise is too strong) Aggregates neighboring edgels into curves (“edges”) Aggregates neighboring edgels into curves (“edges”) Q7-8

Canny edge detection You’ll get to play with various edgefinders in Lab 3 using Matlab’s built-in edgedemo You’ll get to play with various edgefinders in Lab 3 using Matlab’s built-in edgedemo

Some neat image rec/computer vision demos using the kinect: Some neat image rec/computer vision demos using the kinect: 8A&feature=mfu_in_order&list=UL 8A&feature=mfu_in_order&list=UL 8A&feature=mfu_in_order&list=UL 8A&feature=mfu_in_order&list=UL fulfills-its-minority-report-destiny-video/ fulfills-its-minority-report-destiny-video/ fulfills-its-minority-report-destiny-video/ fulfills-its-minority-report-destiny-video/