Image Editing by Point Operatons

21
Image Editing by Point Operatons Fall 2001 Martin Jagersand

description

Image Editing by Point Operatons. Fall 2001 Martin Jagersand. 3D reality -> captured 2D image. x. z. y. y. x. z. y. x. Pinhole cameras. Examples of image sources:. Analog cameras Digital cameras Optic Scanners (linear image sensors) Laser scanners (2 and 3D images) Radar X-ray - PowerPoint PPT Presentation

Transcript of Image Editing by Point Operatons

Page 1: Image Editing by Point Operatons

Image Editing by Point Operatons

Fall 2001

Martin Jagersand

Page 2: Image Editing by Point Operatons

3D reality -> captured 2D image

x

y

z

x

y

z

x

y

Page 3: Image Editing by Point Operatons

Pinhole cameras

Page 4: Image Editing by Point Operatons

Examples of image sources:

Analog cameras Digital cameras Optic Scanners (linear image sensors) Laser scanners (2 and 3D images) Radar X-ray NMRI

Page 5: Image Editing by Point Operatons

Image display

VDU– Raster– Vector

LCD Printer Photo process Plotter (x-y table type)

Page 6: Image Editing by Point Operatons

Pixel

Binary1 bit

Grey1 byte

Color3 bytes

THE ORGANIZATION OF A 2D IMAGE

Page 7: Image Editing by Point Operatons

Mathematical / Computationalimage models

Continuous mathematical:

I = f(x,y) Discrete (in computer) adressable 2D array:

I = matrix(i,j) Discrete (in file) e.g. ascii or binary sequence:

023 233 132 232

125 134 134 212

Page 8: Image Editing by Point Operatons

Image representation for display

True color, RGB, ….

(R,G,B) (R,G,B) … (R,G,B)

:

(R,G,B)

Page 9: Image Editing by Point Operatons

Image representation for display

Indexed image

(I) (I) … (I)

:

(I)

(R,G,B)

(R,G,B)

:

(R,G,B)

Page 10: Image Editing by Point Operatons

Point operations on images

Point operations perform some operation on one pixel at a time (independent on the neighboring pixels) For each (x,y)

I2(x,y) = f(I(x,y)) Contrast to image transforms (later in course)

perform operations on the whole image

Page 11: Image Editing by Point Operatons

Common point operations

Brightness adjustment Contrast adjustment

– Dynamic range compression– Gray level slicing

Histogram equalization Image (sequence) averaging Background subtraction

Page 12: Image Editing by Point Operatons

Linear brightness and contrast adjustment

As seen on TV! Brightness

For each (x,y)

I2(x,y) = I(x,y)+const Contrast

I2(x,y) = const*I(x,y)

Page 13: Image Editing by Point Operatons

Contrast adjustment example

Page 14: Image Editing by Point Operatons

Special purpose contrast adjustments

Dynamic range limitation

I2(x,y) = sqrt(I(x,y))

I2(x,y) = log(I(x,y)) Inverted image

I2(x,y) = 1-I(x,y) Gray level slicing

Page 15: Image Editing by Point Operatons

Image histogram

For a discrete image quantized e.g. on [0..255] – Let n = total number of pixels– Let nk = number of pixels with value k– Histogram: pk = nk / n

Analogy: Consider the image a sample of a random variable. Then pk is probability of a pixel having value k

Page 16: Image Editing by Point Operatons

Histogram examples

Dark image Light image

narrow contrast Wide contrast

Page 17: Image Editing by Point Operatons

Histogram equalization

Let p(k) = image histogram on k = [0..1] Goal: find a contrast stretching transform T(k)

so that I2 = T(I) and p2 = 1(uniform)

p(k) p2

Page 18: Image Editing by Point Operatons

Histogram eq.

Consider:

Then:

s = T(r) =R

0

r

pr(w)dw; r 2 [0::1]

p2(s) = p1(r)dsdr = p1(r)p1(r)

1 = 1

drds = p1(r)

Page 19: Image Editing by Point Operatons

Discrete histogram equalization

Compute discrete histogram summing bins Compute cumulative sum Map image intensities through cumulative

histogram

Question: is discrete histogram uniform?

Page 20: Image Editing by Point Operatons

Background subtraction

Subtract out static background to capture changes

- =What process actually happened?

Page 21: Image Editing by Point Operatons

Image averaging

Average several images of the same scene

Is(x,y) = sum(I(x,y))/n Can remove noise