Computer Vision for HCI. Noise Removal. Noise in Images

Similar documents
Digital Image Processing. Digital Image Fundamentals II 12 th June, 2017

Image Filtering. Median Filtering

Image Processing for feature extraction

Filip Malmberg 1TD396 fall 2018 Today s lecture

Practical Image and Video Processing Using MATLAB

CoE4TN4 Image Processing. Chapter 3: Intensity Transformation and Spatial Filtering

Image Processing. Adam Finkelstein Princeton University COS 426, Spring 2019

Midterm is on Thursday!

Table of contents. Vision industrielle 2002/2003. Local and semi-local smoothing. Linear noise filtering: example. Convolution: introduction

Image filtering, image operations. Jana Kosecka

Image Enhancement. DD2423 Image Analysis and Computer Vision. Computational Vision and Active Perception School of Computer Science and Communication

Image restoration and color image processing

Chapter 3 Image Enhancement in the Spatial Domain. Chapter 3 Image Enhancement in the Spatial Domain

Part I Feature Extraction (1) Image Enhancement. CSc I6716 Spring Local, meaningful, detectable parts of the image.

Digital Image Processing

Matlab (see Homework 1: Intro to Matlab) Linear Filters (Reading: 7.1, ) Correlation. Convolution. Linear Filtering (warm-up slide) R ij

Image analysis. CS/CME/BIOPHYS/BMI 279 Fall 2015 Ron Dror

Prof. Feng Liu. Winter /10/2019

Introduction. Computer Vision. CSc I6716 Fall Part I. Image Enhancement. Zhigang Zhu, City College of New York

Lecture 3: Linear Filters

>>> from numpy import random as r >>> I = r.rand(256,256);

Image Enhancement in the Spatial Domain Low and High Pass Filtering

Chapter 6. [6]Preprocessing

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

Digital Image Processing

Image Enhancement contd. An example of low pass filters is:

Color Space 1: RGB Color Space. Color Space 2: HSV. RGB Cube Easy for devices But not perceptual Where do the grays live? Where is hue and saturation?

BSB663 Image Processing Pinar Duygulu. Slides are adapted from Gonzales & Woods, Emmanuel Agu Suleyman Tosun

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Vision Review: Image Processing. Course web page:

8.2 IMAGE PROCESSING VERSUS IMAGE ANALYSIS Image processing: The collection of routines and

CSE 564: Scientific Visualization

CS534 Introduction to Computer Vision. Linear Filters. Ahmed Elgammal Dept. of Computer Science Rutgers University

Removal of Gaussian noise on the image edges using the Prewitt operator and threshold function technical

Sharpening Spatial Filters ( high pass)

LAB MANUAL SUBJECT: IMAGE PROCESSING BE (COMPUTER) SEM VII

Motivation: Image denoising. How can we reduce noise in a photograph?

Image Enhancement in spatial domain. Digital Image Processing GW Chapter 3 from Section (pag 110) Part 2: Filtering in spatial domain

Introduction Approach Work Performed and Results

Motivation: Image denoising. How can we reduce noise in a photograph?

MATLAB 6.5 Image Processing Toolbox Tutorial

Detail preserving impulsive noise removal

>>> from numpy import random as r >>> I = r.rand(256,256);

Achim J. Lilienthal Mobile Robotics and Olfaction Lab, AASS, Örebro University

VLSI Implementation of Impulse Noise Suppression in Images

TDI2131 Digital Image Processing (Week 4) Tutorial 3

Image Denoising Using Statistical and Non Statistical Method

An Adaptive Kernel-Growing Median Filter for High Noise Images. Jacob Laurel. Birmingham, AL, USA. Birmingham, AL, USA

Image Enhancement in the Spatial Domain (Part 1)

CS 445 HW#2 Solutions

DIGITAL IMAGE PROCESSING (COM-3371) Week 2 - January 14, 2002

Image analysis. CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror

Image Capture and Problems

Preparing Remote Sensing Data for Natural Resources Mapping (image enhancement, rectifications )

Image Filtering. Reading Today s Lecture. Reading for Next Time. What would be the result? Some Questions from Last Lecture

Filtering Images in the Spatial Domain Chapter 3b G&W. Ross Whitaker (modified by Guido Gerig) School of Computing University of Utah

Spatially Adaptive Algorithm for Impulse Noise Removal from Color Images

Digital Image Processing

EEL 6562 Image Processing and Computer Vision Box Filter and Laplacian Filter Implementation

What is image enhancement? Point operation

1.Discuss the frequency domain techniques of image enhancement in detail.

Carmen Alonso Montes 23rd-27th November 2015

Analysis of the SUSAN Structure-Preserving Noise-Reduction Algorithm

TIRF, geometric operators

Non Linear Image Enhancement

