Spatial Domain Processing and Image Enhancement

Similar documents
Lecture 4: Spatial Domain Processing and Image Enhancement

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

Digital Image Processing

Filtering. Image Enhancement Spatial and Frequency Based

Prof. Vidya Manian Dept. of Electrical and Comptuer Engineering

IMAGE ENHANCEMENT - POINT PROCESSING

Digital Image Processing

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

Digital Image Processing. Lecture # 3 Image Enhancement

TDI2131 Digital Image Processing

EE482: Digital Signal Processing Applications

VU Signal and Image Processing. Image Enhancement. Torsten Möller + Hrvoje Bogunović + Raphael Sahann

Image Enhancement in the Spatial Domain

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

Image Enhancement using Histogram Equalization and Spatial Filtering

IMAGE PROCESSING: AREA OPERATIONS (FILTERING)

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

What is image enhancement? Point operation

What is an image? Bernd Girod: EE368 Digital Image Processing Pixel Operations no. 1. A digital image can be written as a matrix

December 28, Dr. Praveen Sankaran (Department of ECE NIT Calicut DIP)

Reading Instructions Chapters for this lecture. Computer Assisted Image Analysis Lecture 2 Point Processing. Image Processing

CS/ECE 545 (Digital Image Processing) Midterm Review

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

Non Linear Image Enhancement

Lec 05 - Linear Filtering & Edge Detection

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

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

Computer Vision. Intensity transformations

Image Processing for feature extraction

Image Processing. 2. Point Processes. Computer Engineering, Sejong University Dongil Han. Spatial domain processing

Image Processing Lecture 4

Digital Image Fundamentals and Image Enhancement in the Spatial Domain

CSE 564: Scientific Visualization

IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Image Enhancement in Spatial Domain

Image acquisition. Midterm Review. Digitization, line of image. Digitization, whole image. Geometric transformations. Interpolation 10/26/2016

Chapter 2 Image Enhancement in the Spatial Domain

Digital Image Processing. Lecture # 4 Image Enhancement (Histogram)

Hello, welcome to the video lecture series on Digital Image Processing.

Color Transformations

Images and Filters. EE/CSE 576 Linda Shapiro

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

OFFSET AND NOISE COMPENSATION

CSE 564: Visualization. Image Operations. Motivation. Provide the user (scientist, t doctor, ) with some means to: Global operations:

Filtering in the spatial domain (Spatial Filtering)

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

Digital Image Processing

Computer Graphics Fundamentals

Image Processing Computer Graphics I Lecture 20. Display Color Models Filters Dithering Image Compression

Image Enhancement in the Spatial Domain (Part 1)

Computing for Engineers in Python

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

Frequency Domain Enhancement

ECC419 IMAGE PROCESSING

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

Image Processing COS 426

To process an image so that the result is more suitable than the original image for a specific application.

Enhancement Techniques for True Color Images in Spatial Domain

Noise and Restoration of Images

DIGITAL IMAGE DE-NOISING FILTERS A COMPREHENSIVE STUDY

BBM 413! Fundamentals of! Image Processing!

BBM 413 Fundamentals of Image Processing. Erkut Erdem Dept. of Computer Engineering Hacettepe University. Point Operations Histogram Processing

Image Filtering. Median Filtering

BBM 413 Fundamentals of Image Processing. Erkut Erdem Dept. of Computer Engineering Hacettepe University. Point Operations Histogram Processing

ENEE408G Multimedia Signal Processing

Chapter 3 Part 2 Color image processing

Image Enhancement in the Spatial Domain Low and High Pass Filtering

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

Lecture 3: Grey and Color Image Processing

USE OF HISTOGRAM EQUALIZATION IN IMAGE PROCESSING FOR IMAGE ENHANCEMENT

DIGITAL IMAGE PROCESSING ASSIGNMENT

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

Image filtering, image operations. Jana Kosecka

A.V.C. COLLEGE OF ENGINEERING DEPARTEMENT OF CSE CP7004- IMAGE PROCESSING AND ANALYSIS UNIT 1- QUESTION BANK

IMAGE PROCESSING: POINT PROCESSES

Image Enhancement (from Chapter 13) (V6)

from: Point Operations (Single Operands)

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

Digital Image Processing

Design of Various Image Enhancement Techniques - A Critical Review

Digital Image Processing Chapter 3: Image Enhancement in the Spatial Domain

The Unique Role of Lucis Differential Hysteresis Processing (DHP) in Digital Image Enhancement

Digital Image Processing

Lecture No Image Filtering (course: Computer Vision)

Vision Review: Image Processing. Course web page:

Image Filtering Josef Pelikán & Alexander Wilkie CGG MFF UK Praha

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

Digital Image Processing. Lecture # 8 Color Processing

SECTION I - CHAPTER 2 DIGITAL IMAGING PROCESSING CONCEPTS

On the evaluation of edge preserving smoothing filter

Chrominance Assisted Sharpening of Images

Sampling Rate = Resolution Quantization Level = Color Depth = Bit Depth = Number of Colors

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

