def get_pixel(img, center, H, W):
    """
    LBP looks at points surrounding a central point and tests whether
    the surrounding points are greater than or less than the central point.
    If greater, then assign to 1, otherwise assign to 0.
    :param img: The img to calculate the LBP
    :param center: The center pixel value
    :param H: Height position of the surrounding point
    :param W: width position of the surrounding point
    :return: 1 or 0
    """
    new_value = 0
    if H < 0 or W < 0:
        pass
    else:
        try:
            if img[H][W] >= center:
                new_value = 1
        except:
            pass
    return new_value