Image Acquisition + Histograms

Similar documents
What is an Image? Image Acquisition. Image Processing - Lesson 2. An image is a projection of a 3D scene into a 2D projection plane.

Image Acquisition Image Digitization Spatial domain Intensity domain Image Characteristics

IMAGING. Images are stored by capturing the binary data using some electronic devices (SENSORS)

Introduction to Computer Vision. Human Eye Sampling

Lecture 4. Digital Image Enhancement. 1. Principle of image enhancement 2. Spatial domain transformation. Histogram processing

Digital Image Processing

In this lecture. Background. Background. Background. PAM3012 Digital Image Processing for Radiographers

1/12/2009. Image Elements (Pixels) Image Elements (Pixels) Digital Image. Digital Image =...

Lecture 4 Image Enhancement in Spatial Domain

Digital Image Processing COSC 6380/4393

Computer Vision. The image formation process

IMAGE ENHANCEMENT in SPATIAL DOMAIN by Intensity Transformations

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

CS 111: Digital Image Processing Fall 2016 Midterm Exam: Nov 23, Pledge: I neither received nor gave any help from or to anyone in this exam.

Sampling and Reconstruction

Problem definition Image acquisition Image segmentation Connected component analysis. Machine vision systems - 1

Introduction to Digital Image Processing

Digital Image Fundamentals. Prof. George Wolberg Dept. of Computer Science City College of New York

UNIT-2 IMAGE REPRESENTATION IMAGE REPRESENTATION IMAGE SENSORS IMAGE SENSORS- FLEX CIRCUIT ASSEMBLY

Image Processing using LabVIEW. By, Sandip Nair sandipnair.hpage.com

IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN

CS443: Digital Imaging and Multimedia Binary Image Analysis. Spring 2008 Ahmed Elgammal Dept. of Computer Science Rutgers University

Intensity Transformation and Spatial Filtering

Intensity Transformations and Spatial Filtering

Range Imaging Through Triangulation. Range Imaging Through Triangulation. Range Imaging Through Triangulation. Range Imaging Through Triangulation

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

Lecture 2 Image Processing and Filtering

Basic relations between pixels (Chapter 2)

Computer Assisted Image Analysis TF 3p and MN1 5p Lecture 1, (GW 1, )

Image Sampling and Quantisation

Image Segmentation. Segmentation is the process of partitioning an image into regions

Image Sampling & Quantisation

Chapter 3: Intensity Transformations and Spatial Filtering

Sampling, Aliasing, & Mipmaps

Image Processing. Bilkent University. CS554 Computer Vision Pinar Duygulu

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

Processing of binary images

Perception. Autonomous Mobile Robots. Sensors Vision Uncertainties, Line extraction from laser scans. Autonomous Systems Lab. Zürich.

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

Digital Image Processing. Introduction

Digital Image Fundamentals

Volocity ver (2013) Standard Operation Protocol

Digital Image Processing

CS4733 Class Notes, Computer Vision

Sampling, Aliasing, & Mipmaps

Sampling: Application to 2D Transformations

Digital Image Analysis and Processing

Digital Image Processing, 2nd ed. Digital Image Processing, 2nd ed. The principal objective of enhancement

Feature extraction. Bi-Histogram Binarization Entropy. What is texture Texture primitives. Filter banks 2D Fourier Transform Wavlet maxima points

(Refer Slide Time 00:17) Welcome to the course on Digital Image Processing. (Refer Slide Time 00:22)

Color and Shading. Color. Shapiro and Stockman, Chapter 6. Color and Machine Vision. Color and Perception

Unit - I Computer vision Fundamentals

EXAM SOLUTIONS. Image Processing and Computer Vision Course 2D1421 Monday, 13 th of March 2006,

Lecture 4: Spatial Domain Transformations

VC 16/17 TP5 Single Pixel Manipulation

INTRODUCTION TO IMAGE PROCESSING (COMPUTER VISION)

