Image Processing Reference
< Image_Height_Output ;
< Image_Width_Output ;
g( x_output , y_output )
f ( x_input , y_input );
where Sx and Sy are the scale factors and (x ,y ) is written as (x_output,y_output)
and (x,y) is written as (x_input,y_input).
As can be seen in Fig. 10.2 backward mapping is very likely to result in a value of
(x, y) which is not possible. For example, what is the intensity value of f( 3 . 4 , 7 . 9 ) ?
It is undefined and we therefore interpolate in order to find an appropriate intensity
value. The most simple form of interpolation is called zeroth-order interpolation .
It rounds off to the value of the nearest possible pixel, i.e., f( 3 . 4 , 7 . 9 )
f( 3 , 8 ) .
A better, but also more computational demanding, approach is to apply first-order
interpolation (a.k.a. bilinear interpolation), which weights the intensity values of the
four nearest pixels according to how close they are. The principle is illustrated in
Fig. 10.4 . The area of the square wherein (x, y) is located is 1. Now imagine that
we use the position (x, y) to divide this square into four sub-regions. The area of
each of these sub-regions define the weight of one of the four nearest pixels. That is,
the area dx
dy becomes the weight for the pixel f(x 1 ,y 1 ) and so forth. The final
intensity value is then found as
g(x ,y )
f(x 0 ,y 0 )
+ f(x 1 ,y 0 ) · (dx)( 1
+ f(x 0 ,y 1 ) · ( 1
+ f(x 1 ,y 1 ) · (dx · dy)
Note that this equation can be rewritten more compactly for an efficient software
implementation. Note also that more advanced methods for interpolation exist, but
this is beyond the scope of this text.