def threshold_pixel(image, center, x, y):
    """Calculate if Pixel(x, y) intensity is greater than center intensity of neighborhood.

    :param image:       Input image to pull from
    :type:              numpy.ndarray
    :param center:      Value of center pixel in 3x3 neighborhood
    :type:              int
    :param x:           x coordinate to calculate in 'image'
    :type:              int
    :param y:           y coordinate to calculate in 'image'
    :type:              int
    :return:            Thresholded pixel value w.r.t center
    :rtype:             int
    """
    value = 0
    try:
        value = 1 if float(image[x][y]) - center >= 0 else 0
    except IndexError:
        # Padding is messed up for non-project cases
        pass
    return value