Digital Image Processing. Image Enhancement - Filtering

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

Lecture 7: Most Common Edge Detectors

Neighborhood operations

Edge Detection Lecture 03 Computer Vision

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

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

Local Image preprocessing (cont d)

Lecture 6: Edge Detection

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

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

Biometrics Technology: Image Processing & Pattern Recognition (by Dr. Dickson Tong)

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

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

Comparison between Various Edge Detection Methods on Satellite Image

EE795: Computer Vision and Intelligent Systems

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

Prof. Feng Liu. Winter /15/2019

Digital Image Processing COSC 6380/4393

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

Image Processing. Traitement d images. Yuliya Tarabalka Tel.

SYDE 575: Introduction to Image Processing

Biomedical Image Analysis. Point, Edge and Line Detection

Lecture 4: Image Processing

Edge Detection CSC 767

Image Processing

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

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

Chapter 3: Intensity Transformations and Spatial Filtering

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

Line, edge, blob and corner detection

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

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

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

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

Image Enhancement in Spatial Domain (Chapter 3)

Concepts in. Edge Detection

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

Digital Image Processing

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

Practical Image and Video Processing Using MATLAB

Filtering and Enhancing Images

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

EECS490: Digital Image Processing. Lecture #19

Other Linear Filters CS 211A

CS5670: Computer Vision

2D Image Processing INFORMATIK. Kaiserlautern University. DFKI Deutsches Forschungszentrum für Künstliche Intelligenz

Topic 4 Image Segmentation

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

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

Image gradients and edges April 11 th, 2017

Image gradients and edges April 10 th, 2018

Image processing. Reading. What is an image? Brian Curless CSE 457 Spring 2017

EEM 463 Introduction to Image Processing. Week 3: Intensity Transformations

DIGITAL IMAGE PROCESSING

Segmentation and Grouping

What will we learn? Neighborhood processing. Convolution and correlation. Neighborhood processing. Chapter 10 Neighborhood Processing

Sharpening through spatial filtering

3.4& Fundamentals& mechanics of spatial filtering(page 166) Spatial filter(mask) Filter coefficients Filter response

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

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

Image Analysis. Edge Detection

Filtering Images. Contents

Concepts in. Edge Detection

Edge Detection (with a sidelight introduction to linear, associative operators). Images

CS4670: Computer Vision Noah Snavely

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

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

Lecture: Edge Detection

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

Edge and corner detection

CHAPTER 4 EDGE DETECTION TECHNIQUE

Image gradients and edges

Anno accademico 2006/2007. Davide Migliore

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

Babu Madhav Institute of Information Technology Years Integrated M.Sc.(IT)(Semester - 7)

Evaluation Of Image Detection Techniques

5. Feature Extraction from Images

SRCEM, Banmore(M.P.), India

Edge detection. Gradient-based edge operators

Lecture 4: Spatial Domain Transformations

EDGE BASED REGION GROWING

Sobel Edge Detection Algorithm

AN EFFICIENT APPROACH FOR IMPROVING CANNY EDGE DETECTION ALGORITHM

Vivekananda. Collegee of Engineering & Technology. Question and Answers on 10CS762 /10IS762 UNIT- 5 : IMAGE ENHANCEMENT.

Review of Filtering. Filtering in frequency domain

Performance Evaluation of Edge Detection Techniques for Images in Spatial Domain

Image Analysis. Edge Detection

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

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

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

Linear Operations Using Masks

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

Feature Detectors - Canny Edge Detector

Classification of image operations. Image enhancement (GW-Ch. 3) Point operations. Neighbourhood operation

Solution: filter the image, then subsample F 1 F 2. subsample blur subsample. blur

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

Point Operations and Spatial Filtering

Digital Image Processing. Image Enhancement in the Spatial Domain (Chapter 4)

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

C E N T E R A T H O U S T O N S C H O O L of H E A L T H I N F O R M A T I O N S C I E N C E S. Image Operations II

