Description Usage Arguments Details Value Note Examples
This function is used for reducing size of an image by averaging its pixels in blocks.
1 | downsize_avg(image, block_nrow = 2, block_ncol = 2)
|
image |
a pixel matrix or an array of the image for processing. |
block_nrow |
an integer number, which is the number of rows from a block. The reduced matrix is the average value within each block. For example, if block_nrow = 2 means you select every two rows of the input image as a block. Note that this number needed to be divisible by number of rows of the array of the input image. |
block_ncol |
an integer number, which is the number of columns from a block. The reduced matrix is the average value within each block. For example, if block_ncol = 2 means you select every two columns of the input image as a block. Note that this number needed to be divisible by number of columns of the array of the input image. |
This function is used to reduce the size of an image by dividing the original array into several blocks and calculate the average values within each block.
a pixel array of the reduced image.
block_nrow and block_ncol must be divisible by number of rows and columns of the pixel-arrary of the image, respectively. Otherwise, Errors will be reported as: "block_nrow(block_ncol) must be divisible by number of rows(columns) of the pixel-arrary of the image."
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.