UNIT - 5 IMAGE ENHANCEMENT IN SPATIAL DOMAIN

Graphics Hardware and Display Devices

Binary Image Processing. Introduction to Computer Vision CSE 152 Lecture 5

Ulrik Söderström 17 Jan Image Processing. Introduction

Computer Graphics. Texture Filtering & Sampling Theory. Hendrik Lensch. Computer Graphics WS07/08 Texturing

Islamic University of Gaza Faculty of Engineering Computer Engineering Department

Last update: May 4, Vision. CMSC 421: Chapter 24. CMSC 421: Chapter 24 1

Image restoration. Restoration: Enhancement:

Theoretically Perfect Sensor

9 length of contour = no. of horizontal and vertical components + ( 2 no. of diagonal components) diameter of boundary B

HISTOGRAMS OF ORIENTATIO N GRADIENTS

Lecture 3 - Intensity transformation

CS4442/9542b Artificial Intelligence II prof. Olga Veksler

Theoretically Perfect Sensor

Requirements for region detection

INTENSITY TRANSFORMATION AND SPATIAL FILTERING

EE663 Image Processing Histogram Equalization I

Analysis of Binary Images

CS4442/9542b Artificial Intelligence II prof. Olga Veksler

CHAPTER 3 IMAGE ENHANCEMENT IN THE SPATIAL DOMAIN

Motivation. Intensity Levels

Reading. 2. Fourier analysis and sampling theory. Required: Watt, Section 14.1 Recommended:

A MULTI-RESOLUTION APPROACH TO DEPTH FIELD ESTIMATION IN DENSE IMAGE ARRAYS F. Battisti, M. Brizzi, M. Carli, A. Neri

EE795: Computer Vision and Intelligent Systems

EECS 556 Image Processing W 09. Interpolation. Interpolation techniques B splines

Chapter - 2 : IMAGE ENHANCEMENT

Digital Image Processing

Minimizing Noise and Bias in 3D DIC. Correlated Solutions, Inc.

3D graphics, raster and colors CS312 Fall 2010

Motivation. Gray Levels

Image Enhancement in Spatial Domain. By Dr. Rajeev Srivastava

Local Features: Detection, Description & Matching

Image Restoration and Reconstruction

Image Processing and Analysis

Sampling, Aliasing, & Mipmaps

Pop Quiz 1 [10 mins]

Digital Image Processing

PSD2B Digital Image Processing. Unit I -V

Structured Light. Tobias Nöll Thanks to Marc Pollefeys, David Nister and David Lowe

Anti-aliasing. Images and Aliasing

AP * Calculus Review. Area and Volume

Aliasing. Can t draw smooth lines on discrete raster device get staircased lines ( jaggies ):

CoE4TN4 Image Processing

Transcription:

Image Processing - Lesson 1 Image Acquisition + Histograms Image Characteristics Image Acquisition Image Digitization Sampling Quantization Histograms Histogram Equalization

What is an Image? An image is a projection of a 3D scene into a 2D projection plane. An image can be defined as a 2 variable function I(x,y), where for each position (x,y) in the projection plane, I(x,y) defines the light intensity at this point.

Three types of images: Binary images I(x,y) {0, 1} Gray-scale images Color Images I(x,y) [a, b] I R (x,y) I G (x,y) I B (x,y)

Image Intensity - Image Values Light energy emitted from a unit area in the image. Device dependence. Image Brightness - The subjective appearance of a unit area in the image. Context dependence. Subjective. Image Gray-Level - The relative intensity at each unit area. Between the lowest intensity (Black value) and the highest intensity (White value). Typical: In the range of [0,1] or [0,255]

Image Average (Brightness) Image average: I( x, y) dx dy I av = y x dx dy y x I I I NEW (x,y)=i(x,y)+b x x

Image Contrast The contrast at an image point denotes the (relative) difference between the intensity of the point and the intensity of its neighborhood: C = I p I I n n 0.3 0.1 0.7 0.5 C = = 2 C = = 0. 4 0.1 0.5 0.7 0.5 0.3 0.1

