Review: Linear Systems

Slides:



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

Lecture 2: Convolution and edge detection CS4670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Edge and Corner Detection Reading: Chapter 8 (skip 8.1) Goal: Identify sudden changes (discontinuities) in an image This is where most shape information.
Edge Detection. Our goal is to extract a “line drawing” representation from an image Useful for recognition: edges contain shape information –invariance.
EE663 Image Processing Edge Detection 1
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
Computer Vision Group Edge Detection Giacomo Boracchi 5/12/2007
Edge detection. Edge Detection in Images Finding the contour of objects in a scene.
Announcements Mailing list: –you should have received messages Project 1 out today (due in two weeks)
Computer Vision - A Modern Approach
Edge Detection Today’s reading Forsyth, chapters 8, 15.1
Filters and Edges. Zebra convolved with Leopard.
Lecture 2: Image filtering
Announcements Since Thursday we’ve been discussing chapters 7 and 8. “matlab can be used off campus by logging into your wam account and bringing up an.
Edge Detection Today’s readings Cipolla and Gee –supplemental: Forsyth, chapter 9Forsyth Watt, From Sandlot ScienceSandlot Science.
Edge Detection.
Computer Vision P. Schrater Spring 2003
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.
CS559: Computer Graphics Lecture 3: Digital Image Representation Li Zhang Spring 2008.
Discrete Images (Chapter 7) Fourier Transform on discrete and bounded domains. Given an image: 1.Zero boundary condition 2.Periodic boundary condition.
Lecture 2: Edge detection CS4670: Computer Vision Noah Snavely From Sandlot ScienceSandlot Science.
Edge Detection Today’s reading Cipolla & Gee on edge detection (available online)Cipolla & Gee on edge detection From Sandlot ScienceSandlot Science.
Edge Detection Today’s reading Cipolla & Gee on edge detection (available online)Cipolla & Gee on edge detection Szeliski, Ch 4.1.2, From Sandlot.
Instructor: S. Narasimhan
CS654: Digital Image Analysis Lecture 24: Introduction to Image Segmentation: Edge Detection Slide credits: Derek Hoiem, Lana Lazebnik, Steve Seitz, David.
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
CSE 185 Introduction to Computer Vision Edges. Scale space Reading: Chapter 3 of S.
EE 4780 Edge Detection.
Many slides from Steve Seitz and Larry Zitnick
Computer Vision - A Modern Approach Set: Linear Filters Slides by D.A. Forsyth Gradients and edges Points of sharp change in an image are interesting:
Edge Detection and Geometric Primitive Extraction Jinxiang Chai.
Edges.
Brent M. Dingle, Ph.D Game Design and Development Program Mathematics, Statistics and Computer Science University of Wisconsin - Stout Edge Detection.
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.
Announcements Project 0 due tomorrow night. Edge Detection Today’s readings Cipolla and Gee (handout) –supplemental: Forsyth, chapter 9Forsyth For Friday.
Instructor: Mircea Nicolescu Lecture 5 CS 485 / 685 Computer Vision.
Lecture 8: Edges and Feature Detection
Last Lecture photomatix.com. Today Image Processing: from basic concepts to latest techniques Filtering Edge detection Re-sampling and aliasing Image.
Finding Boundaries Computer Vision CS 143, Brown James Hays 09/28/11 Many slides from Lana Lazebnik, Steve Seitz, David Forsyth, David Lowe, Fei-Fei Li,
Edges Edges = jumps in brightness/color Brightness jumps marked in white.
EE 4780: Introduction to Computer Vision Linear Systems.
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.
Miguel Tavares Coimbra
Edge Detection slides taken and adapted from public websites:
Digital Image Processing Lecture 16: Segmentation: Detection of Discontinuities Prof. Charlene Tsai.
Linear Filters and Edges Chapters 7 and 8
EE 4780 Matlab tutorial.
Image gradients and edges
Edge Detection CS 678 Spring 2018.
Lecture 2: Edge detection
Jeremy Bolton, PhD Assistant Teaching Professor
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Dr. Chang Shu COMP 4900C Winter 2008
Filters (Smoothing, Edge Detection)
Edge Detection Today’s reading
Edge Detection CSE 455 Linda Shapiro.
Edge Detection Today’s reading
Lecture 2: Edge detection
Edge Detection Today’s reading
CS 565 Computer Vision Nazar Khan Lecture 9.
Edge Detection Today’s readings Cipolla and Gee Watt,
Lecture 2: Edge detection
Winter in Kraków photographed by Marcin Ryczek
IT472 Digital Image Processing
IT472 Digital Image Processing
Edge detection Goal: Identify sudden changes (discontinuities) in an image Intuitively, most semantic and shape information from the image can be encoded.
Presentation transcript:

