today early vision on a single image

29
Today Early vision on a single image

Upload: others

Post on 13-Mar-2022

2 views

Category:

Documents


0 download

TRANSCRIPT

Today

Early vision on a single image

Midterm Exam

Starting from 12:00am EST, Tuesday, March 9th in Blackboard

Due: 11:59pm EST, Wednesday, March 10th

A calculator is allowed

Cover everything till the class on Thursday, March 4th

Open book and open notes

Reminder

Homework #2 is due on 11:59pm EST, Thursday, Feb 11th.

Early Vision on One Image

So far, we talked about image formation. Next, we will discuss early vision on one image

โ€ข Linear and nonlinear filters

โ€ข Linear and nonlinear filters for noise reduction

โ€ข Linear filters for differentiation

โ€ข Edge detection

โ€ข Features

โ€ข Edges, lines, curves, corners etc.

Early Vision on One Image

BinaryGray level Color

Binary Image

1 1 1

0: Black

1: White

p

q

X

Y

0

Row 1

Row q

Gray Scale Image

10 5 9

100

Color Image (RGB)B

G

R

Early Vision on One Image: Two Important

Topics

โ€ข Image noise: intrinsic property of the sensor (CCD) and independent of scene

โ€ข Intensity noise โ€“ quantization and sensor

โ€ข Positional noise โ€“ spatial sampling

Early Vision on One Image: Two Important

Topics

โ€ข Features: characterizing the shape/appearance of the objects in the image

โ€ข Edges, lines, curves, corners etc.

โ€ข Image statistics: mean, variance, histogram etc.

โ€ข Complex features

โ€ข Widely used in many problems of computer vision including camera calibration, stereo, object detection/tracking/recognition, etc.

Properties of Noise

โ€ข Spatial properties

โ€ข Spatially periodic noise

โ€ข Spatially independent noise

โ€ข Frequency properties

โ€ข White noise โ€“ noise containing all frequencies within a bandwidth

Image Noise

แˆ˜๐ผ(๐‘ฅ, ๐‘ฆ) = ๐ผ(๐‘ฅ, ๐‘ฆ) + ๐œ‚(๐‘ฅ, ๐‘ฆ)

Image noise

Observed image intensity Ideal image intensity

Some Important Noise Model

๐‘(๐‘ง) =1

2๐œ‹๐œŽ๐‘’โˆ’(๐‘งโˆ’ ว‰๐‘ง)2

2๐œŽ2

โ€ข Due to electronic circuit

โ€ข Due to the image sensor

โ€ข poor illumination

โ€ข high temperature

Most popular noise model

Assumption: the image noise is identically and independently.

Gaussian noise model

Some Important Noise Model

๐‘(๐‘ง) = แ‰2

๐‘(๐‘ง โˆ’ ๐‘Ž)๐‘’โˆ’

(๐‘งโˆ’๐‘Ž)2

๐‘ ๐‘ง โ‰ฅ ๐‘Ž

0 ๐‘ง < ๐‘Ž๐‘(๐‘ง) = เตž

๐‘Ž๐‘๐‘ง๐‘โˆ’1

(๐‘ โˆ’ 1)!๐‘’โˆ’๐‘Ž๐‘ง ๐‘ง โ‰ฅ 0

0 ๐‘ง < 0

Rayleigh noise

โ€ข range imaging

โ€ข Background model for Magnetic

Resonance Imaging (MRI) images

Gamma noise

โ€ข laser imaging

Figure from โ€œDigital Image Processingโ€, Gonzalez and Woods

Some Important Noise Model

๐‘ƒ(๐‘ง) =

๐‘ƒ๐‘Ž for ๐‘ง = ๐‘Ž๐‘ƒ๐‘ for ๐‘ง = ๐‘

0 Otherwise

๐‘ƒ(๐‘ง) = แ‰Š๐‘Ž๐‘’โˆ’๐‘Ž๐‘ง ๐‘ง โ‰ฅ 00 ๐‘ง < 0 ๐‘ƒ(๐‘ง) = แ‰

1

๐‘ โˆ’ ๐‘Ž๐‘Ž โ‰ค ๐‘ง โ‰ค ๐‘