Image analysis. CS/CME/BioE/Biophys/BMI 279 Oct. 31 and Nov. 2, 2017 Ron Dror

An Efficient Noise Removing Technique Using Mdbut Filter in Images

Images and Filters. EE/CSE 576 Linda Shapiro

DIGITAL IMAGE DE-NOISING FILTERS A COMPREHENSIVE STUDY

Robert Collins CSE486, Penn State. Lecture 3: Linear Operators

Multimedia Systems Giorgio Leonardi A.A Lectures 14-16: Raster images processing and filters

ABSTRACT I. INTRODUCTION

Contrast Image Correction Method

Histogram equalization

Chrominance Assisted Sharpening of Images

Computing for Engineers in Python

Bioimage Informatics

קורס גרפיקה ממוחשבת 2008 סמסטר ב' Image Processing 1 חלק מהשקפים מעובדים משקפים של פרדו דוראנד, טומס פנקהאוסר ודניאל כהן-אור

Checkerboard Tracker for Camera Calibration. Andrew DeKelaita EE368

Image Enhancement in the Spatial Domain

Head, IICT, Indus University, India

IMPLEMENTATION OF CANNY EDGE DETECTION ALGORITHM ON REAL TIME PLATFORM

Image Processing COS 426

Image preprocessing in spatial domain

Transforms and Frequency Filtering

Chapter 2 Image Enhancement in the Spatial Domain

On Filter Techniques for Generating Blue Noise Mask

Image Filtering in Spatial domain. Computer Vision Jia-Bin Huang, Virginia Tech

Digital Image Processing. Lecture # 3 Image Enhancement

ECC419 IMAGE PROCESSING

Image processing for gesture recognition: from theory to practice. Michela Goffredo University Roma TRE

TDI2131 Digital Image Processing

On Filter Techniques for Generating Blue Noise Mask

IMAGE PROCESSING: POINT PROCESSES

4 Enhancement. 4.1 Why perform enhancement? Enhancement via image filtering

Image Processing for Mechatronics Engineering For senior undergraduate students Academic Year 2017/2018, Winter Semester

Image Processing. What is an image? קורס גרפיקה ממוחשבת 2008 סמסטר ב' Converting to digital form. Sampling and Reconstruction.

Chapter 3. Study and Analysis of Different Noise Reduction Filters

Image Denoising using Filters with Varying Window Sizes: A Study

Frequency Domain Enhancement

Transcription:

Computer Vision for HCI Noise Removal Noise in Images Images can be noisy Image acquisition process not perfect Different sensors can have different noise and distortion properties Filter image to Enhance images Reduce noise in image Emphasize or suppress certain image details How? Decisions typically made at a level of local pixel regions (neighborhoods) 2

Local Pixel Neighborhoods 4connected pixel region If pixel * connected to four immediate neighbors Left, right, up, down 8connected pixel region If pixel * connected to all eight neighbors * * 3 Simple Removal of Binary Image Noise Saltandpepper noise (binary) Single dark pixels in bright regions Single bright pixels in dark regions Possibly from thresholding errors Removal of value L isolated from neighborhood of X s X X X X X X X X X L X X X X X L X X X X X X X X X X X X 8connected removal of L Result 4connected removal of L Result 4 2

Results Original binary image 8connected removal 4connected removal Matlab: see bwmorph(), using clean and fill 5 Median Filtering Assume each pixel in neighborhood will be either Uncorrupted pixel value Noise pixel value Also, uncorrupted pixel values should be nearly the same (small neighborhood) Furthermore, assume that there are more uncorrupted values than noise values Solution: replace a pixel value with the median value of the spatial neighborhood Value in the middle of the sorted distribution of pixel values (half of values greater, half are smaller) Requires sortingoperation on pixel values Noise should be at one or both ends of the sorted distribution Matlab: see medfilt2() or ordfilt2() 6 3

Median Filtering 5x5 neighborhood of gray values 0 2 9 8 4 2 0 0 6 4 2 5 5 4 2 9 8 3 2 0 8 2 Median of values [ 4, 5, 6, 8, 8, 8, 9, 9, 0, 0, 0, 0,,,, 2, 2, 2, 2, 2, 2, 3, 4, 4, 5 ] Replace value 5 with the median 7 Median Example # Checkerboard with noise After median filtering 8 4

Median Example #2 Grayscale image with noise After median filtering Tends to preserve edge detail, rather than blurring/smearing boundary between regions 9 Applying Filter Masks to Images Convolution/Correlation in image processing Mask is a set of pixel positions and corresponding values (weights) Generally oddnumbered rows or columns Each mask has an origin (home position) Center (or topleft) mask position most common 2 2 4 2 2 0 5

