Histograms Histogram Equalization Integrated optical density Mean grey level Properties of histograms.

Slides:



Advertisements
Similar presentations
CS Spring 2009 CS 414 – Multimedia Systems Design Lecture 4 – Digital Image Representation Klara Nahrstedt Spring 2009.
Advertisements

November 12, 2013Computer Vision Lecture 12: Texture 1Signature Another popular method of representing shape is called the signature. In order to compute.
Grey Level Enhancement Contrast stretching Linear mapping Non-linear mapping Efficient implementation of mapping algorithms Design of classes to support.
Topic 6 - Image Filtering - I DIGITAL IMAGE PROCESSING Course 3624 Department of Physics and Astronomy Professor Bob Warwick.
Image Processing Lecture 4
Chapter 3 Image Enhancement in the Spatial Domain.
EE4H, M.Sc Computer Vision Dr. Mike Spann
HISTOGRAM TRANSFORMATION IN IMAGE PROCESSING AND ITS APPLICATIONS Attila Kuba University of Szeged.
Digital Image Processing
Image Processing IB Paper 8 – Part A Ognjen Arandjelović Ognjen Arandjelović
1Ellen L. Walker ImageJ Java image processing tool from NIH Reads / writes a large variety of images Many image processing operations.
HISTOGRAM TRANSFORMATION IN IMAGE PROCESSING SHINTA P TEKNIK INFORMATIKA STMIK MDP 2011.
BYST Eh-1 DIP - WS2002: Enhancement in the Spatial Domain Digital Image Processing Bundit Thipakorn, Ph.D. Computer Engineering Department Image Enhancement.
E.G.M. PetrakisFiltering1 Linear Systems Many image processing (filtering) operations are modeled as a linear system Linear System δ(x,y) h(x,y)
Digital Image Processing In The Name Of God Digital Image Processing Lecture3: Image enhancement M. Ghelich Oghli By: M. Ghelich Oghli
Image enhancement in the spatial domain. Human vision for dummies Anatomy and physiology Wavelength Wavelength sensitivity.
Histograms Histogram Equalization Definition: What is a histogram? Histograms count the number of occurrences of each possible value CountGrey level.
1Ellen L. Walker Edges Humans easily understand “line drawings” as pictures.
6/9/2015Digital Image Processing1. 2 Example Histogram.
Multimedia Data Introduction to Image Processing Dr Mike Spann Electronic, Electrical and Computer.
Edge detection. Edge Detection in Images Finding the contour of objects in a scene.
Image processing. Image operations Operations on an image –Linear filtering –Non-linear filtering –Transformations –Noise removal –Segmentation.
CS443: Digital Imaging and Multimedia Filters Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University Spring 2008 Ahmed Elgammal Dept.
CS 376b Introduction to Computer Vision 02 / 25 / 2008 Instructor: Michael Eckmann.
Image Enhancement.
Objective of Computer Vision
Vision, Video and Virtual Reality Feature Extraction Lecture 7 Image Enhancement CSC 59866CD Fall 2004 Zhigang Zhu, NAC 8/203A
Image Analysis Preprocessing Arithmetic and Logic Operations Spatial Filters Image Quantization.
IMAGE 1 An image is a two dimensional Function f(x,y) where x and y are spatial coordinates And f at any x,y is related to the brightness at that point.
CS448f: Image Processing For Photography and Vision Denoising.
Image Processing and Computer Vision for Robots
ECE 472/572 - Digital Image Processing Lecture 4 - Image Enhancement - Spatial Filter 09/06/11.
Radiometric Correction and Image Enhancement
The Digital Image.
Introduction to Image Processing Grass Sky Tree ? ? Review.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Neighborhood Operations
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
Digital Image Processing Image Enhancement Part IV.
Multimedia Data Introduction to Image Processing Dr Sandra I. Woolley Electronic, Electrical.
EE663 Image Processing Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Digital Image Processing Lecture 5: Neighborhood Processing: Spatial Filtering Prof. Charlene Tsai.
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
AdeptSight Image Processing Tools Lee Haney January 21, 2010.
Image processing Fourth lecture Image Restoration Image Restoration: Image restoration methods are used to improve the appearance of an image.
Digital Image Processing Part 1 Introduction. The eye.
School of Computer Science Queen’s University Belfast Practical TULIP lecture next Tues 12th Feb. Wed 13th Feb 11-1 am. Thurs 14th Feb am. Practical.
Digital Image Processing Lecture 10: Image Restoration March 28, 2005 Prof. Charlene Tsai.
Machine Vision ENT 273 Image Filters Hema C.R. Lecture 5.
Digital Image Processing Lecture 10: Image Restoration
Introduction TOPIC 6 Image Enhancement.
Image Subtraction Mask mode radiography h(x,y) is the mask.
Autonomous Robots Vision © Manfred Huber 2014.
Intelligent Vision Systems ENT 496 Image Filtering and Enhancement Hema C.R. Lecture 4.
Introduction to Computer Vision Introduction Zhigang Zhu, City College of New York CSc I6716 Spring 2012 Image Enhancement Part I.
Mestrado em Ciência de Computadores Mestrado Integrado em Engenharia de Redes e Sistemas Informáticos VC 15/16 – TP7 Spatial Filters Miguel Tavares Coimbra.
Visual Computing Computer Vision 2 INFO410 & INFO350 S2 2015
Digital Image Processing Lecture 5: Neighborhood Processing: Spatial Filtering March 9, 2004 Prof. Charlene Tsai.
Machine Vision Edge Detection Techniques ENT 273 Lecture 6 Hema C.R.
: Chapter 5: Image Filtering 1 Montri Karnjanadecha ac.th/~montri Image Processing.
Image Enhancement Band Ratio Linear Contrast Enhancement
Miguel Tavares Coimbra
Image Subtraction Mask mode radiography h(x,y) is the mask.
Digital Image Processing Lecture 10: Image Restoration
Practical TULIP lecture next Tues 12th Feb. Wed 13th Feb 11-1 am.
Histogram Histogram is a graph that shows frequency of anything. Histograms usually have bars that represent frequency of occuring of data. Histogram has.
Computer Vision Lecture 16: Texture II
Digital Image Processing
Lecture 2: Image filtering
Image Enhancement in the Spatial Domain
Presentation transcript:

Histograms Histogram Equalization

Integrated optical density Mean grey level Properties of histograms

Image statistics MEAN  = VARIANCE  2 = STANDARD DEVIATION  = Mean Grey Level = MGL IOD

Definition: What is a histogram? Histograms count the number of occurrences of each possible value CountGrey level

Histograms of band 75x training sites Tree swamp Grass marsh Example: Processing of aerial images Examples of histograms

Properties of histograms Sum of all values in the histogram equals the total number of pixels …obvious because….. because every pixel has only one value in histogram….

Sum of all values between a and b equals the area of all objects in that range Properties of histograms ….also obvious…..

What are the Applications of Histograms? u Image Equalization uImage Enhancement uAdjusting Camera Parameters uHistogram Normalization uLogarithmic Contrast Enhancement uLog histogramming for edge detection

What is Histogram Equalization? uUsually in image you have equal intervals but various number of pixels in each interval. uHistogram Equalization: ucreates new intervals u places equal number of pixels in each of the new intervals uResulting histogram will have unequal intervals, but equal number of pixels in each class uIt can be done automatically or aided by a human. Pixel intervals are also called classes.

Histogram equalisation Typical histogramIdeal histogram

Histogram equalization example Typical histogramAfter histogram equalization

Probability Density Functions, p(l) Limits 0 < p(l) < 1 p(l) = h(l) / n n = N*M (total number of pixels) Algorithm for Histogram Equalization

Histograms, h(l) Counts the number of occurrences of each grey level in an image l = 0,1,2,… L-1 l = grey level, intensity level L = maximum grey level, typically 256 Area under histogram Total number of pixels N*M –unimodal, bimodal, multi-modal, dark, light, low contrast, high contrast

Histogram Equalization, E(l) Increases dynamic range of an image Enhances contrast of image to cover all possible grey levels Ideal histogram = flat – same no. of pixels at each grey level Ideal no. of pixels at each grey level =

