User`s guide
5 Geometri c Transformation
Interpolation Overview
Video a nd Image Processing Blockset contains blocks that perform geometric
transformations. These blocks use interpolation to calculate the appropriate
pixel values so that images appear rotated, translated, resized, or s heared.
Note Theexamplesinthissectionareillustrations of in terp ol ation m ethods.
The block algorithms are implemented in a slightly different way so that they
are optimized for speed and memory.
The following secti on s illustrate the geometric transformation blocks’
interpolation methods:
• “Nearest Ne ig hbor Interpolation” on page 5-2 — Understand the basic
concepts of nearest neighbor inte rpo lation
• “Bilinear Interpolation” on page 5-3 — U nders tand the basic concepts of
bilinear interpolation
• “Bicubic Interpolation” on page 5-4 — Understand the b a s ic concepts of
bicubic interpolation
Nearest Neighbor Interpolation
For nearest neighbor interpolation, the block uses the value of nearby
translated pixel values for the output p ix el values.
For example, suppose this matrix,
123
456
789
represents
your input image. You want to translate this image 1.7 pixels in
the positi
ve horizontal direction using nearest neighbor interpolation. The
Translate
block’s nearest neighbor interpola t ion algorith m is illustrated by
the follow
ing steps:
5-2