Applying Masks to Images For each valid pixel location x,y, place mask with origin lying on that pixel Image values under mask are multiplied with mask weights and then summed 40 40 80 80 80 40 40 80 80 80 40 40 80 80 80 40 40 80 80 80 40 40 80 80 80 Grayscale image Averaging Mask 53 67 80 53 67 80 53 67 80 Result Average (Mean) Filtering Sometimes called a box filter Average filter to smooth over local region V = I(x, y) + I(x, y) + I(x+, y) + I(x, y) + I(x, y) + I(x+, y) + I(x, y+) + I(x,y+) + I(x+,y+) / 9 2 6

Average Filtering Grayscale image with noise After average filtering Matlab: See fspecial() with average, and imfilter() 3 Comparison (Zoomed) After median filtering After average filtering 4 7

General Properties of Smoothing Masks Values of mask are all positive and sum to one So that output on constant regions are same as input Amount of smoothing is proportional to mask size Bigger masks smooth more 5 Gaussian Smoothing Weight the influence of pixels by their distance to the center pixel Weight decreases smoothly to 0 as move more distant from origin Symmetric in 2D (x,y) Isotropic function Consider Gaussian (Normal) distribution as weighting function 6 8

Gaussian Smoothing 2 2 2 2 o o 2 2 ( x x ) + ( y y ) x + y 2σ 2σ gxy (, ; σ ) = e = ce 2 2πσ 7 Gaussian Smoothing The standard deviation σ controls the spread of the function There is 95% of total weight within 2σ There is 99.7% of total weight within 3σ To determine a mask size for a particular spread Set mask size = ceil(2σ)*2+ (95% of weight) Or set mask size = ceil(3σ)*2+ (99.7% of weight) Fill mask values with g(x,y; σ) xrange: [ceil(3σ) : ceil(3σ)] (could use 2σ) yrange: [ceil(3σ) : ceil(3σ)] Divide by sum of mask values so sums to Matlab: can easily create with fspecial() 8 using gaussian, and then filter with imfilter() 9

Gaussian Smoothing Masks 2 2 4 2 2 3x3 Original image / 6 3 7 9 7 3 3 2 26 33 26 2 3 After Gaussian filtering 7 26 55 70 55 26 7 9 33 70 90 70 33 9 7 26 55 70 55 26 7 3 2 26 33 26 2 3 3 7 9 7 3 7x7 / 098 9 Gaussian Smoothing Original image σ = 3 σ = 6 20 0

Anisotropic Filtering Anisotropic diffusion Method to smooth an image, while preserving boundaries and structures of interest Basic idea is to adjust the smoothing level in a region based on the edge structure in the neighborhood Homogenous regions are highly smoothed Strong edge regions are barely smoothed (to preserve the structure) 2 Separability of Filters For (N x N) image and (n x n) mask, computational complexity is O(N 2 x n 2 ) For each pixel, we sum up a function of the n 2 values Can reduce complexity by using two D filters First, move along rows, put into temporary image Second, move along columns of temporary image Now require only 2n operations, instead of n 2 Complexity is reduced to O(N 2 x n) 22

a b c d e f g h i j Average (mean) filter 3 x 3 along rows/columns 3 x along rows k l m n o p q r s t u v w x y (a+b+c) (f+g+h) (k+l+m) (b+c+d) (g+h+i) (l+m+n) (c+d+e) (h+i+j) (m+n+o) (a+b+c+ f+g+h+ k+l+m) (f+g+h+ k+l+m+ p+q+r) (k+l+m+ p+q+r+ u+v+w) (b+c+d+ g+h+i+ l+m+n ) (g+h+i+ l+m+n + q+r+s) (l+m+n+ q+r+s+ v+w+x) (c+d+e+ h+i+j+ m+n+o) (h+i+j+ m+n+o+ r+s+t) (m+n+o +r+s+t+ w+x+y) (p+q+r) (q+r+s ) (r+s+t) x 3 along columns (u+v+w) (v+w+x) (w+x+y) 23 Gaussian Separability Twodimensional Gaussian can be separated into two D Gaussians One along x dimension, then along y dimension I(x,y) G(x; σ) G(y; σ) I(x,y)*G(x,y; σ) 2 2 2 2 ( x x ) + ( y y ) ( x x ) ( y y ) o o 2 o 2 o 2 2σ 2σ 2σ 2 2πσ 2πσ 2πσ gxy (, ; σ ) = e = e e 24 2

0 2 9 8 4 2 0 0 6 Median filter NOT separable 4 2 5 3 x along rows 5 4 2 9 8 3 2 0 8 2 0 9 8 0 () 0 (9) 2 0 2 0 True median 0 0 2 4 2 9 x 3 along columns 2 0 0 25 Summary Noise removal for images At local neighborhood Median filter Good for saltandpepper noise Preserves edges Not separable Average filter Smooth image Separable filter Gaussian filter Weight influence of pixels by their distance to the center pixel Normal distribution Spread parameter Separable filter 26 3