image transforms n.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Image Transforms PowerPoint Presentation
Download Presentation
Image Transforms

Loading in 2 Seconds...

play fullscreen
1 / 65

Image Transforms - PowerPoint PPT Presentation


  • 130 Views
  • Uploaded on

Image Transforms. Transforming images to images. Classification of Image Transforms. Point transforms Modify individual pixels Modify pixels’ locations Local transforms Output derived from neighbourhood Global transforms Whole image contributes to each output value. Point Transforms.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Image Transforms' - pebbles


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
image transforms

Image Transforms

Transforming images to images

classification of image transforms
Classification of Image Transforms
  • Point transforms
    • Modify individual pixels
    • Modify pixels’ locations
  • Local transforms
    • Output derived from neighbourhood
  • Global transforms
    • Whole image contributes to each output value

Image Processing and Computer Vision: 2

point transforms
Point Transforms
  • Manipulating individual pixel values
    • Brightness adjustment
    • Contrast adjustment
  • Histogram manipulation
    • Equalisation
  • Image magnification

Image Processing and Computer Vision: 2

grey scale manipulation
Grey Scale Manipulation
  • Brightness modifications
  • Contrast modifications
  • Histogram manipulation

Image Processing and Computer Vision: 2

brightness adjustment
Brightness Adjustment

Add a constant to all values

g’ = g + k

(k = 50)

Image Processing and Computer Vision: 2

contrast adjustment
Contrast Adjustment

Scale all values by a constant

g’ = g*k

(k = 1.5)

Image Processing and Computer Vision: 2

image histogram
Image Histogram
  • Measure frequency of occurrence of each grey/colour value

Image Processing and Computer Vision: 2

histogram manipulation
Histogram Manipulation
  • Modify distribution of grey values to achieve some effect

Image Processing and Computer Vision: 2

equalisation adaptive equalisation
Equalisation/Adaptive Equalisation
  • Specifically to make histogram uniform

Image Processing and Computer Vision: 2

equalisation transform
Equalisation Transform
  • Equalised image has n x m/l pixels per grey level
  • Cumulative to level j
    • jnm/l pixels
  • Equate to a value in input cumulative histogram C[i]
    • C[i] = jnm/l
    • j = C[i]l/nm
    • Modifications to prevent mapping to –1.

Image Processing and Computer Vision: 2

thresholding
Thresholding
  • Transform grey/colour image to binary

if f(x, y) > T output = 1

else 0

  • How to find T?

Image Processing and Computer Vision: 2

threshold value
Threshold Value
  • Manual
    • User defines a threshold
  • P-Tile
  • Mode
  • Other automatic methods

Image Processing and Computer Vision: 2

p tile
P-Tile
  • If we know the proportion of the image that is object
  • Threshold the image to select this proportion of pixels

Image Processing and Computer Vision: 2

slide14
Mode

Threshold at the minimum between the histogram’s peaks.

Image Processing and Computer Vision: 2

automated methods

Average l

Average h

Automated Methods

Find a threshold  such that

(Start at  = 0 and work upwards.)

Image Processing and Computer Vision: 2

image magnification
Image Magnification
  • Reducing
    • New value is weighted sum of nearest neighbours
    • New value equals nearest neighbour
  • Enlarging
    • New value is weighted sum of nearest neighbours
    • Add noise to obscure pixelation

Image Processing and Computer Vision: 2

local transforms
Local Transforms
  • Convolution
  • Applications
    • Smoothing
    • Sharpening
    • Matching

Image Processing and Computer Vision: 2

convolution definition
Convolution Definition

Place template on image

Multiply overlapping values in image and template

Sum products and normalise

(Templates usually small)

Image Processing and Computer Vision: 2

example
Example

Image

Template

Result

… . . . . . ...

… 3 5 7 4 4 …

… 4 5 8 5 4 …

… 4 6 9 6 4 …

… 4 6 9 5 3 …

… 4 5 8 5 4 …

… . . . . . ...

… . . . . . ...

… . . . . . ...

… . 6 6 6 . …

… . 6 7 6 . …

… . 6 7 6 . …

… . . . . . ...

… . . . . . ...

