Description Usage Arguments Value Author(s) Examples
Zoom/rotate/translate an image relative to its center for images represented as simple arrays.
1 2 3 4 5 6 7 8 9 10 11 12 13 |
img |
n-by-m-by-3 array or n-by-m-by-4 array representing an rgb(+alpha) image. |
zoom |
zoom factor (>0). |
shift |
2-vector specifying the vertical+horizontal translation in units of output pixels (i.e. after zooming). |
angle |
rotation angle in degrees. |
size |
2-vector specifying the vertical+horizontal dimensions of the output image. If not given, this is taken to be identical to the input image. |
col |
background color |
filter |
affine transformation filter; either 'none' or 'bilinear' |
file.in |
optional input filename, which can be used to load an image instead of providing it via |
file.out |
optional output filename. |
format |
one of "png" or "jpg" specifying the file format of the input and output image. |
show.image |
logical flag specifying whether the image is displayed in the R console. |
Returns an n-by-m-by-3 array or n-by-m-by-4 array of the processed image.
Danail Obreschkow
1 2 | img = yinyangyong # this is an example image included in the package
transzoom(img, zoom=2) # zoom by a factor 2
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.