E(l) Algorithm Allocate pixel with lowest grey level in old image to 0 in new image If new grey level 0 has less than ideal no. of pixels, allocate pixels at next lowest grey level in old image also to grey level 0 in new image When grey level 0 in new image has > ideal no. of pixels move up to next grey level and use same algorithm Start with any unallocated pixels that have the lowest grey level in the old image If earlier allocation of pixels already gives grey level 0 in new image TWICE its fair share of pixels, it means it has also used up its quota for grey level 1 in new image Therefore, ignore new grey level one and start at grey level 2 …..

Simplified Formula for Histogram Equalization E(l)  equalized function max  maximum dynamic range round  round to the nearest integer (up or down) L  no. of grey levels N*M  size of image t(l)  accumulated frequencies

Practical Histogram Equalization example Ideal=3 Before HEAfter HE

Histogram Equalization example Ideal=3 Before HEAfter HE One pixel with value 1 9 pixels with value 2 Total number of intervals = 10 Total number of pixels = 3 Ideal (average) value = 3 = 30 /10 Original interval Accumulated value New interval =30, as before 1

Where is Histogram Equalization Used? urobot vision, u photographics, uaerial images

Normalizing Histograms Probability density function = histogram normalized by area

Color Image histogram Equalization in Matlab

Two Band Scatter Plot

Improfile = image profile Profile taken

Imhist = Image Histogram

Histogram Stretching in Matlab

Can improve contrast Used in preprocessing Histogram Equalization in Matlab

Too bright - lots of pixels at 255 (or max) Too dark - lots of pixels at 0 Gain too low - not enough of the range used Application: Adjusting Camera Parameters Example of image enhancement

Application: Image Segmentation Can be used to separate bright objects from dark background (or vice versa)

Cumulative Histograms Counts pixels with values up to and including the specified value

Cumulative Density Functions Normalized cumulative histograms

IMAGE ENHANCEMENT

uDue to the fact that original pixel values are integer values, and that frequency of the values varies with each class, the result will be an actual number of pixels in each class which only approximates the equalized percentage uAlternative explanation which incorporates probability and a transformation function: unote the difference in the two histograms, original and equalized

CAMDEN, ONT. area Camden Lake Varty Lake IMAGE ENHANCEMENT ORIGINAL MSS BAND 5 DATA

IMAGE ENHANCEMENT LINEAR STRETCHED MSS BAND 5 DATA CAMDEN, ONT. area Camden Lake Varty Lake Napanee River County road

IMAGE ENHANCEMENT SPATIAL FILTERING Spatial frequency: “The number of changes in brightness value per unit distance for any particular part of an image” (Jensen) –Few changes? Low frequency –Many changes? High frequency

IMAGE ENHANCEMENT The principles?The principles? Pixel values along a single scan line can be represented by a complex curve which comprises many simple curves, each with its own constant wavelength complex curveThe complex curve can be separated into its component wavelengths by mathematical process of filtering

Logarithmic Contrast Enhancement in Matlab

Thresholding in Matlab

Edge Detection using gradient operators in Matlab

Combines LoG histogramming and convolution filtering For Comparison, Edge Detection using the LOG

POINT OPERATIONS Operates on ONLY 1 pixel at a time without considering neighboring values Thresholding Contrast stretching Temporal image smoothing Image difference Color adjustment or selection

Thresholding Creates binary image from grayscale image Image histogram Determining threshold

Temporal smoothing Noisy images, e.g. pictures from the moon Several frames of the same scene Take average of the same pixel value over time Standard deviation of noise decreases on averaging

Image difference over time Static camera is assumed Compute I(t) - I(t+dt) Threshold to eliminate small differences Still scene ==> Nothing in difference Moving object ==> object detected before & after motion

Color adjustment/selection Hue, saturation, intensity Red, green, blue Selecting sky Selecting grass

Color models Color models Color models for images : RGB, CMY Color models for video : YIQ, YUV (YCbCr) YIQ from RGB YCbCr from RGB YUV from RGB

Region and segmentation Region ( ) –A subset of an image Segmentation –Grouping of pixels into regions such that

