1 / 13

Enlarging or Contracting a Digital Image

Learn about the methods and processes of enlarging or contracting digital images through zooming and image resizing. Understand pixel arrays, visualizing images, pixel replication, parametric forms, bilinear interpolation, and more.

vquinn
Download Presentation

Enlarging or Contracting a Digital Image

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. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Enlarging or Contracting a Digital Image Zoom, zoom, zoom…

  2. Image Resizing • May either increase or decrease the total number of pixels used to represent the image • The process may be viewed as projecting samples from one scale to another Gene A. Tagliarini, PhD

  3. Pixel Arrays • Start with an M row x N column array of image samples • Assume a zoom factor zf so that the number of rows M* and columns N* in the zoomed image are • M* = zf * M • N* = zf * N Gene A. Tagliarini, PhD

  4. Visualizing An Image Zoom Gene A. Tagliarini, PhD

  5. More Notation and Conventions • Let (assume Java): • M* = (int) zf * M; • N* = (int) zf * N; • Assume ms and ns are row and column indices of the source, respectively, and that mz and nz are row and column indices, respectively, of the zoomed image • msε {0,…,M} and nsε {0,…,N} • mzε {0,…,M*} and nzε {0,…,N*} Gene A. Tagliarini, PhD

  6. Zooming By Pixel Replication • Map the pixel coordinates (mz, nz) back to the source image coordinates (ms, ns) • ms = (int) (mz/zf) • ns = (int) (nz /zf) • Use the value v of the nearby source image pixel v(ms, ns) Gene A. Tagliarini, PhD

  7. nz n mz m Visualizing An Image Zoom Gene A. Tagliarini, PhD

  8. Pixel Replication • Uses a neighbor of the contracted representation • May give rise to a pixelated representation Gene A. Tagliarini, PhD

  9. y(x) A Useful Parametric Form • Let: • a and b be constants with a < b • x ε [0, 1] • y = a + (b-a) * x • Note • y(0) = a • y(1) = b • If x ε (0, 1), then a < y < b a b Gene A. Tagliarini, PhD

  10. Extending A Useful Parametric Form • Let: • a and b be vectors • x ε [0, 1] is scalar • y = a + (b-a) * x • Note • y(0) = a • y(1) = b • If x ε (0, 1), then y lies “between” a and b in the plane determined by a and b b-a y b a Gene A. Tagliarini, PhD

  11. Bilinear Interpolation • Zoomed pixel at (mz, nz) • When mapped back to the source image coordinates likely lies in a region bounded by 4 original image pixels (ms, ns) (ms+1, ns) (ms, ns+1) (ms+1, ns+1) • Where • ms = (int) (mz/zf) • ns = (int) (nz /zf) Gene A. Tagliarini, PhD

  12. ns ns+1 A B E ms y P mz C F D ms+1 x nz Bilinear Interpolation (continued) • The intensity of pixel P can be calculated given the intensities of pixels A, B, C, and D, with scalars x, yε [0, 1] using: • E = A + (B-A)*x • F = C + (D-C)*x • P = E + (F-E)*y Gene A. Tagliarini, PhD

  13. B E A C P F D Bilinear Interpolation (continued) Gene A. Tagliarini, PhD

More Related