def maskDepthArtifacts(depth_image, lower_bound=0, upper_bound=750):
    """ Identify artifact pixels in a depth image.

    Parameters
    ----------
    depth_image : numpy array of float, shape (img_height, img_width)
    lower_bound : float, optional
        Pixels with depth values below this threshold will be masked. Usually
        set to 0, to mask registration artifacts.
    upper_bound : float, optional
        Pixels with depth values above this threshold will be basked. Usually
        set to some margin above the maximum depth value possible for the scene.

    Returns
    -------
    is_depth_artifact : numpy array of bool, shape (img_height, img_width)
        A mask array. A pixel's value is True if its corresponding depth pixel
        falls outside the range ``(lower_bound, upper_bound)``.
    """

    # Find zero-depth pixels. These are registration artifacts.
    depth_too_low = depth_image <= lower_bound

    # Find artifact pixels (far enough away from the camera that they can't
    # have been in the real scene)
    depth_too_high = depth_image >= upper_bound

    is_depth_artifact = depth_too_low + depth_too_high
    return is_depth_artifact