Neighborhood operations

Similar documents
Digital Image Processing. Image Enhancement - Filtering

Image Processing. Traitement d images. Yuliya Tarabalka Tel.

Edge detection. Stefano Ferrari. Università degli Studi di Milano Elaborazione delle immagini (Image processing I)

Biomedical Image Analysis. Point, Edge and Line Detection

CS334: Digital Imaging and Multimedia Edges and Contours. Ahmed Elgammal Dept. of Computer Science Rutgers University

Edge Detection Lecture 03 Computer Vision

Filtering Images. Contents

SURVEY ON IMAGE PROCESSING IN THE FIELD OF DE-NOISING TECHNIQUES AND EDGE DETECTION TECHNIQUES ON RADIOGRAPHIC IMAGES

Comparison between Various Edge Detection Methods on Satellite Image

Other Linear Filters CS 211A

CS534: Introduction to Computer Vision Edges and Contours. Ahmed Elgammal Dept. of Computer Science Rutgers University

Edge detection. Gradient-based edge operators

Lecture 7: Most Common Edge Detectors

CS 4495 Computer Vision. Linear Filtering 2: Templates, Edges. Aaron Bobick. School of Interactive Computing. Templates/Edges

PERFORMANCE ANALYSIS OF CANNY AND OTHER COMMONLY USED EDGE DETECTORS Sandeep Dhawan Director of Technology, OTTE, NEW YORK

Performance Evaluation of Edge Detection Techniques for Images in Spatial Domain

Edge Detection. CSE 576 Ali Farhadi. Many slides from Steve Seitz and Larry Zitnick

Lecture 6: Edge Detection

Linear Operations Using Masks

Ulrik Söderström 16 Feb Image Processing. Segmentation

Announcements. Edge Detection. An Isotropic Gaussian. Filters are templates. Assignment 2 on tracking due this Friday Midterm: Tuesday, May 3.

Lecture: Edge Detection

Edge Detection. Today s reading. Cipolla & Gee on edge detection (available online) From Sandlot Science

Edge detection. Convert a 2D image into a set of curves. Extracts salient features of the scene More compact than pixels

Local Image preprocessing (cont d)

Digital Image Procesing

Image Processing. BITS Pilani. Dr Jagadish Nayak. Dubai Campus

Image Analysis. Edge Detection

EECS490: Digital Image Processing. Lecture #19

Image Processing

convolution shift invariant linear system Fourier Transform Aliasing and sampling scale representation edge detection corner detection

Image Analysis. Edge Detection

Anno accademico 2006/2007. Davide Migliore

Digital Image Processing COSC 6380/4393

Topic 4 Image Segmentation

Concepts in. Edge Detection

What is an edge? Paint. Depth discontinuity. Material change. Texture boundary

Feature Detectors - Sobel Edge Detector

Edge detection. Goal: Identify sudden. an image. Ideal: artist s line drawing. object-level knowledge)

Filtering and Enhancing Images

Line, edge, blob and corner detection

Image features. Image Features

Practical Image and Video Processing Using MATLAB

Edge Detection. CSC320: Introduction to Visual Computing Michael Guerzhoy. René Magritte, Decalcomania. Many slides from Derek Hoiem, Robert Collins

Edge Detection. CMPUT 206: Introduction to Digital Image Processing. Nilanjan Ray. Source:

SECTION 5 IMAGE PROCESSING 2

Edge Detection. Announcements. Edge detection. Origin of Edges. Mailing list: you should have received messages

An Algorithm for Blurred Thermal image edge enhancement for security by image processing technique

An Improved Approach for Digital Image Edge Detection Mahbubun Nahar 1, Md. Sujan Ali 2

SRCEM, Banmore(M.P.), India

Image Segmentation Image Thresholds Edge-detection Edge-detection, the 1 st derivative Edge-detection, the 2 nd derivative Horizontal Edges Vertical

EDGE BASED REGION GROWING

Lecture 4: Image Processing

Concepts in. Edge Detection

Edge and Texture. CS 554 Computer Vision Pinar Duygulu Bilkent University

Multimedia Computing: Algorithms, Systems, and Applications: Edge Detection

Computer Vision I. Announcement. Corners. Edges. Numerical Derivatives f(x) Edge and Corner Detection. CSE252A Lecture 11

Evaluation Of Image Detection Techniques

Filtering and Edge Detection. Computer Vision I. CSE252A Lecture 10. Announcement

Segmentation and Grouping

CS5670: Computer Vision

EDGE DETECTION-APPLICATION OF (FIRST AND SECOND) ORDER DERIVATIVE IN IMAGE PROCESSING

What Are Edges? Lecture 5: Gradients and Edge Detection. Boundaries of objects. Boundaries of Lighting. Types of Edges (1D Profiles)

Outlines. Medical Image Processing Using Transforms. 4. Transform in image space

Design of Improved Canny Edge Detection Algorithm

A Robust Method for Circle / Ellipse Extraction Based Canny Edge Detection

