def length_score(x1, y1, x2, y2, d1, d2):
    """Scores the length of the cutting line (x1, y1)->(x2, y2) made at a
    concavity depth of d1 and d2.

    Returns
    -------
    Score : float
        Angle score according to equation (5) from the reference.

    See Also
    --------
    SplitConcavities

    References
    ----------
    .. [#] S. Weinert et al "Detection and Segmentation of Cell Nuclei in
    Virtual Microscopy Images: A Minimum-Model Approach" in Nature Scientific
    Reports,vol.2,no.503, doi:10.1038/srep00503, 2012.

    """
    r = ((x1 - x2) ** 2 + (y1 - y2) ** 2) ** 0.5
    LengthScore = r / (r + d1 + d2)
    return LengthScore