Transcription:

Digital Image Processing Image Enhancement - Filtering

Derivative Derivative is defined as a rate of change.

Discrete Derivative Finite Distance

Example

Derivatives in 2-dimension

Derivatives of Images

Derivatives of Images

Correlation

Convolution

Averages

Gaussian Filtering The Gaussian smoothing operator is a 2- D convolution operator that is used to `blur' images and remove detail and noise. In this sense it is similar to the mean filter, but it uses a different kernel that represents the shape of a Gaussian (`bell-shaped') hump. 2D Gaussian Shape of Impulse Response for Gaussian Filter

Scale of Gaussian As sigma increases, more pixels are involved in averaging As sigma increase, image is more blurred As sigma increase, noise is more effectively suppressed

Gaussian Filter Consider sigma = 0.6 and kernel size = 3x3

Gaussian Smoothing Kernel width; X= 3, Kernel Height; Y = 3 The Gaussian kernel's center part ( Here 0.4421 ) has the highest value and intensity of other pixels decrease as the distance from the center part increases.

Gaussian Smoothing The Gaussian kernel takes the form as: Convolve the kernel with the region in the given image

Gaussian Smoothing Performing Convolution: On convolution of the local region and the Gaussian kernel gives the highest intensity value to the center part of the local region (38.4624) and the remaining pixels have less intensity as the distance from the center increases. Sum up the result and store it in the current pixel location (Intensity = 94.9269) of the image.

Gaussian Smoothing Performing calculations for each pixel, the resultant image is:

Edge Detection Edge detection is an image processing technique for finding the boundaries of objects within images. It works by detecting discontinuities in brightness. Edge detection is used for image segmentation and data extraction in areas such as image processing, computer vision, and machine vision.

Edge Detectors Gradient Operators Robert Cross Prewit Sobel Gradient of Gaussian (Canny) Laplacian of Gaussian (LoG) (Marr-Hildreth)

Computing Efficiency of Edge Detection Algorithms

Spatial Filtering for Image Sharpening Background: to highlight fine detail in an image or to enhance blurred detail Applications: electronic printing, medical imaging, industrial inspection, autonomous target detection (smart weapons)... Foundation (Blurring vs Sharpening): Blurring/smoothing is performed by spatial averaging (equivalent to integration) Sharpening is performed by noting only the gray level changes in the image that is the differentiation

Spatial Filtering for Image Sharpening Operation of Image Differentiation Enhance edges and discontinuities (magnitude of output gray level >>0) De-emphasize areas with slowly varying gray-level values (output gray level: 0) Mathematical Basis of Filtering for Image Sharpening First-order and second-order derivatives Gradients Implementation by mask filtering

Derivatives First Order Derivative A basic definition of the first-order derivative of a onedimensional function f(x) is the difference f x f ( x 1) f ( x) Second Order Derivative Ssimilarly, we define the second-order derivative of a one-dimensional function f(x) is the difference 2 f 2 x f ( x 1) f ( x 1) 2 f ( x)

First and Second Order Derivatives

Comparison between f" and f f generally produces thicker edges in an image f" has a stronger response to fine detail f generally has a stronger response to a gray-level step f" produces a double response at step changes in gray level For image enhancement, f" is generally better suited than f Major application of f is for edge extraction; f used together with f" results in impressive enhancement effect

Matlab Functions for Filters

Image Gradient An image gradient is a directional change in the intensity or color in an image. The gradient of the image is one of the fundamental building blocks in image processing. For example the Canny edge detector uses image gradient for edge detection.

Edge Detection What is an edge? An abrupt or sudden change in intensity value Discontinuity of intensities in the image Edge Models Step Roof Ramp Spike

Example for Discrete Derivatives

Example for Discrete Derivatives

1 st and 2 nd Order Derivatives

Laplacian for Image Enhancement

Laplacian for Image Enhancement

Laplacian for Image Enhancement

Laplacian for Image Enhancement (Example)

