|
Bsoft
1.9
Bernard's software package
|
Library routines for interpolating images. More...
Go to the source code of this file.
Functions | |
| int | img_transform (Bimage *p, Vector3< int > nusize, Vector3< double > scale, Vector3< double > origin, Vector3< double > translate, Matrix3 mat, int fill_type, double fill) |
| Transforms an image by translation, rotation, scaling and skewing. More... | |
| int | img_unique_shift_global_rotate (Bimage *p, Vector3< float > *origin, Vector3< float > *shift, float angle) |
| Shifts and rotates each image as defined in individual shift vectors. More... | |
Library routines for interpolating images.
Definition in file img_interpolate.h.
| int img_transform | ( | Bimage * | p, |
| Vector3< int > | nusize, | ||
| Vector3< double > | scale, | ||
| Vector3< double > | origin, | ||
| Vector3< double > | translate, | ||
| Matrix3 | mat, | ||
| int | fill_type, | ||
| double | fill | ||
| ) |
Transforms an image by translation, rotation, scaling and skewing.
| *p | image (converted to floating point). |
| nusize | 3-value new image size. |
| scale | 3-value scale factor vector to apply. |
| origin | 3-value origin for rotation and skewing. |
| translate | 3-value vector for translation after transformation. |
| mat | 3x3 rotation or skewing matrix. |
| fill_type | fill type for filling empty regions. |
| fill | value to fill in empty regions. |
A number of transformation types are combined in this function for
efficiency. The basic operation is the conversion of the image data
from the original data block to a new data block, applying a
transformation matrix and translation vector with a specified origin
followed by an optional translation:
y = R*x + t
where R is the rotation/skewing/scaling matrix.
t is the translation vector.
Note: The image is converted to floating point to improve interpolation. Definition at line 40 of file img_interpolate.cpp.
| int img_unique_shift_global_rotate | ( | Bimage * | p, |
| Vector3< float > * | origin, | ||
| Vector3< float > * | shift, | ||
| float | angle | ||
| ) |
Shifts and rotates each image as defined in individual shift vectors.
| *p | image(s) to be rotated and shifted (converted to floating point). |
| *origin | array of 3-value origin vectors, one for each image. |
| *shift | array of 3-value shift vectors, one for each image. |
| angle | global rotation angle to apply to all images. |
Each image in a Bimage structure is shifted by an unique amount but rotated by the same angle, no scaling or resizing is done. Intended for use in merging single particle images from a focal, or other, series of particles from micrographs.
Definition at line 153 of file img_interpolate.cpp.