Anna University, Chennai B.E./B.TECH DEGREE EXAMINATION, MAY/JUNE 2013 Seventh Semester

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

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

Digital Image Processing. Lecture 5 (Enhancement) Bu-Ali Sina University Computer Engineering Dep. Fall 2009

Simple Pixel Operations 4S1

Last Lecture. Lecture 2, Point Processing GW , & , Ida-Maria Which image is wich channel?

INSTITUTE OF AERONAUTICAL ENGINEERING Dundigal, Hyderabad

Transcription:

Spatial Domain Processing and Image Enhancement Lecture 4, Feb 18 th, 2008 Lexing Xie EE4830 Digital Image Processing http://www.ee.columbia.edu/~xlx/ee4830/ thanks to Shahram Ebadollahi and Min Wu for slides and materials

-2- announcements Today HW1 due HW2 out

recap -3-

-4- why spatial processing examples are from flickr.com

-5- Application roadmap for today Method T N (.) N (.) f T g = TΝ ( f ) f ( x, y), 1 x M, 1 y N g( x, y), 1 x M, 1 y N : Spatial operator defined on a neighborhood N of a given pixel N ( x, ) N ( x, ) N ( x, ) 0 y 4 y 8 y point processing mask/kernel processing

-6- outline What and why Spatial domain processing for image enhancement Intensity Transformation Spatial Filtering

-7- intensity transformation / point operation Map a given gray or color level u to a new level v Memory-less, direction-less operation output at (x, y) only depend on the input intensity at the same point Pixels of the same intensity gets the same transformation Does not bring in new information, may cause loss of information But can improve visual appearance or make features easier to detect output gray level v input gray level u

-8- intensity transformation / point operation Two examples we already saw Color space transformation Scalar quantization

-9- image negatives the appearance of photographic negatives Enhance white or gray detail on dark regions, esp. when black areas are dominant in size

-10- basic intensity transform functions monotonic, reversible compress or stretch certain range of gray-levels

-11- log transform lena FFT(lena) stretch: u [0,.5] v [0,.59] compress: u [.5, 1] im = imread( lena.png ) v [.59, 1] a = abs(fftshift(fft2(double(im)))); c = log(1+double(im)); c = range_normalize(c); b = log(1+a); b=b/max(b(:));

-12-

-13- power-law transformation power-law response functions in practice CRT Intensity-to-voltage function has γ 1.8~2.5 Camera capturing distortion with γ c = 1.0-1.7 Similar device curves in scanners, printers, power-law transformations are also useful for general purpose contrast manipulation

-14- gamma correction make linear input appear linear on displays method: calibration pattern + interactive adjustment example calibration chart

effect of gamma on consumer photos 2.2 1/2.2 L 0 L 0 L 0-15-

-16- what gamma to use? γ >1 γ <1?

-17- more intensity transform log, gamma closed-form functions on [0,1] can be more flexible contrast stretching

intensity slicing -18-

image bit-planes -19-

-20- slicing bitplanes Depend on relative importance of bits How much to slice depend on image content Useful in image compression, e.g. JPEG2000

-21- outline What and why Image enhancement Spatial domain processing Intensity Transformation Intensity transformation functions (negative, log, gamma), intensity and bit-place slicing, contrast stretching Histograms: equalization, matching, local processing Spatial Filtering Filtering basics, smoothing filters, sharpening filters, unsharp masking, laplacian Combining spatial operations

-22- gray-level image histogram Represents the relative frequency of occurrence of the various gray levels in the image For each gray level, count the number of pixels having that level Can group nearby levels to form a big bin & count #pixels in it

-23- interpretations of histogram if pixel values are i.i.d random variables histogram is an estimate of the probability distribution of the r.v. unbalanced histograms do not fully utilize the dynamic range Low contrast image: narrow luminance range Under-exposed image: concentrating on the dark side Over-exposed image: concentrating on the bright side balanced histogram gives more pleasant look and reveals rich details

-24- contrast stretching Stretch the over-concentrated gray-levels Piece-wise linear function, where the slope in the stretching region is greater than 1. β = T (α) L-1 β 2 s 3 s 2 β s 1 1 0 L-1 α 1 α 2 α

-25- in practice intuition about a good image: a uniform histogram spanning a large variety of gray tones can we figure out a stretching function automatically?

-26- histogram equalization goal: map the each luminance level to a new value such that the output image has approximately uniform distribution of gray levels two desired properties monotonic (non-decreasing) function: no value reversals [0,1] [0.1] : the output range being the same as the input range pdf cdf 1 1 o 1 o 1

-27- histogram equalization make 1 show o 1

-28- implementing histogram equalization u v v = pu ( xi ) Rounding or v xi u Uniform quantization p u (x i ) compute histogram equalize or round the output p u n( xi ) ( xi ) = for i = 0,..., L -1 L 1 n( x ) i= 0 v = ( L 1) u x = 0 i p v ' = round( v) i u ( x ) i v = L 1 MN u x = 0 i n( x ) i Only depend on the input image histogram Fast to implement For u in discrete prob. distribution, the output v will be approximately uniform