The contrast definition of the entire image is ambiguous. In general it is said that the image contrast is high if the image gray-levels fill the entire range. Low contrast High contrast

Contrast manipulation of the entire image can be done by stretching and shifting the image gray-levels I x I x I NEW (x,y)=a (I(x,y)-b)+c

The Image Histogram Image Histogram describes the relative proportion of gray-level I in the image plane: 1 H(I) 0.5 I H(I) 1 0.5 0.2 0.5 I 0.1 H(I) 0.5 I

Histograms - Examples H(I) I H(I) I H(I) I H(I) I

H(I) 0.1 0.5 I Decreasing the image contrast: H(I) 0.1 0.5 I Increasing the new image average : H(I) 0.1 0.5 I

Image Acquisition World Camera Digitizer Digital Image 0 10 10 15 50 70 80 0 0 100 120 125 130 130 0 35 100 150 150 80 50 0 15 70 100 10 20 20 0 15 70 0 0 0 15 PIXEL (picture element) 5 15 50 120 110 130 110 5 10 20 50 50 20 250 Typically: 0 = black 255 = white

Digitization f x 1 2 3 4 5 y Image Plane Continuous function of brightness: f(x,y) = i xy where: x,y R i xy R 1 2 3 4 5 100 100 100 100 100 100 0 0 0 100 100 0 0 0 100 100 0 0 0 100 100 100 100 100 100 Digital Image Array of gray levels: g i,j Κ where: K is bounded i,j = 1,2,3,...,c pixel Stages in the Digitization Process: SAMPLING - spatial QUANTIZATION - gray level

SAMPLING Two principles: coverage of the image plane uniform sampling (pixels are same size and shape) Hexagonal - 6 neighbors 1 cell orientation 3 principle directions non-recursive Triangular - neighbors: 3 edge neighbors 3 across corner 6 side corner 2 cell orientations 3 principle directions recursive Square Grid - neighbors: 4 edge neighbors 4 corner neighbors 1 cell orientation 2 principle directions recursive Used by most equipment (Raster)

Grayscale Image y = 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 x = 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 210 209 204 202 197 247 143 71 64 80 84 54 54 57 58 206 196 203 197 195 210 207 56 63 58 53 53 61 62 51 201 207 192 201 198 213 156 69 65 57 55 52 53 60 50 216 206 211 193 202 207 208 57 69 60 55 77 49 62 61 221 206 211 194 196 197 220 56 63 60 55 46 97 58 106 209 214 224 199 194 193 204 173 64 60 59 51 62 56 48 204 212 213 208 191 190 191 214 60 62 66 76 51 49 55 214 215 215 207 208 180 172 188 69 72 55 49 56 52 56 209 205 214 205 204 196 187 196 86 62 66 87 57 60 48 208 209 205 203 202 186 174 185 149 71 63 55 55 45 56 207 210 211 199 217 194 183 177 209 90 62 64 52 93 52 208 205 209 209 197 194 183 187 187 239 58 68 61 51 56 204 206 203 209 195 203 188 185 183 221 75 61 58 60 60 200 203 199 236 188 197 183 190 183 196 122 63 58 64 66 205 210 202 203 199 197 196 181 173 186 105 62 57 64 63

Using Different Number of Samples N = 4 N = 32 N = 8 N = 64 N = 16 N = 128

Image Resolution The density of the sampling denotes the separation capability of the resulting image. Image resolution defines the finest details that are still visible by the image. We use a cyclic pattern to test the separation capability of an image. frequency = number unit of cycles length unit length wavelength = = number of cycles 1 frequency 0 0 0 0

Nyquist Frequency

Nyquist Frequency

