pub fn get_index_from_xywh(
x: usize,
y: usize,
width: usize,
height: usize,
ndim: usize,
) -> Result<usize, Error>Expand description
Compute 1D Index (row-major) when provided with the x, y coordinate, width and channel value.
§Arguments
x- The x coordinate (should be between 0 - width)y- The y coordinate (should be between 0 - height)width- The width of the x dimensionheight- The height of the y dimensionndim- The number of dimensions (ideally same as number of channels)
§Returns
- usize containing Index if within bounds, otherwise Error