-29- a toy example v = ( L 1) u x = 0 i p ( x ) u i

-30- a toy example 1.33 3.08 4.55 5.67 6.23 6.65 6.86 7.00 1 3 5 6 6 7 7 7

histogram equalization example -31-

-32- contrast-stretching vs. histogram equalization v output gray level o γ β α a b input gray level u function form reversible? loss of information? input/output? automatic/interactive?

-33- histogram matching Histogram matching/specification Want output v with specified p.d.f. p V (v) Use a uniformly distributed random vairable W as an intermediate step W = F U (u) = F V (v) V = F -1 V (F U (u) ) Approximation in the intermediate step needed for discrete r.v. W 1 = F U (u), W 2 = F V (v) take v s.t. its w2 is equal to or just above w1

histogram matching example -34-

-35- local histogram processing problem: global spatial processing not always desirable solution: apply point-operations to a pixel neighborhood with a sliding window

-36- outline What and why Image enhancement Spatial domain processing Intensity Transformation Intensity transformation functions (negative, log, gamma), intensity and bit-place slicing, contrast stretching Histograms: equalization, matching, local processing Spatial Filtering Filtering basics, smoothing filters, sharpening filters, unsharp masking, laplacian Combining spatial operations (sec. 3.7)

spatial filtering in image neighborhoods -37-

kernel operator / filter masks -38- f T N (.) = w(.) Spatial Filtering g a b g ( m, n) = w( i, j) f ( m + i, n + j) i= a j= b kernel 1 m M 1 n N

-39- Smoothing: Image Averaging smoothing operator Low-pass filter, leads to softened edges

-40- UMCP ENEE408G Slides (created by M.Wu & R.Liu 2002) spatial averaging can suppress noise image with iid noise y(m,n) = x(m,n) + N(m,n) averaging v(m,n) = (1/N w ) Σ x(m-k, n-l) + (1/N w ) Σ N(m-k, n-l) N w : number of pixels in the averaging window Noise variance reduced by a factor of N w SNR improved by a factor of N w Window size is limited to avoid excessive blurring

smoothing operator of different sizes -41- original 3x3 5x5 9x9 15x15 35x35

-42- UMCP ENEE408G Slides (created by M.Wu & R.Liu 2002) directional smoothing Problems with simple spatial averaging mask Edges get blurred Improvement Restrict smoothing to along edge direction Avoid filtering across edges Directional smoothing Compute spatial average along several directions Take the result from the direction giving the smallest changes before & after filtering Other solutions Use more explicit edge detection and adapt filtering accordingly W θ θ

-43- non-linear smoothing operator Median filtering median value ξ over a small window of size N w nonlinear median{ x(m) + y(m) } median{x(m)} + median{y(m)} odd window size is commonly used 3x3, 5x5, 7x7 5-pixel + -shaped window for even-sized windows take the average of two middle values as output Other order statistics: min, max, x-percentile

-44- Median filtering median filter example resilient to statistical outliers incurs less blurring simple to implement iid noise more at lecture 7, image restoration

image derivative and sharpening -45-

-46- edge and the first derivative Edge: pixel locations of abrupt luminance change Spatial luminance gradient vector a vector consists of partial derivatives along two orthogonal directions gradient gives the direction with highest rate of luminance changes Representing edge: edge intensity + directions Detection Methods prepare edge examples (templates) of different intensities and directions, then find the best match measure transitions along 2 orthogonal directions

-47- Image gradient: f G = G x y edge detection operators f = f x y f G x + G y Robert s operator Sobel s operator

-48- edge detection example Roberts Sobel http://flickr.com/photos/reneemarie11/97326485/

second derivative in 2D -49- Image Laplacian:

-50- laplacian of roman ruins http://flickr.com/photos/starfish235/388557119/

-51- unsharp masking Unsharpmasking is an image manipulation technique for increasing the apparent sharpness of photographic images. The "unsharp" of the name derives from the fact that the technique uses a blurred, or "unsharp", positive to create a "mask" of the original image. The unsharped mask is then combined with the negative, creating a resulting image sharper than the original. Steps Blur the image Subtract the blurred version from the original (this is called the mask) Add the mask to the original

high-boost filtering -52- Avg. + - + f hb ( x, y) = Af ( x, y) f ( x, y) lp Unsharp mask: high-boost with A=1

unsharp mask example -53-

-54- summary Spatial transformation and filtering are popular methods for image enhancement Intensity Transformation Intensity transformation functions (negative, log, gamma), intensity and bit-place slicing, contrast stretching Histograms: equalization, matching, local processing Spatial Filtering smoothing filters, sharpening filters, unsharp masking, laplacian Combining spatial operations (sec. 3.7)

-55- sharpen! http://flickr.com/photos/t_schnitzlein/87607390/

-56-

-57- order statistics filters )}, ( { ), ( ), ( ), ( t s f median y x g y W x t s = )}, ( { max ), ( ), ( ), ( t s f y x g y W x t s = )}, ( { min ), ( ), ( ), ( t s f y x g y W x t s = original