Image Sharpening Based on Unsharp Masking

1st Derivative Filtering Implementing 1st derivative filters is difficult in practice For a function f (x, y) the gradient of f at coordinates (x, y) is given as the column vector: f G G x y f f x y

1st Derivative Filtering (cont ) The magnitude of this vector is given by: f mag( f ) 1 2 2 G 2 x G y f x For practical reasons this can be simplified as: 2 f y 2 1 2 f G x G y

1st Derivative Filtering (cont ) Now we want to define digital approximations and their Filter Masks For simplicity we use a 3x3 region For example z 5 denotes f(x,y), z 1 denotes f(x-1,y-1) A simple approximation for First Derivative is z 1 z 2 z 3 z 4 z 5 z 6 z 7 z 8 z 9

1st Derivative Filtering (cont ) A simple approximation for First Derivative is Two other definitions proposed by Roberts use cross- difference If we use z 1 z 2 z 3 z 4 z 5 z 6 z 7 z 8 z 9

Gradient Operators

1st Derivative Filtering (cont ) If we use absolute values then z 1 z 2 z 3 z 4 z 5 z 6 The Masks corresponding to these equations are: z 7 z 8 z 9 Roberts Cross-Gradient Operators

Gradient Operators Normally the smallest mask used is of size 3 x 3 Based on the concept of approximating the gradient several spatial masks have been proposed:

Gradient Operators

Gradient Processing (Example)

NOTE The summation of coefficients in all masks equals 0, indicating that they would give a response of 0 in an area of constant gray level.

Mask used to estimate the Gradient

Canny Edge Detection The Canny edge detector is an edge detection operator that uses a multistage algorithm to detect a wide range of edges in images. It was developed by John F. Canny in 1986.

Canny Edge Detection The Process of Canny edge detection algorithm can be broken down to 5 different steps: Apply Gaussian filter to smooth the image in order to remove the noise Find the intensity gradients of the image Apply non-maximum suppression to get rid of spurious response to edge detection Apply double threshold to determine potential edges Track edge by hysteresis: Finalize the detection of edges by suppressing all the other edges that are weak and not connected to strong edges.

Non-Maximum Suppression Non-maximum suppression is an edge thinning technique. Non-Maximum suppression is applied to "thin" the edge. Compare the edge strength of the current pixel with the edge strength of the pixel in the positive and negative gradient directions. If the edge strength of the current pixel is the largest compared to the other pixels in the mask with the same direction (i.e., the pixel that is pointing in the y direction, it will be compared to the pixel above and below it in the vertical axis), the value will be preserved. Otherwise, the value will be suppressed.

Double Threshold After application of non-maximum suppression, remaining edge pixels provide a more accurate representation of real edges in an image. However, some edge pixels remain that are caused by noise and color variation. Filter out edge pixels with a weak gradient value and preserve edge pixels with a high gradient value. This is accomplished by selecting high and low threshold values. If an edge pixel s gradient value is higher than the high threshold value, it is marked as a strong edge pixel. If an edge pixel s gradient value is smaller than the high threshold value and larger than the low threshold value, it is marked as a weak edge pixel. If an edge pixel's value is smaller than the low threshold value, it will be suppressed. The two threshold values will depend on the content of a given input image.

Edge tracking by hysteresis Usually a weak edge pixel caused from true edges will be connected to a strong edge pixel while noise responses are unconnected. To track the edge connection, blob analysis is applied by looking at a weak edge pixel and its 8- connected neighborhood pixels. As long as there is one strong edge pixel that is involved in the blob, that weak edge point can be identified as one that should be preserved.

Matlab command BW = edge(i) BW = edge(i,'sobel') BW = edge(i,'sobel',threshold) BW = edge(i,'prewitt') BW = edge(i,'prewitt',threshold) BW = edge(i,'roberts') BW = edge(i,'roberts',threshold) W = edge(i,'canny') BW = edge(i,'canny',threshold)

End of Lecture