pub fn glrlm(
image: &Tensor,
num_levels: u8,
max_run_length: i64,
direction: (i64, i64),
mask: Option<&Tensor>
) -> TensorExpand description
Generate GLRLM from an image.
Arguments
image: [N, 1, H, W] grayscale tensor of the image with values in [0, 1].num_levels: number of gray levels to use. From 2 to 254 with a mask and From 2 to 255 otherwise.max_run_length: maximum run length to use.direction: a tuple (dx, dy) of the direction of the run length.normalize: whether to normalize the GLRLM.mask: [N, 1, H, W] tensor of the mask with values in [0, 1].
Returns
- [N, num_levels, max_run_length] GLRLM tensor.