machinevisiontoolbox.Image.uspan
- Image.uspan(step=1)[source]
Linear span of image horizontally
- Parameters:
step (int, optional) – step size, defaults to 1
- Returns:
1D array of values [0 … width-1]
- Return type:
ndarray(W)
Example:
>>> from machinevisiontoolbox import Image >>> import numpy as np >>> img = Image.Read('flowers1.png') >>> with np.printoptions(threshold=10): ... img.uspan() ... array([ 0, 1, 2, ..., 637, 638, 639])
- Note:
If the image has a
domain
specified the horizontal component of this is returned instead.
Warning
Computed using
numpy.arange
and forstep>1
the maximum coordinate may not be returned.