Review: Linear Systems We define a system as a unit that converts an input function into an output function. Independent variable System operator Bahadir K. Gunturk

Linear Systems Let where fi(x) is an arbitrary input in the class of all inputs {f(x)}, and gi(x) is the corresponding output. If Then the system H is called a linear system. A linear system has the properties of additivity and homogeneity. Bahadir K. Gunturk

Linear Systems The system H is called shift invariant if for all fi(x) {f(x)} and for all x0. This means that offsetting the independent variable of the input by x0 causes the same offset in the independent variable of the output. Hence, the input-output relationship remains the same. Bahadir K. Gunturk

Linear Systems The operator H is said to be causal, and hence the system described by H is a causal system, if there is no output before there is an input. In other words, A linear system H is said to be stable if its response to any bounded input is bounded. That is, if where K and c are constants. Bahadir K. Gunturk

Linear Systems (x-a) (a) A unit impulse function, denoted (a), is defined by the expression (x-a) (a) a x Bahadir K. Gunturk

Linear Systems A unit impulse function, denoted (a), is defined by the expression Then Bahadir K. Gunturk

Linear Systems The term is called the impulse response of H. From the previous slide It states that, if the response of H to a unit impulse [i.e., h(x, )], is known, then response to any input f can be computed using the preceding integral. In other words, the response of a linear system is characterized completely by its impulse response. Bahadir K. Gunturk

Linear Systems If H is a shift-invariant system, then and the integral becomes This expression is called the convolution integral. It states that the response of a linear, fixed-parameter system is completely characterized by the convolution of the input with the system impulse response. Bahadir K. Gunturk

Linear Systems Convolution of two functions is defined as In the discrete case Bahadir K. Gunturk

Linear Systems In the 2D discrete case is a linear filter. Bahadir K. Gunturk

Convolution Example 1 -1 2 2 3 1 1 -1 2 h f Rotate From C. Rasmussen, U. of Delaware Bahadir K. Gunturk

Convolution Example Step 1 1 1 1 2 2 2 3 -1 2 1 2 1 3 3 -1 -1 1 2 2 1 h 1 3 2 2 1 1 1 -1 3 2 1 4 2 5 -1 -2 1 f f*h From C. Rasmussen, U. of Delaware Bahadir K. Gunturk

Convolution Example Step 2 1 1 1 2 2 2 3 -1 2 1 2 1 3 3 -1 -1 1 2 2 1 h 1 3 2 2 1 1 1 3 2 1 -2 4 2 5 4 -2 -1 3 f f*h From C. Rasmussen, U. of Delaware Bahadir K. Gunturk

Convolution Example Step 3 1 1 1 2 2 2 3 -1 2 1 2 1 3 3 -1 -1 1 2 2 1 h 1 3 2 2 1 1 1 3 2 1 -2 4 3 4 5 -1 -3 3 f f*h From C. Rasmussen, U. of Delaware Bahadir K. Gunturk

Convolution Example Step 4 1 1 1 2 2 2 3 -1 2 1 2 1 3 3 -1 -1 1 2 2 1 h 1 3 2 2 1 1 1 3 2 1 -2 6 1 4 -2 5 -3 -3 1 f f*h From C. Rasmussen, U. of Delaware Bahadir K. Gunturk

