Cirrus Logic CS485 Especificações Página 233

  • Descarregar
  • Adicionar aos meus manuais
  • Imprimir
  • Página
    / 319
  • Índice
  • MARCADORES
  • Avaliado. / 5. Com base em avaliações de clientes
Vista de página 232
Geometric Transforms
11-11
11
GetRotateShift
Computes shifts for iplRotate, given
the rotation center and angle.
void iplGetRotateShift(double
xCenter
, double
yCenter
,
double
angle
, double*
xShift
, double*
yShift
);
xCenter
,
yCenter
Coordinates of the rotation center for which you
wish to compute the shifts.
angle
The angle (in degrees) to rotate the image around
the point with coordinates (
xCenter
,
yCenter
).
xShift
,
yShift
Output parameters: the shifts along the x-andy-
axes to be passed to
iplRotate() in order to
achieve rotation around the specified center
(
xCenter
,
yCenter
) by the specified
angle
.
Discussion
Use the function iplGetRotateShift() if you wish to rotate an image
around an arbitrary center (
xCenter
,
yCenter
) rather than the origin (0,0).
Just pass the rotation center (
xCenter
,
yCenter
) and the angle of rotation
to
iplGetRotateShift(), and the function will recompute the shifts
xShift
,
yShift
.
Calling
iplRotate() with these
xShift
and
yShift
is equivalent to
rotating the image around the center (
xCenter
,
yCenter
).
Example 11-2 Rotating an Image
int example111( void ) {
IplImage *imga, *imgb;
const int width = 5, height = 5;
__try {
int i;
continued
Vista de página 232
1 2 ... 228 229 230 231 232 233 234 235 236 237 238 ... 318 319

Comentários a estes Manuais

Sem comentários