1 1 1

1 2 1

1 1 1

Divide by template sum

Image Processing and Computer Vision: 2

separable templates
Separable Templates
  • Convolve with n x n template
    • n2 multiplications and additions
  • Convolve with two n x 1 templates
    • 2n multiplications and additions

Image Processing and Computer Vision: 2

example1
Example

0 –1 0

-1 4 –1

0 –1 0

  • Laplacian template
  • Separated kernels

-1

2

-1

-1 2 -1

Image Processing and Computer Vision: 2

composite filters
Composite Filters
  • Convolution is distributive
  • Can create a composite filter and do a single convolution
  • Not convolve image with one filter and convolve result with second.
  • Efficiency gain

Image Processing and Computer Vision: 2

applications
Applications
  • Usefulness of convolution is the effects generated by changing templates
    • Smoothing
      • Noise reduction
    • Sharpening
      • Edge enhancement
    • Template matching
      • A later lecture

Image Processing and Computer Vision: 2

smoothing
Smoothing
  • Aim is to reduce noise
  • What is “noise”?
  • How is it reduced
    • Addition
    • Adaptively
    • Weighted

Image Processing and Computer Vision: 2

noise definition
Noise Definition
  • Noise is deviation of a value from its expected value
    • Random changes
      • x  x + n
    • Salt and pepper
      • x  {max, min}

Image Processing and Computer Vision: 2

noise reduction
Noise Reduction
  • By smoothing

S(x + n) = S(x) + S(n) = S(x)

    • Since noise is random and zero mean
  • Smooth locally or temporally
  • Local smoothing
    • Removes detail
    • Introduces ringing

Image Processing and Computer Vision: 2

adaptive smoothing
Adaptive Smoothing
  • Compute smoothed value, s

Output = s if |s – x| > T

x otherwise

Image Processing and Computer Vision: 2

median smoothing
Median Smoothing

Median is one value in an ordered set:

1 2 3 4 5 6 7  median = 4

2 3 4 5 6 7  median = 4.5

Image Processing and Computer Vision: 2

slide29

Original

Smoothed

Median Smoothing

Image Processing and Computer Vision: 2

gaussian smoothing
Gaussian Smoothing
  • To reduce ringing
  • Weighted smoothing
  • Numbers from Gaussian (normal) distribution are weights.

Image Processing and Computer Vision: 2

sharpening and edge enhancement
Sharpening and Edge Enhancement
  • What is it?
    • Enhancing discontinuities
    • Edge detection
  • Why do it?
    • Perceptually important
    • Computationally important

Image Processing and Computer Vision: 2

edge definition
Edge Definition

Image Processing and Computer Vision: 2

edge types
Edge Types
  • Step edge
  • Line edge
  • Roof edge
  • Real edges

Image Processing and Computer Vision: 2

first derivative gradient edge detection
First Derivative, Gradient Edge Detection
  • If an edge is a discontinuity
  • Can detect it by differencing

Image Processing and Computer Vision: 2

roberts cross edge detector
Roberts Cross Edge Detector
  • Simplest edge detector
  • Inaccurate localisation

Image Processing and Computer Vision: 2

prewitt sobel edge detector
Prewitt/Sobel Edge Detector

Image Processing and Computer Vision: 2

edge detection
Edge Detection
  • Combine horizontal and vertical edge estimates

Image Processing and Computer Vision: 2

problems
Problems
  • Enhanced edges are noise sensitive
  • Scale
    • What is “local”?

Image Processing and Computer Vision: 2

canny deriche edge detector
Canny/Deriche Edge Detector
  • Require
    • Edges to be detected
    • Accurate localisation
    • Single response to an edge
  • Solution
    • Convolve image with Difference of Gaussian (DoG)

Image Processing and Computer Vision: 2

example results
Example Results

Image Processing and Computer Vision: 2

second derivative operators zero crossing
Second Derivative Operators Zero Crossing
  • Model HVS
  • Locate edge to subpixel accuracy
  • Convolve image with Laplacian of Gaussian (LoG)
  • Edge location at crossing of zero axis

Image Processing and Computer Vision: 2

example results1
Example Results