Convolution Example Step 5 1 1 1 2 2 2 3 -1 2 1 2 1 3 3 -1 -1 1 2 2 1 h 1 3 2 2 1 3 2 1 2 2 4 9 -2 5 -1 4 1 -1 -2 2 f f*h From C. Rasmussen, U. of Delaware Bahadir K. Gunturk

Convolution Example Step 6 1 1 1 2 2 2 3 -1 2 1 2 1 3 3 -1 -1 1 2 2 1 h 1 3 2 2 2 3 2 1 2 2 6 4 9 -2 5 -2 2 3 -2 -2 1 f f*h From C. Rasmussen, U. of Delaware Bahadir K. Gunturk

and so on… Convolution Example From C. Rasmussen, U. of Delaware Bahadir K. Gunturk

Example = * Bahadir K. Gunturk

Example = * Bahadir K. Gunturk

MATLAB Review your matrix-vector knowledge Matlab help files are helpful to learn it Exercise: f = [1 2; 3 4] g = [1; 1] g = [1 1] g’ z = f * g’ n=0:10 plot(sin(n)); plot(n,sin(n)); title(‘Sinusoid’); xlabel(‘n’); ylabel(‘Sin(n)’); n=0:0.1:10 plot(n,sin(n)); grid; figure; subplot(2,1,1); plot(n,sin(n)); subplot(2,1,2); plot(n,cos(n)); Bahadir K. Gunturk

MATLAB Some more built-ins a = zeros(3,2) b = ones(2,4) c = rand(3,3) %Uniform distribution help rand help randn %Normal distribution d1 = inv(c) d2 = inv(rand(3,3)) d3 = d1+d2 d4 = d1-d2 d5 = d1*d2 d6 = d1.*d3 e = d6(:) Bahadir K. Gunturk

MATLAB Image processing in Matlab x=imread(‘cameraman.tif’); figure; imshow(x); [h,w]=size(x); y=x(0:h/2,0:w/2); imwrite(y,’man.tif’); % To look for a keyword lookfor resize Bahadir K. Gunturk

MATLAB M-file Save the following as myresize1.m function [y]=myresize1(x) % This function downsamples an image by two [h,w]=size(x); for i=1:h/2, for j=1:w/2, y(i,j) = x(2*i,2*j); end Compare with myresize2.m function [y]=myresize2(x) for i=0:h/2-1, for j=0:w/2-1, y(i+1,j+1) = x(2*i+1,2*j+1); Compare with myresize3.m function [y]=myresize3(x) % This function downsamples an image by two y = x(1:2:end,1:2:end); We can add inputs/outputs function [y,height,width]=myresize4(x,factor) % Inputs: % x is the input image % factor is the downsampling factor % Outputs: % y is the output image % height and width are the size of the output image y = x(1:factor:end,1:factor:end); [height,width] = size(y); Bahadir K. Gunturk