Edge Detection. Ziv Yaniv School of Engineering and Computer Science The Hebrew University, Jerusalem, Israel.

the most common approach for detecting meaningful discontinuities in gray level. we discuss approaches for implementing

REVIEW PAPER ON IMAGE EDGE DETECTION ALGORITHMS FOR SEGMENTATION

Algorithms for Edge Detection and Enhancement for Real Time Images: A Comparative Study

Feature Detectors - Canny Edge Detector

Image Understanding Edge Detection

Edges and Binary Images

Noise Model. Important Noise Probability Density Functions (Cont.) Important Noise Probability Density Functions

DIGITAL IMAGE PROCESSING

EN1610 Image Understanding Lab # 3: Edges

Edge Detection. CS664 Computer Vision. 3. Edges. Several Causes of Edges. Detecting Edges. Finite Differences. The Gradient

Review of Filtering. Filtering in frequency domain

CS4670: Computer Vision Noah Snavely

Detection of Edges Using Mathematical Morphological Operators

Edge Detection CSC 767

Image gradients and edges

Edge and local feature detection - 2. Importance of edge detection in computer vision

Edge Detection. EE/CSE 576 Linda Shapiro

A Comparative Assessment of the Performances of Different Edge Detection Operator using Harris Corner Detection Method

Vehicle Image Classification using Image Fusion at Pixel Level based on Edge Image

ME/CS 132: Introduction to Vision-based Robot Navigation! Low-level Image Processing" Larry Matthies"

Computer Vision I. Announcements. Fourier Tansform. Efficient Implementation. Edge and Corner Detection. CSE252A Lecture 13.

SYDE 575: Introduction to Image Processing

EECS490: Digital Image Processing. Lecture #20

Comparative Analysis of Various Edge Detection Techniques in Biometric Application

Digital Image Processing. Prof. P. K. Biswas. Department of Electronic & Electrical Communication Engineering

5. Feature Extraction from Images

Prof. Feng Liu. Winter /15/2019

Filtering Applications & Edge Detection. GV12/3072 Image Processing.

Edge detection. Winter in Kraków photographed by Marcin Ryczek

SIMULATIVE ANALYSIS OF EDGE DETECTION OPERATORS AS APPLIED FOR ROAD IMAGES

Implementation of Pipelined Canny Edge Detection Algorithm

Perception. Autonomous Mobile Robots. Sensors Vision Uncertainties, Line extraction from laser scans. Autonomous Systems Lab. Zürich.

EE795: Computer Vision and Intelligent Systems

Transcription:

Neighborhood operations Generate an output pixel on the basis of the pixel and its neighbors Often involve the convolution of an image with a filter kernel or mask g ( i, j) = f h = f ( i m, j n) h( m, n) m n //example: for a 3x3 kernel for r=1:h for c=1:w // for each feasible points in the image temp=0.0; for m=-1:1 for n=-1:1 temp=temp+f(r-m,c-n)*h(m,n); end end g(r,c)=temp; end end computational cost, order of mxnxwxh for an image WxH D. Vernon; Machine Vision : Automated Visual Inspection and Robot Vision, Prentice Hall, 1991