Image Processing and Computer Vision: 2

global transforms
Global Transforms
  • Computing a new value for a pixel using the whole image as input
  • Cosine and Sine transforms
  • Fourier transform
    • Frequency domain processing
  • Hough transform
  • Karhunen-Loeve transform
  • Wavelet transform

Image Processing and Computer Vision: 2

cosine sine
Cosine/Sine
  • A halfway solution to the Fourier Transform
  • Used in image coding

Image Processing and Computer Vision: 2

fourier
Fourier
  • All periodic signals can be represented by a sum of appropriately weighted sine/cosine waves

Image Processing and Computer Vision: 2

slide46

Transformed section of BT Building image.

Image Processing and Computer Vision: 2

frequency domain filtering
Frequency Domain Filtering
  • Convolution Theorem:

Convolution in spatial domain

is equivalent to

Multiplication in frequency domain

Image Processing and Computer Vision: 2

smoothing1
Smoothing

Suppress high frequency components

Image Processing and Computer Vision: 2

sharpening
Sharpening

Suppress low frequency components

Image Processing and Computer Vision: 2

hough transform
Hough Transform
  • To detect curves analytically
  • Example
    • Straight lines

Image Processing and Computer Vision: 2

straight line
Straight Line

y = mx + c

gradient m, intercept c

c = -mx + y

gradient -x, intercept y

ALL points in (x, y) transform to a straight line in (c, m)

Can therefore detect collinear points

Image Processing and Computer Vision: 2

analytic curve finding
Analytic Curve Finding
  • Alternative representation
    • To avoid infinities
  • Other curves
    • Higher dimensional accumulators

Image Processing and Computer Vision: 2

performance improvement techniques
Performance Improvement Techniques
  • Look at pairs of points
  • Use edge orientation

Image Processing and Computer Vision: 2

karhunen loeve principal component
Karhunen-Loeve (Principal Component)
  • A compact method of representing variation in a set of images
  • PCs define a co-ordinate system
    • 1st PC records most of variation
    • 2nd PC records most of remainder
    • etc

Image Processing and Computer Vision: 2

method
Method
  • Take a set of typical images
  • Compute mean image and subtract from each sample
  • Transform images into columns
  • Group images into a matrix
  • Compute covariance matrix
  • Compute eigenvectors
    • These are the PCs
    • Eigenvalues show their importance

Image Processing and Computer Vision: 2

slide56
Uses
  • Compact representation of variable data
  • Object recognition

Image Processing and Computer Vision: 2

wavelet

detail

Wavelet
  • A hierarchical representation

Image Processing and Computer Vision: 2

example2
Example

Image Processing and Computer Vision: 2

slide59
Uses
  • Hierarchical representation
  • Multiresolution processing
  • Coding

Image Processing and Computer Vision: 2

geometric transformations
Geometric Transformations
  • Definitions
    • Affine and non-affine transforms
  • Applications
    • Manipulating image shapes

Image Processing and Computer Vision: 2

affine transforms scale shear rotate translate

[

]

x’

y’

1

[

]

[

]

a b c

d e f

g h i

x

y

1

Affine TransformsScale, Shear, Rotate, Translate

Length and areas preserved.

=

Change values of transform matrix elements according to desired effect.

a, e  scaling

b, d  shearing

a, b, d, e  rotation

c, f  translation

Image Processing and Computer Vision: 2

affine transform examples
Affine Transform Examples

Image Processing and Computer Vision: 2

warping example
Warping Example

Ansell Adams’ Aspens

Image Processing and Computer Vision: 2

image resampling
Image Resampling
  • Moving source to destination pixels
  • x’ and y’ could be non-integer
  • Round result
    • Can create holes in image
  • Manipulate in reverse
    • Where did warped pixel come from
    • Source is non-integer
      • Interpolate nearest neighbours

Image Processing and Computer Vision: 2

you should know
You Should Know…
  • Point transforms
    • Scaling, histogram manipulation, thresholding
  • Local transforms
    • Edge detection, smoothing
  • Global transforms
    • Fourier, Hough, Principal Component, Wavelet
  • Geometrical transforms

Image Processing and Computer Vision: 2