pub fn resize<T: HasAfEnum>(
input: &Array<T>,
odim0: i64,
odim1: i64,
method: InterpType
) -> Array<T>
Resize an Image
Resizing an input image can be done using either NEAREST or BILINEAR interpolations. Nearest interpolation will pick the nearest value to the location, whereas bilinear interpolation will do a weighted interpolation for calculate the new size.
This function does not differentiate between images and data. As long as the array is defined and the output dimensions are not 0, it will resize any type or size of array.
input
is the image to be resizedodim0
is the output heightodim1
is the output widthmethod
indicates which interpolation method to use for resizing. It uses enum InterpType to identify the interpolation method.Resized Array
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4