Thresholding Thresholding : –A method to convert a gray scale image into a binary image for object-background separation : Thresholded gray image –Obtained using a threshold T for the original gray image : Binary image = Two types of thresholding

Thresholding Original image and its histogramThresholding

Sources Maja Mataric Dodds, Harvey Mudd College Damien Blond Alim Fazal Tory Richard Jim Gast Bryan S. Morse Gerald McGrath Vanessa S. Blake Matt Roach Many sources of slides from Internet Bryan S. Morse Many WWW sources Anup Basu, Ph.D. Professor, Dept of Computing Sc. University of Alberta Professor Kim, KAIST H. Schultz, Computer science, University of Massachusetts, Web Site: www- edlab.cs.umass/cs570

533 Text book presentations/L2_24A_Lee_Wang/ presentations/L1_24A_Kaasten_Steller_Hoang/main.htm presentations/L1_24_Schebywolok/index.html presentations/L2_24B_Doering_Grenier/ optical.html

Noise Reduction

Image Enhancement Brightness control Contrast enhancement Noise reduction Edge enhancement Zooming

Objectives What is noise? How is noise reduction performed? –Noise reduction from first principles –Neighbourhood operators linear filters (low pass, high pass) non-linear filters (median)

Noise Source of noise = CCD chip. Electronic signal fluctuations in detector. Caused by thermal energy. Worse for infra-red sensors.

Noise image + noise = ‘grainy’ image

Plot of image brightness. Noise is additive. Noise fluctuations are rapid, ie, high frequency.Noise

Plot noise histogram Histogram is called normal or Gaussian Mean(noise)  = 0 Standard deviation  22 Noise

 =10  =20  =30Noise

Noise varies above and below uncorrupted image. Noise Reduction

How do we reduce noise? Consider a uniform 1-d image and add noise. Focus on a pixel neighbourhood. Central pixel has been increased and neighbouring pixels have decreased. A i-1 A i A i+1 Ci Ci Noise Reduction - First Principles

A i-1 A i A i+1 =0 =3 = = = = Ci Ci Noise Reduction - First Principles

Averaging ‘smoothes’ the noise fluctuations. Consider the next pixel A i+1 Repeat for remainder of pixels. A i-1 A i A i+1 A i+2 C i+1 Noise Reduction - First Principles

All pixels can be averaged by convolving 1-d image A with mask B to give enhanced image C. Weights of B must equal one when added together. Noise Reduction - Neighbourhood operations

Extend to two dimensions. Noise Reduction - Neighbourhood operations

Noise Reduction

Technique relies on high frequency noise fluctuations being ‘blocked’ by filter. Hence, low-pass filter. Fine detail in image may also be smoothed. Balance between keeping image fine detail and reducing noise. Noise Reduction

Saturn image coarse detail Boat image contains fine detail Noise reduced but fine detail also smoothed Noise Reduction

Consider a uniform 1-d image with a step function. Step function corresponds to fine image detail such as an edge. Low-pass filter ‘blurs’ the edge. Noise Reduction

How do we reduce noise without averaging? Consider a uniform 1-d image and add noise. Focus on a pixel neighbourhood. Non-linear operator? A i-1 A i A i+1 Ci Ci Median filter! Noise Reduction - First Principles

A i A i+1 A i+2 C i+1 Consider a uniform 1-d image with a step function. Step function corresponds to fine image detail such as an edge. Median filter does not ‘blur’ the edge. A i-1 A i A i+1 Ci Ci Noise Reduction - First Principles

All pixels can be replaced by neighbourhood median by convolving 1-d image A with median filter B to give enhanced image C. Noise Reduction - Noise Reduction - Neighborhood operations

Extend to two dimensions. Noise Reduction - Noise Reduction - Neighborhood operations

Original Low-passMedian Noise Reduction

Low-passMedian Low-pass: fine detail smoothed by averaging Median: fine detail passed by filter Noise Reduction

Summary What is noise? –Gaussian distribution Noise reduction –first principles Neighbourhood –low-pass –median Averaging pixels corrupted by noise cancels out the noise. Low-pass can blur image. Median can retain fine image detail that may be smoothed by averaging. Conclusion