def get_centroid(moments): 
    """
    Computer centroid given the image/blob moments
    """
    if moments['m00'] > 0:
        centroid_x = moments['m10']/moments['m00']
        centroid_y = moments['m01']/moments['m00']
    else:
        centroid_x = 0.0
        centroid_y = 0.0
    return centroid_x, centroid_y