Image Processing Reference
In-Depth Information
Example 6.5
Consider the 1-D function y¼p(x)de
ned by
x 2
þ x 3
2
sin (4
px)
24x
p(x)
¼
þ
0
x
1
We
first nonuniformly sample this function at N¼
10 points and create the LUT
given in Table 6.7.
(a) Use the Shepard interpolation to estimate the value of the function at
x ¼
2.
(b) Repeat part a for 100 samples of x that are uniformly spaced between 0
and 1. Plot the results and compare them with the exact values of y.
0.5. Use
2 and p¼
S OLUTION
P i ¼ 1 y i d m
i
P i¼1 d m i ¼
P 10
P 10
P 10
1 y i jxx i j 2
P 10
i¼1 jxx i j 2
x i j 2
1 y i d 2
i
1 y i j
0
:
5
(a)
y ¼
P 10
i¼1 d 2
i ¼
¼
P 10
i¼1 j
¼
0
:
2292
x i j 2
0
:
5
(b) The plot of the original function, the irregularly sampled points, and the
interpolated function is shown in Figure 6.13.
TABLE 6.7
Uniformly Sampled LUT at N¼10 Points
x
0
0.07
0.27
0.34
0.41
0.55
0.66
0.80
0.89
1
y
0.523
0.461
0.0079
0.0334
0.0266
0.279
0.419
0.545
0.702
1
1.2
Original f ( x )
Irregularly spaced samples
Shepard interpolation
1
0.8
0.6
0.4
0.2
0
-0.2
0
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1
x
FIGURE 6.13
Shepard interpolation of a 1-D function.
Search WWH ::




Custom Search