Description Usage Arguments Details Value Note Examples
This function reduces the size of each matrix of an RGB image (3-D array) by picking one component from every k1 components in each row and one component from every k2 components in each column of the input image, and use the selected elements to construct a reduced image, where k1 and k2 are specified by "RowSample" and "ColSample", respectively.
1 |
image |
an input RGB image array |
RowSample |
a positive integer for the rows. Select one component from every RowSample components. For example, RowSample = 2 means you select the 1st, 3rd, ... element from each row of the original image to construct your new image. |
ColSample |
a positive integer for the columns. Select one component from every ColSample components. For example, ColSample = 2 means you select the 1st, 3rd, ... element from each column of the original image to construct your new image. |
This function can be used to reduce the size of an image by picking sample elements of the original image as the elements of the reduced image. For example, "RowSample = 2", and "ColSample = 2" reduce the original size of an image to a quarter.
array of pixels of the reduced image.
This function is different from another function in this package called "downsize_matrix( )". That function is used to reduce the size of matrices while this function, downsize( ), is used to reduce the size of 3-D arrays.
1 2 3 4 5 6 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.