Presentation is loading. Please wait.

Presentation is loading. Please wait.

Image Resampling ASTR 3010 Lecture 21 Textbook 9.4.

Similar presentations


Presentation on theme: "Image Resampling ASTR 3010 Lecture 21 Textbook 9.4."— Presentation transcript:

1 Image Resampling ASTR 3010 Lecture 21 Textbook 9.4

2 from Tom McGlynn’s IPAM Workshop presentation Why do we need to resample? Display – transform image into ‘standard’ form Display – transform image into ‘standard’ form o Undo warps and distortions o Transform to standard frame o Resizing: upsampling or downsampling o Rotation Image comparison – transform one image to match another Image comparison – transform one image to match another Mosaicking Mosaicking o Building sky region and all sky images Image arithmetic Image arithmetic o Dither additions, image differencing, speckle analysis

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

4 Nearest Neighbor Nearest 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 grid orange: nearest neighbor in the input red: output value

5 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.

6 Bilinear interpolation A common method for resampling images A common method for resampling images a b

7 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.

8 Example of 4x Upsampling Nearest neighbor Bilinear Bicubic Original

9 Interpolation smoothes out features 0.5 pixel shifted and Linear interpolated resampled x3 shifted and interpolated Original Signal

10 Resolution enhancement (or Super-Resolution) Nearest Neighbor degrades positional information Nearest Neighbor degrades positional information Bilinear (or other low order interpolations) smooth the signal Bilinear (or other low order interpolations) smooth the signal Three commonly used resampling strategies Three commonly used resampling strategies o Shift-and-add (and interpolate) o Interlace o Drizzle

11 Shift-and-add output grid input grid

12 Shift-and-add output grid fractional contribution from an input pixel to several output pixels

13 Shift-and-add output grid fractional contribution from an input pixel to several output pixels

14 Interlace output grid input grid

15 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)

16 Interlace 1D example: Python HW#5 Four samplings of a double Gaussian-peak distribution. Four samplings of a double Gaussian-peak distribution. Each sampling was shifted (“dithered”) with +0.25 pixels to the right. 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. Construct an interlaced distribution showing a 4 times better resolution.

17 Problems and Limitation Interlace for a single image is a flawed approach: Interlace for a single image is a flawed approach: o it creates a discontinuous image o positional error b/c we ignore any fractional coordinates  with many input images, these two problems will become less significant. Shift-and-add and Interlace methods both require precise information on “shift” between images 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. 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.

18 Drizzle (variable-pixel linear reconstruction) output grid input grid input drop

19 Drizzle output grid input grid empty output pixel In Pyraf, pydrizzle is available by “import pydrizzle” p d f=d/p f  0 interlace f  1 shift and add

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

21 In summary… Important Concepts Resampling o shift-and-add o interlace o drizzle Important Terms Chapter/sections covered in this lecture : 9.4


Download ppt "Image Resampling ASTR 3010 Lecture 21 Textbook 9.4."

Similar presentations


Ads by Google