Histogram Histogram is a graph that shows frequency of anything. Histograms usually have bars that represent frequency of occuring of data. Histogram has.

Slides:



Advertisements
Similar presentations
Grey Level Enhancement Contrast stretching Linear mapping Non-linear mapping Efficient implementation of mapping algorithms Design of classes to support.
Advertisements

CS & CS Multimedia Processing Lecture 2. Intensity Transformation and Spatial Filtering Spring 2009.
Chapter 3 Image Enhancement in the Spatial Domain.
Digital Image Processing
1Ellen L. Walker ImageJ Java image processing tool from NIH Reads / writes a large variety of images Many image processing operations.
Image enhancement in the spatial domain. Human vision for dummies Anatomy and physiology Wavelength Wavelength sensitivity.
Image Filtering CS485/685 Computer Vision Prof. George Bebis.
1 Vladimir Botchko Lecture 4. Image Enhancement Lappeenranta University of Technology (Finland)
Lecture 1: Images and image filtering
CS 376b Introduction to Computer Vision 02 / 25 / 2008 Instructor: Michael Eckmann.
Image Enhancement.
Lecture 2. Intensity Transformation and Spatial Filtering
02/12/02 (c) 2002 University of Wisconsin, CS 559 Filters A filter is something that attenuates or enhances particular frequencies Easiest to visualize.
CSC589 Introduction to Computer Vision Lecture 3 Gaussian Filter, Histogram Equalization Bei Xiao.
CS 376b Introduction to Computer Vision 02 / 26 / 2008 Instructor: Michael Eckmann.
Digital Image Processing Image Enhancement Part IV.
Digital Image Processing Lecture 4: Image Enhancement: Point Processing Prof. Charlene Tsai.
Filtering and Enhancing Images. Major operations 1. Matching an image neighborhood with a pattern or mask 2. Convolution (FIR filtering)
EE663 Image Processing Dr. Samir H. Abdul-Jauwad Electrical Engineering Department King Fahd University of Petroleum & Minerals.
Lecture 03 Area Based Image Processing Lecture 03 Area Based Image Processing Mata kuliah: T Computer Vision Tahun: 2010.
MULTIMEDIA TECHNOLOGY SMM 3001 MEDIA - IMAGES. Processing digital Images digital images are often processed using “digital filters” digital images are.
CS654: Digital Image Analysis Lecture 18: Image Enhancement in Spatial Domain (Histogram)
GK-12 Sensors! Matrices and Digital Pictures Part II - Matrix operations with digital pictures.
Image Subtraction Mask mode radiography h(x,y) is the mask.
Digital Image Processing Lecture 5: Neighborhood Processing: Spatial Filtering March 9, 2004 Prof. Charlene Tsai.
CS 691B Computational Photography
Digital Image Processing Part 2 Contrast processing.
Digital Image Processing Part 3 Spatial Domain Processing.
Digital Image Processing Lecture 4: Image Enhancement: Point Processing January 13, 2004 Prof. Charlene Tsai.
Lecture 1: Images and image filtering CS4670/5670: Intro to Computer Vision Noah Snavely Hybrid Images, Oliva et al.,
Image Enhancement in the Spatial Domain.
Miguel Tavares Coimbra
Image Subtraction Mask mode radiography h(x,y) is the mask.
Lecture Six Figures from Gonzalez and Woods, Digital Image Processing, Second Edition, Copyright 2002.
REMOTE SENSING Digital Image Processing Radiometric Enhancement Geometric Enhancement Reference: Chapters 4 and 5, Remote Sensing Digital Image Analysis.
Digital Image Processing Lecture 10: Image Restoration
Image Pre-Processing in the Spatial and Frequent Domain
You will need your calculator today (and every day from now on)
IMAGE ENHANCEMENT TECHNIQUES
Practical TULIP lecture next Tues 12th Feb. Wed 13th Feb 11-1 am.
IMAGE PROCESSING INTENSITY TRANSFORMATION AND SPATIAL FILTERING
Frequency Distributions and Their Graphs
Image Enhancement.
Image Processing - in short
Digital Image Processing
Chapter 8, Exploring the Digital Domain
Fundamentals of Image Processing A Seminar on By Alok K. Watve
Computer Vision Lecture 16: Texture II
Image Enhancement in the Spatial Domain
Image Enhancement in the
CSC 381/481 Quarter: Fall 03/04 Daniela Stan Raicu
Histogram Probability distribution of the different grays in an image.
Spatial operations and transformations
You will need your calculator today (and every day from now on)
Digital Image Processing
Digital Image Processing Week IV
Digital Image Procesing Introduction to Image Enhancement Histogram Processing DR TANIA STATHAKI READER (ASSOCIATE PROFFESOR) IN SIGNAL PROCESSING IMPERIAL.
Digital Image Processing
Grey Level Enhancement
Image Enhancement To process an image so that the result is more suitable than the original image for a specific application. Spatial domain methods and.
Image Enhancement – Simple Intensity Processing
Lecture 2: Image filtering
Intensity Transformations and Spatial Filtering
Intensity Transform Contrast Stretching Y ← u0+γ*(Y-u)/s
Histogram The histogram of an image is a plot of the gray _levels values versus the number of pixels at that value. A histogram appears as a graph with.
Image Enhancement in the Spatial Domain
Image Enhancement in Spatial Domain: Neighbourhood Processing
Image Enhancement in Spatial Domain: Point Processing
Spatial operations and transformations
DIGITAL IMAGE PROCESSING Elective 3 (5th Sem.)
Presentation transcript:

Histogram Histogram is a graph that shows frequency of anything. Histograms usually have bars that represent frequency of occuring of data. Histogram has two axis: x and y. The x axis contains the event whose frequency we count. The y axis contains frequency.

Histogram Example of a typical histogram.

Histogram Consider some students with their marks.

Image histogram Image histogram shows frequency of pixel intensity values. x axis shows the gray level intensities y axis shows the frequency of intensities.

Image histogram x axis – shows the range of pixel values. For 8 bpp image, we have 256 levels of gray shades

Brightness Brightness is a relative term. It can be defined as the amount of energy output by a source of light relative to the source we are comparing to. Image on the right is brighter than image on the left.

Brightness Brightness can be easily increased or decreased by simple addition or subtraction to the image matrix

Contrast The contrast of the image can be defined as the difference between maximum pixel intensity and minimum pixel intensity. Max. int. = 0, Min. int. =0 Contrast = 0–0=0 Max. int. = 100, Min. int. =100 Contrast = 100–100=0

Image transformations Transformation is a function. It maps one set to another set after performing some operations. Digital Image Processing system performs the transformation.

Image transformation Consider the equation g(x,y)=T(f(x,y)) f(x,y) – input image, transformation is applied to this image. g(x,y) – output image (processed image). T is a transformation function.

Image transformation The transformation can be also represented as s=T(r) r – pixel value of the input image f(x,y) s – pixel value of the output image g(x,y)

Image transformation Original image

Histogram sliding Brightness is changed by shifting the histogram to left or right. +50

Histogram sliding - 30

Histogram stretching Contrast can be increased using: 2. Histogram equalization Contrast is the difference between maximum and minimum pixel intensity. Contrast = 225.

Increasing the contrast f(x,y) g(x,y) Low contrast image High contrast image

Contrast stretching Before Contrast = 225 After Contrast = 240

Contrast stretching This formula doesn’t work always. If there is 1 pixel with intensity 255: Contrast stretching has no effect!!!

Introduction to probability PMF and CDF are both related to probability. They will be used in Histogram Equalization. PMF – Probability Mass Function. It gives the probability of each number in the data set (frequency of each element).

Probability – PMF Calculating PMF from image matrix PMF Image matrix 1 2 7 5 6 7 2 3 4 5 0 1 5 7 3 1 2 5 6 7 6 1 0 3 4 2 2/25 1 4 4/25 3 3/25 5 6 7

Probability – PMF Calculating PMF from histogram Frequency of gray level values for an 8 bits per pixel image. Not monotonically increasing function

Probability – CDF CDF – Cumulative Distributed Function Cumulative sum of values calculated by PMF

Probability – CDF CDF will be calculated using the histogram CDF makes the PDF grow monotonically Monotonical growth is necessary for histogram equalization.

Histogram equalization Histogram equalization is used for enhancing the contrast of the images. The first two steps are calculating the PDF and CDF. All pixel values of the image will be equalized.

Histogram equalization Image with its histogram

Histogram equalization Small image (values) Small image (values)

Histogram equalization Image detail Frequency of pixel values

Histogram equalization

Histogram equalization min = 52 max = 154 cdfmin is the minimum non-zero value of the cumulative distribution function (in this case 1), M × N gives the image's number of pixels (for the example above 64, where M is width and N the height) and L is the number of grey levels used (in most cases, like this one, 256).

Histogram equalization New min. value = 0, old min. value 52 New max. value = 255, old max. value 154 Original Equalized

Histogram equalization Corresponding histogram (red) and cumulative histogram (black) An unequalized image The same image after histogram equalization Corresponding histogram (red) and cumulative histogram (black)

Negative transformation Original Negative s = (L – 1) – r

Concept of convolution Black box

Concept of convolution g(x,y) = h(x,y) * f(x,y) mask convolved with an image g(x,y) = f(x,y) * h(x,y) image convolved with mask The convolution operator (*) is commutative, h(x,y) is the mask or filter.

Convolution mask Mask is a matrix, usually of size 1x1, 3x3, 5x5 or 7x7 (odd number). Convolution steps: Flip the mask horizontally and vertically Slide the mask onto the image Multiply the corresponding elements and add them Repeat this until all image values are calculated

Convolution example Mask: After flipping the mask:

Convolution example Image matrix Place the mask over each image element. Multiply the corresponding elements and add them

Convolution example Red – mask, black – image First pixel: = (5*2) + (4*4) + (2*8) + (1*10) = 10 + 16 + 16 + 10 = 52 Convolution can achieve blurring, edge detection, sharpening, noise reduction, etc

Concept of mask A mask is a filter. Concept of masking is a concept of spatial filtering. Sample mask Filtering is convolving a mask with an image by moving the center of the mask over each image pixel.

Filters Filters are used for: - blurring - noise reduction - image sharpening - edge detection