Original grey level image |
---|
A 4 by 4 transformation matrix M (with homogenous coordinates) is of the form
M = | R_{00} | R_{01} | R_{02} | T_{0} |
R_{10} | R_{11} | R_{12} | T_{1} | |
R_{20} | R_{21} | R_{22} | T_{2} | |
0 | 0 | 0 | 1 |
x' | = M | x |
y' | y | |
z' | z | |
1 | 1 |
x' | = R | x | + T |
y' | y | ||
z' | z |
M = | 0.8660254 | -0.5 | 0.0 | 80.5147742 |
0.5 | 0.8660254 | 0.0 | -46.4852258 | |
0.0 | 0.0 | 1.0 | 1.0 | |
0 | 0 | 0 | 1 |
%test-reech-pnm greg-rmn.pgm greg-rmn-reech1.ppm -mat matrix.example |
%test-reech-pnm greg-rmn.pgm greg-rmn-reech2.ppm -mat matrix.example -inv |
Interpolation using the nearest value | |
---|---|
Command lines as the same as above except that the option -nearest has been added | |
Initial image | |
---|---|
Linear resampling | |
New grey levels appear at borders | |
Nearest neighbor resampling | |
Only the original grey levels are used | |