Try MATLAB f=imread(‘saturn.tif’); figure; imshow(f); [height,width]=size(f); f2=f(1:height/2,1:width/2); figure; imshow(f2); [height2,width2=size(f2); f3=double(f2)+30*rand(height2,width2); figure;imshow(uint8(f3)); h=[1 1 1 1; 1 1 1 1; 1 1 1 1; 1 1 1 1]/16; g=conv2(f3,h); figure;imshow(uint8(g)); Bahadir K. Gunturk

EE 7730 Edge Detection

Detection of Discontinuities Matched Filter Example >> a=[0 0 0 0 1 2 3 0 0 0 0 2 2 2 0 0 0 0 1 2 -2 -1 0 0 0 0]; >> figure; plot(a); >> h1 = [-1 -2 2 1]/10; >> b1 = conv(a,h1); figure; plot(b1); Bahadir K. Gunturk

Detection of Discontinuities Point Detection Example: Apply a high-pass filter. A point is detected if the response is larger than a positive threshold. The idea is that the gray level of an isolated point will be quite different from the gray level of its neighbors. Threshold Bahadir K. Gunturk

Detection of Discontinuities Point Detection Detected point Bahadir K. Gunturk

Detection of Discontinuities Line Detection Example: Bahadir K. Gunturk

Detection of Discontinuities Line Detection Example: Bahadir K. Gunturk

Detection of Discontinuities Edge Detection: An edge is the boundary between two regions with relatively distinct gray levels. Edge detection is by far the most common approach for detecting meaningful discontinuities in gray level. The reason is that isolated points and thin lines are not frequent occurrences in most practical applications. The idea underlying most edge detection techniques is the computation of a local derivative operator. Bahadir K. Gunturk

Origin of Edges Edges are caused by a variety of factors surface normal discontinuity depth discontinuity surface color discontinuity illumination discontinuity Edges are caused by a variety of factors Bahadir K. Gunturk

Profiles of image intensity edges Bahadir K. Gunturk

Image gradient The gradient of an image: The gradient points in the direction of most rapid change in intensity The gradient direction is given by: The edge strength is given by the gradient magnitude Bahadir K. Gunturk

Edge Detection The gradient vector of an image f(x,y) at location (x,y) is the vector The magnitude and direction of the gradient vector are is also used in edge detection in addition to the magnitude of the gradient vector. Bahadir K. Gunturk

The discrete gradient How can we differentiate a digital image f[x,y]? Option 1: reconstruct a continuous image, then take gradient Option 2: take discrete derivative (finite difference) Bahadir K. Gunturk

Effects of noise Consider a single row or column of the image Plotting intensity as a function of position gives a signal Bahadir K. Gunturk

Solution: smooth first Bahadir K. Gunturk Look for peaks in

Derivative theorem of convolution This saves us one operation: Bahadir K. Gunturk

Laplacian of Gaussian Consider Laplacian of Gaussian operator Bahadir K. Gunturk Zero-crossings of bottom graph

2D edge detection filters Laplacian of Gaussian Gaussian derivative of Gaussian is the Laplacian operator: Bahadir K. Gunturk

The Canny edge detector original image (Lena) Bahadir K. Gunturk

The Canny edge detector norm of the gradient Bahadir K. Gunturk

The Canny edge detector thresholding Bahadir K. Gunturk

The Canny edge detector thinning (non-maximum suppression) Bahadir K. Gunturk

Non-maximum suppression Check if pixel is local maximum along gradient direction requires checking interpolated pixels p and r Bahadir K. Gunturk

Predicting the next edge point Assume the marked point is an edge point. Then we construct the tangent to the edge curve (which is normal to the gradient at that point) and use this to predict the next points (here either r or s). Bahadir K. Gunturk

Non-maximum suppression Bahadir K. Gunturk

Hysteresis The threshold used to find starting point may be large in following the edge. This leads to broken edge curves. The trick is to use two thresholds: A large one when starting an edge chain, a small one while following it. Bahadir K. Gunturk

Edge detection by subtraction original Bahadir K. Gunturk

Edge detection by subtraction smoothed (5x5 Gaussian) Bahadir K. Gunturk

Edge detection by subtraction Why does this work? smoothed – original (scaled by 4, offset +128) Bahadir K. Gunturk filter demo

Gaussian - image filter delta function Bahadir K. Gunturk Laplacian of Gaussian

Edge Detection Bahadir K. Gunturk

Edge Detection Bahadir K. Gunturk

Edge Detection Bahadir K. Gunturk

Edge Detection Bahadir K. Gunturk

Edge Detection Bahadir K. Gunturk

Edge Detection The Laplacian of an image f(x,y) is a second-order derivative defined as Bahadir K. Gunturk

Edge Detection Bahadir K. Gunturk

Corners contain more edges than lines. A point on a line is hard to match. Bahadir K. Gunturk

Corners contain more edges than lines. A corner is easier Bahadir K. Gunturk

Corner Detector Locate points where intensity is varying in two directions. Bahadir K. Gunturk

Reading Chris Harris and Mike Stephens. A combined corner and edge detector. In M. M. Matthews, editor, Proceedings of the 4th ALVEY vision conference, pages 147--151, University of Manchester, England, September 1988. Bahadir K. Gunturk