Cirrus Logic CS485 Dokumentacja Strona 239

  • Pobierz
  • Dodaj do moich podręczników
  • Drukuj
  • Strona
    / 319
  • Spis treści
  • BOOKMARKI
  • Oceniono. / 5. Na podstawie oceny klientów
Przeglądanie stron 238
Geometric Transforms
11-17
11
WarpAffine
Warps an image by an affine transform.
void iplWarpAffine(IplImage*
srcImage
, IplImage*
dstImage
,
const double
coeffs
[2][3], int
interpolate
);
srcImage
Thesourceimage.
dstImage
The resultant image.
coeffs
The affine transform coefficients.
interpolate
The type of interpolation to perform for
resampling. Can be one of the following:
IPL_INTER_NN Nearest neighbor.
IPL_INTER_LINEAR Linear interpolation.
IPL_INTER_CUBIC Cubic interpolation.
+IPL_SMOOTH_EDGE Smooth edges of an image.
Can be added to interpolation
by using bitwise logical OR
(see Appendix B for details).
Discussion
The function iplWarpAffine() warps the source image by an affine
transformation according to the following formulas:
x =
coeffs
[0][0]·x +
coeffs
[0][1]·y +
coeffs
[0][2]
y =
coeffs
[1][0]·x +
coeffs
[1][1]·y +
coeffs
[1][2]
where x and y denote the original pixel coordinates; x and y denote the
pixel coordinates in the transformed image.
The interpolation specified by
interpolate
is used for resampling the
input image. To compute the affine transform parameters, use the functions
iplGetAffineBound(), iplGetAffineQuad() and
iplGetAffineTransform(). These functions are described in the sections
that follow.
Przeglądanie stron 238
1 2 ... 234 235 236 237 238 239 240 241 242 243 244 ... 318 319

Komentarze do niniejszej Instrukcji

Brak uwag