0 ๐‘œ๐‘กโ„Ž๐‘’๐‘Ÿ๐‘ค๐‘–๐‘ ๐‘’

Exponential noise

โ€ข laser imaging

Impulse noise

โ€ข salt and pepper noise

โ€ข A/D converter error

โ€ข bit error in transmission

Uniform noise

Figure from โ€œDigital Image Processingโ€, Gonzalez and Woods

An Example

What is its histogram?

Figure from โ€œDigital Image Processingโ€, Gonzalez and Woods

An Example (cont.)

Figure from โ€œDigital Image Processingโ€, Gonzalez and Woods

ExponentialRayleigh GammaGaussian Uniform Salt & Pepper

Another Example

Sigma =1 Sigma =16

Periodical Noise

Image is corrupted by a set of

sinusoidal noise of different

frequencies

Figure from โ€œDigital Image Processingโ€, Gonzalez and Woods

Estimation of Noise Parameters

Take a small stripe of the background, do statistics for the mean and variance.

Figure from โ€œDigital Image Processingโ€, Gonzalez and Woods

Image Denoising by Filtering

Gaussian Noise

Gaussian

Smoothing

Averaging

Image Filtering

Modifying the pixels in an image based on some function of a local neighborhood of the pixels

10 30 10

20 11 20

11 9 1

p

N(p)

f(p)

๐‘“ ๐‘

f(p):

โ€ข Linear functionโ€ข Correlation

โ€ข Convolution

โ€ข Nonlinear functionโ€ข Order statistic (median)

Linear Filters

General process:

โ€ข Form new image whose pixels are a weighted sum of original pixel values, using the same set of weights at each point.

Properties

โ€ข Output is a linear function of the input

โ€ข Output is a shift-invariant function of the input (i.e. shift the input image two pixels to the left, the output is shifted two pixels to the left)

Example: smoothing by averaging

โ€ข form the average of pixels in a neighborhood

Example: smoothing with a Gaussian

โ€ข form a weighted average of pixels in a neighborhood

Example: finding an edge

Linear Filtering

The output is the linear combination of the neighborhood pixels

The coefficients of this linear combination combine to form the โ€œfilter-kernelโ€

๐‘“ ๐‘ =

๐‘ž๐‘–โˆˆ๐‘ ๐‘

๐‘Ž๐‘–๐‘ž๐‘–

1 3 0

2 10 2

4 1 1

Image

1 0 -1

1 0.1 -1

1 0 -1

Kernel

= 5

Filter Output

โŠ—

Convolution

๐‘“ ๐‘–, ๐‘— = ๐ผ โˆ— ๐ป =

๐‘˜

๐‘™

๐ผ ๐‘˜, ๐‘™ ๐ป ๐‘– โˆ’ ๐‘˜, ๐‘— โˆ’ ๐‘™

๐ผ = Image๐ป = Kernel

H7 H8 H9

H4 H5 H6

H1 H2 H3

H9 H8 H7

H6 H5 H4

H3 H2 H1

H1 H2 H3

H4 H5 H6

H7 H8 H9

๐ป

๐‘‹ โˆ’ ๐‘“๐‘™๐‘–๐‘

๐‘Œ โˆ’ ๐‘“๐‘™๐‘–๐‘

I1 I2 I3

I4 I5 I6

I7 I8 I9

โŠ—

๐ผ โˆ— ๐ป = ๐ผ1๐ป9 + ๐ผ2๐ป8 + ๐ผ3๐ป7

+ ๐ผ4๐ป6 + ๐ผ5๐ป5 + ๐ผ6๐ป4

+ ๐ผ7๐ป3 + ๐ผ8๐ป2 + ๐ผ9๐ป1

๐ผ

Linear Filtering

0 0 0

0 1 0

0 0 0

โˆ—=

Linear Filtering

0 0 0

0 0 1

0 0 0

โˆ—=

Linear Filtering (Smoothing)

1 1 1

1 1 1

1 1 1

โˆ—1

9=

Linear Filtering (Blurring)

1 1 1 1 1

1 1 1 1 1

1 1 1 1 1

1 1 1 1 1

1 1 1 1 1

โˆ—1

25=