21
Image Resampling ASTR 3010 Lecture 21 Textbook 9.4

Image Resampling

  • Upload
    jed

  • View
    48

  • Download
    2

Embed Size (px)

DESCRIPTION

Image Resampling. ASTR 3010 Lecture 21 Textbook 9.4. Why do we need to resample?. Display – transform image into ‘standard’ form Undo warps and distortions Transform to standard frame Resizing: upsampling or downsampling Rotation - PowerPoint PPT Presentation

Citation preview

Page 1: Image  Resampling

Image Resampling

ASTR 3010

Lecture 21

Textbook 9.4

Page 2: Image  Resampling

from Tom McGlynn’s IPAM Workshop presentation

Why do we need to resample?• Display – transform image into ‘standard’ formo Undo warps and distortionso Transform to standard frameo Resizing: upsampling or downsamplingo Rotation

• Image comparison – transform one image to match another

• Mosaickingo Building sky region and all sky images

• Image arithmetico Dither additions, image differencing, speckle analysis

Page 3: Image  Resampling

Resampling example

SkyView transforms the EGRET all sky map in Galactic coordinates to Equatorial coordinates.

Page 4: Image  Resampling

Nearest NeighborNearest neighbor assignment is the resampling technique of choice for discrete data since it does not alter the value of the input cells.

However, astrometric accuracy is degraded.

gray grid: input gridorange: nearest neighbor in the inputred: output value

Page 5: Image  Resampling

Bilinear interpolation

Bilinear interpolation is done by identifying the four nearest cell centers on the input raster (in orange) and assigning itself to the weighted average of the four values. This process is repeated for each cell in the output raster.

Page 6: Image  Resampling

Bilinear interpolation• A common method for resampling images

ab

Page 7: Image  Resampling

Cubic interpolation

by identifying the 16 nearest cell centers on the input raster (in orange) and assigning itself to the weighted average of the 16 values.

Page 8: Image  Resampling

Example of 4x Upsampling

Nearest neighbor

Bilinear

Bicubic

Original

Page 9: Image  Resampling

Interpolation smoothes out features

0.5 pixel shiftedandLinear interpolated

resampled x3shiftedand interpolated

Original Signal

Page 10: Image  Resampling

Resolution enhancement (or Super-Resolution)• Nearest Neighbor degrades positional information• Bilinear (or other low order interpolations) smooth the signal

• Three commonly used resampling strategieso Shift-and-add (and interpolate)o Interlaceo Drizzle

Page 11: Image  Resampling

Shift-and-add

output grid input grid

Page 12: Image  Resampling

Shift-and-add

output grid fractional contribution from aninput pixel to several outputpixels

Page 13: Image  Resampling

Shift-and-add

output grid fractional contribution from aninput pixel to several outputpixels

Page 14: Image  Resampling

Interlace

output grid input grid

Page 15: Image  Resampling

Interlace

Repeat this process for many input images with known dithers super-resolution

examine each input pixel. locate its transformed center in the output grid. assign ALL input pixel count to a corresponding output pixel (no fractional coordinates)

Page 16: Image  Resampling

Interlace 1D example: Python HW#5• Four samplings of a double Gaussian-peak distribution. • Each sampling was shifted (“dithered”) with +0.25

pixels to the right.

sample1=[0.39,38.92,26.39,34.27]sample2=[3.39,42.92,38.20,15.50]sample3=[12.02,36.63,46.63,4.72]sample4=[26.32,27.30,45.54,0.80]

• Construct an interlaced distribution showing a 4 times better resolution.

Page 17: Image  Resampling

Problems and Limitation• Interlace for a single image is a flawed approach: o it creates a discontinuous imageo positional error b/c we ignore any fractional coordinateswith many input images, these two problems will become less significant.

• Shift-and-add and Interlace methods both require precise information on “shift” between images

• Limited precision of many actual telescope controls usually produces a set of images whose grids are randomly dithered at the sub-pixel level not suitable for S&A and interlace.

Page 18: Image  Resampling

Drizzle (variable-pixel linear reconstruction)

output grid input grid

input drop

Page 19: Image  Resampling

Drizzle

output grid input grid

empty output pixel

In Pyraf, pydrizzle is available by “import pydrizzle”

p

d

f=d/p

f0 interlacef1 shift and add

Page 20: Image  Resampling

Drizzle Example• M57• left (original image) right (2x drizzle with 100 input images)

Page 21: Image  Resampling

In summary…

Important Concepts• Resampling o shift-and-addo interlaceo drizzle

Important Terms

Chapter/sections covered in this lecture : 9.4