Centroid (X)

Calculate the x position of the centroid of an image. Errors if waveform or scalar provided.

Returns the x position of the image's centroid in terms of pixels.

Source code in builtins/centroid_x.py
@staticmethod
def evaluate(image: np.ndarray) -> float:
    """
    Calculate the x position of the centroid of an image. Errors if waveform or
    scalar provided.

    Returns the x position of the image's centroid in terms of pixels.
    """
    return Builtin.centroid(image, 0)