Resize an input image. More...
AFAPI array resize (const array &in, const dim_t odim0, const dim_t odim1, const interpType method=AF_INTERP_NEAREST) C++ Interface for resizing an image to specified dimensions. More...Resize an input image.
Resizing an input image can be done using either AF_INTERP_NEAREST, AF_INTERP_BILINEAR or AF_INTERP_LOWER, interpolations. Nearest interpolation will pick the nearest value to the location, bilinear interpolation will do a weighted interpolation for calculate the new size and lower interpolation is similar to the nearest, except it will use the floor function to get the lower neighbor.
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.
array in = iota(dim4(5, 3));
@ AF_INTERP_NEAREST
Nearest Interpolation.
@ AF_INTERP_BILINEAR
Bilinear Interpolation.
◆ af_resize()C Interface for resizing an image to specified dimensions.
odim0
and odim1
[in] in is input image [in] odim0 is the size for the first output dimension [in] odim1 is the size for the second output dimension [in] method is the interpolation type (Nearest by default)
C++ Interface for resizing an image to specified dimensions.
odim0
and odim1
C++ Interface for resizing an image to specified scale.
scale
C++ Interface for resizing an image to specified scales.
scale0
and scale1
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