Sampling Density Nyquist Rule: Given a sampling at intervals equal to d then one may recover cyclic patterns of wavelength > 2d. (Shannon-Whittaker-Kotelnikov theorem). Aliasing: If the pattern wavelength is less than 2d erroneous patterns may be produced. 1D Example: 0 π 2π 3π 4π 5π 6π To observe details at frequency f one must sample at frequency > 2f. The Frequency 2f is the NYQUIST frequency.

Temporal Aliasing

Non Uniform Sampling

Quantization f(x,y) = i xy g i,j Κ pixel region pixel value Continuous Intensity Range Discrete Gray Levels Choose number of gray levels (according to number of assigned bits). Divide continuous range of intensity values.

Different Number of Gray Levels bits=1 bits=2 bits=3 bits=4 bits=8

Different Number of Gray Levels bits=1 bits=2 bits=3 bits=4 bits=8

Uniform Quantization:........ q 0 q 1 q 2 q 3 q k-1.... quantization level 0 Z 1 Z 2 Z 3 Z 4 Z k-1 Z k sensor voltage 10 8 Gray-Level 6 4 2 0 0 10 20 30 40 50 60 70 80 90 100 Z i+ 1 Sensor Voltage Z q i i = Z Z k Z K 0 + Z 2 i+ 1 i =

Non-Uniform Quantization 1. Non uniform visual sensitivity. q 0 q 1 q 2 q 3 q 4 q 5 q 6 Z 0 Z 1 Z 2 Z 3 Z 4 Z 5 Z 6 Z 7 High Visual Sensitivity Low Visual Sensitivity 2. Non uniform sensor voltage distribution q 1 q 2 q 3 q 4 q 5 quantization level sensor voltage 0 Z k

Optimal Quantization q 0 q 1 q 2 q 3 quantization level sensor voltage Z 0 Z 1 Z 2 Z 3 Z 4 Minimizing the quantization error: k 1 Z i= 0 i+ 1 Z i 2 ( q Z) P( Z)dz i where P(Z) is the distribution of sensor voltage. Solution: q i = Z i + 1 Z Z i i + 1 Z ZP i P ( Z ) ( Z ) dz dz (weighted average in the range [Z i... Z i+1 ]) Z i = ( q i 1 +q i )/ 2

Discrete Histogram Occurrence (# of pixels) Gray Level H(k) = #pixels with gray-level k Normalized histogram: H norm (k)=h(k)/n where N is the total number of pixels in the image.

Gray Level Separation: Visual discrimination between objects depends on the their gray-level separation. Can we improve discrimination AFTER image has been quantized? Hard to discriminate 3 4 Doesn t help 23 24 This is better 3 23?????? 3 4 23 24

Histogram Equalization For a better visual discrimination we would like to re-assign gray-levels with maximal uniformity. Define a gray-level transformation such that: The histogram according to g ) is as flat as possible. The order of Gray-levels is maintained. The histogram bars are not fragmented. For example: ) g = T(g) H (0) + H (1) +... + H ( g) T ( g) = 255 N

3500 3000 2500 2000 1500 1000 500 0 0 50 100 150 200 250 3500 3000 2500 2000 1500 1000 500 0 0 50 100 150 200 250

Histogram Equalization - Example 000 500 000 500 000 500 0 0 50 100 150 200 250 Original 3000 2500 2000 1500 1000 500 0 0 50 100 150 200 250 Equalized

Example Questions 1. Given an image I(x,y) [0,1]. How can we obtain the maximum contrast image using a linear gray-level transformation: Find a and b. Given the histogram of I, describe, the histogram of I NEW. Hints: I NEW (x,y)=a I(x,y)+b Use the values MAX(I) and MIN(I) which are the maximal and minimal gray-level values in the image. The new gray-level values should be kept in the range [0,1]. 2. Given the histogram H(I) what is the average of the image I?

3. In the following cyclic pattern the frequency in the X direction is 20 cycles/length. y x What is the wavelength of this pattern in the X direction? What is the frequency and wavelength of this pattern in the Y direction? What is the frequency and wavelength (for X and Y) of this pattern after rotating it by 30 degrees clockwise? y x