You are on page 1of 4

Faculty of Engineering and Build

Environment (FKAB)
KEH2323
NUMERICAL METHODS FOR ENGINEERING
Interpolation : Nearest
GROUP 2
NO.

NAME

ID

1.

KHAIRIL ANWAR B. ABDUL KHALIK

1141892

2.

MUHAMMAD MUZZAMMIL BIN AZHARI

1151799

3.

AHMAD MIZWARUDDIN BIN ZULKIFLI

1151803

4.

NURUL KAMILAH BINTI HUSSIN @

1151811

NORMAN

LECTURERS NAME: PROF MADYA DR. JANATUL ISLAH BINTI


MOHAMMAD

CONTENTS
CONTENTS

PAGES

INTRODUCTION

3-6

MATLAB CODES ANALYSIS

7-8

RESULT & DISCUSSION

9 - 13

CONCLUSION

14

REFERENCES

15

INTRODUCTION

In the mathematical field of numerical method, Interpolation is a


method of constructing new data points within the range of a discrete set
of known data points. When graphical data contains a gap, but data is
available on either side of the gap or at a few specific points within the
gap, interpolation allows us to estimate the values within the gap.
The main attributes is that they are easy to compute and are
stable. Linear interpolation is the simplest method of getting values at
positions in between the data points. The points ae simply joined by the
straight line segments. Each segment can be interpolated independently.
Nearest-neighbor interpolation also known as proximal interpolation
or, in some contexts is a simple method of multivariate interpolation in
one or more dimensions. Interpolation is also the problem of
approximating the value of the function in points around that point. The
nearest neighbour algorithm selects the value of the nearest point and
does not consider the value of neighbouring points at all, yielding a
piecewise-constant interpolant. The algorithm is very simple to implement
and is commonly used in real-time 3D rendering to select colour values for
a textured surface.
For examples, suppose this matrix,
1

Represent your input image. You want to translate this image 1.7pixels in
the positive horizontal direction using nearest neighbour interpolation.
The Translate blocks nearest neighbor interpolation algorithm is
illustrated by the following steps:
1. Zero pad the input matrix and translate it by 1.7pixels to the right.

2. Create the output matrix by replacing each input pixel value with
the translated value nearest to it. The result is following matrix:
0

You might also like