Description Usage Arguments Details Value Author(s) Examples
Generates down-sampled coordinates from a base image supplied as a matrix or array for plotting.
1 2 |
img |
a matrix or array with at least 2 dimensions. |
channel |
which channel of the |
x.samp |
x-coordinate units to downsample. See details. |
y.samp |
y-coordinate units to downsample. See details. |
deg |
degrees to rotate points by after downsampling. Defaults to 0. |
invert |
recode channel value? Defaults to FALSE. |
thresh |
clipping threshold of channel value. Defaults to none. |
seed |
set a random seed for |
method |
Method of downsampling. See details. |
If method="samp" then the x.samp argument determines the number of resulting rows (x-coordinates) in the plotting grid. However, if the sequence method is used, then this number results in a number proportional to the original order of the x-dimension of img.
If method="samp" then the y.samp argument determines the number of resulting cols (y-coordinates) in the plotting grid. However, if the sequence method is used, then this number results in a number proportional to the original order of the y-dimension of img.
If method is set to "seq" then a number of proportional rows and columns are removed uniformaly until the desired down sampling is attained. If set to "samp" then the downsampling is done using a random uniform reduction of rows without respect to columns. The latter can result in high deviations from original image.
If method is set to "none" then no downsampling is done. Note that the plotting routine can take a very long time for large dimensional images under this method since every 'pixel' is represented by a point on the grid. However, this may be useful for rendering simple graphics (i.e., clipart, line art) with a transparent element and for rendering large dimensional output.
Returns an object of class 'halftone' with two elements:
x[[1]] |
a two-column matrix containing the coordinates for plotting. |
x[[2]] |
a vector of point values. |
Christopher Steven Marcum
1 2 3 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.