Esample: noise suppression Assuming (usually correctl that the noise has a high spatial frequency Apply a low-pass spatial filter Of course high-frequencies in the image will be degraded after filtering 101*1/ 9 + 100*1/ 9 + 103*1/ 9 + 110*1/ 9 + 140*1/ 9 + 10*1/ 9 + 134*1/ 9 + 134*1/ 9 + 135*1/ 9

Gaussian smoothing The image is convolved with a Gaussian function 1 ( x + y )/ σ G( x, = e πσ σ defines the spread of the function smallσ narrow gaussian largeσ broad gaussian from: http://www.cee.hw.ac.uk/hipr/html/gsmooth.html

Why smooth with a Gaussian? (1) The Gaussian filter has nice properties in the frequency domain:

Why smooth with a Gaussian? () Convolving a Guassian with a Gaussian, gives a Gaussian: G G = G σ σ 1 σ 1 + σ it is possible to obtain heavily smoothed images by resmoothing smoothed images

Why smooth with a Gaussian? (3) Filtering with a D Gaussian can be separated in two convolutions with one dimensional Gaussian function: x + y x y 1 1 1 σ σ σ πσ πσ πσ G = e = e e σ

Why smooth with a Gaussian? (3) Filtering with a D Gaussian can be separated in two convolutions with one dimensional Gaussian function: x + y x y 1 1 1 σ σ σ πσ πσ πσ G = e = e e σ g ( i, j ) = f g = g ( m, n ) f ( i m, j n ) = m + n σ = e f ( i m, j n ) = m n m n

m σ σ = e e f ( i m, j n ) = m m σ = e h ( i m, j) m n n convolve with a vertical 1D Gaussian convolve the result with an horizontal 1D Gaussian Convolving with a separable filter is the same as convolving with two 1D kernels, but faster: nxhxw + mxhxw operations, instead of nxmxhxw

Example Above: images corrupted by normally distributed additive noise (std 5,10,15,0) Below: smoothing with a gaussian filter 10x10 std=3

Median Filter Non linear technique, useful for noise supression In one dimension: slide a window of an odd number of pixel replace the center pixel with the median within the window The median of a discrete sequence of N (odd) elements is the number so that (N-1)/ elements are smaller or equal in value and (N-1)/ elements are larger or equal in value In practice: sort the pixels and pick the value in the middle

Median Filter Non linear technique, useful for noise supression In one dimension: slide a window of an odd number of pixel replace the center pixel with the median within the window The median of a discrete sequence of N (odd) elements is the number so that (N-1)/ elements are smaller or equal in value and (N-1)/ elements are larger or equal in value In practice: sort the pixels and pick the value in the middle

W.K.Pratt, Digital Image Processing

Edge detection It is an example of feature extraction Edges correspond to abrupt changes of luminous intensity in the image They usually correspond to discontinuities in the visual scene, due to illumination, object surface or material object boundaries Estimate the gradient of the image: = y f x f y x f, ), ( The rate of change of the image is maximum along the direction: With magnitude: = x f y f arctan ϑ ), ( + = = y f x f y x g f

Simplest way to estimate the derivatives: f x = f f ( x + 1, f ( x,, = f ( x, y + 1) f ( x, y Another approach (Roberts) compute the derivatives diagonally over a x region: [ ] [ ] g( x, R( x, = f ( x + 1, y + 1) f ( x, + f ( x + 1, f ( x, y + 1) First differences are sensitive to noise, a better approach is to combine differencing with local averaging. For example Sobel operator: S y S x = [ f ( x 1, y + 1) + f ( x, y + 1) + f ( x + 1, y + 1) ] [ f ( x 1, y 1) + f ( x, y 1) + f ( x + 1, y 1) ] = [ f ( x + 1, y 1) + f ( x + 1, + f ( x + 1, y + 1) ] [ f ( x 1, y 1) + f ( x 1, + f ( x 1, y + 1) ] Takes the difference of a weighted average of the image intensity of either sides of f(x, g( x, S or : g( x, = x + S S x y + S y

Edge operators can be represented as convolution kernels: a) Roberts b) Prewitt c) Sobel

Once the gradient magnitude has been estimated, decide if an edge is present or not based on a threshold: edge( x, = 0 if g( x, < t 1 otherwise original image (rice.tif) Roberts (th=0.13) Prewitt (th=0.09) Sobel (th=0.09) I = imread('rice.tif'); erob= edge(i, roberts ); epre = edge(i,'prewitt'); esob = edge(i, sobel'); figure(1), imshow(erob) figure(), imshow(epre) figure(3), imshow(esob)

Laplacian Alternative method, computes the Laplacian: f f ( x, = x Approximation: f, y 1d: f (x+1)=f(x+1)-f(x), f (x)=f(x)-f(x-1) f (x)=f (x+1)-f (x) d: convolve with kernels: f(x) f (x) f (x) 0-1 0-1 4-1 0-1 0 or -1-1 -1-1 8-1 -1-1 -1 Zero response to linear ramps (gradual changes in intensit, respond to either sides of edges (+/-) detect edges as zero crossing Drawback strong response to noise First convolve with a Gaussian (Marr and Hildreth)

The Laplacian operator has some nice properties: { I( x, G( x, } = G( x, I( x, G( x, is also called LoG (Laplacian of Gaussian) http://homepages.inf.ed.ac.uk/rbf/hipr/log.htm Discrete approximation of a LoG (std=1.4) To recap the Laplacian is: zero distant from the edge > 0 just before the edge zero in between the edge < 0 after the edge f(x) f (x) f (x)

More on the LoG (useful things to know) The two dimensional convolution can be separated into four onedimensional convolution: { I( x, G( x, } = G( x) I( x, G( + G( I( x, G( x) The LoG can be approximated as: y x g ( x, g( x, = Gσ f ( x, G f ( x, = 1 σ σ1 σ ( G G ) f ( x, = DoG f ( x, ) 1 y σ 1 > σ 0.08 0.06 σ 0.04 σ 1 0.0 0-0.0-0.04 0 5 10 15 0 5 30 35 40 45 50

Canny Edge Detector (1986) Problem of the edge detectors: produce large edges, sometimes edges are not connected because of noise Smooth with a Gaussian, then apply Sobel Thin edges, non-maxima suppression: Edge is found if a) response exceeds a given threshold and b) it is not dominated by responses at neighboring points in a direction normal to the candidate edge the edge must be higher than the edge magnitude of the pixels on either side f(x) f (x)

Canny Edge () Extends weak edges: Hysteresis controlled by two thresholds T1 > T; all pixels above T1 are marked as edge; then all pixels connected to these edges whose value is above T will be selected as edge (avoid dashed edges )

original image (rice.tif) Sobel (th=0.09) Canny