Mojo function
resize_linear
resize_linear[coordinate_transformation_mode: CoordinateTransformationMode, antialias: Bool, dtype: DType](input: LayoutTensor[dtype, layout, origin, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment], output: LayoutTensor[dtype, layout, origin, element_layout=element_layout, layout_int_type=layout_int_type, linear_idx_type=linear_idx_type, masked=masked, alignment=alignment])
Resizes input to output shape using linear interpolation.
Does not use anti-aliasing filter for downsampling (coming soon).
Parameters:
- coordinate_transformation_mode (
CoordinateTransformationMode
): How to map a coordinate in output to a coordinate in input. - antialias (
Bool
): Whether or not to use an antialiasing linear/cubic filter, which when downsampling, uses more points to avoid aliasing artifacts. Effectively stretches the filter by a factor of 1 / scale. - dtype (
DType
): Type of input and output.
Args:
- input (
LayoutTensor
): The input to be resized. - output (
LayoutTensor
): The output containing the resized input.
Was this page helpful?
Thank you! We'll create more content like this.
Thank you for helping us improve!