def mndvi(b2, b4, b8):
    """
    Modified Normalized Difference Vegetation Index \
    (Main et al., 2011).

    .. math:: MNDVI = (b8 - b4) / (b8 + b4 - 2 * b2)

    :param b2: Blue.
    :type b2: numpy.ndarray or float
    :param b4: Red.
    :type b4: numpy.ndarray or float
    :param b8: NIR.
    :type b8: numpy.ndarray or float

    :returns MNDVI: Index value

    .. Tip::

       Main, R., Cho, M. A., Mathieu, R., O’kennedy, M. M., Ramoelo, A., \
        Koch, S. 2011. An investigation into robust spectral indices for \
        leaf chlorophyll estimation. ISPRS Journal of Photogrammetry and \
        Remote Sensing 66, 751-761. doi:10.1016/j.isprsjprs.2011.08.001.
    """

    MNDVI = (b8 - b4) / (b8 + b4 - 2 * b2)
    return MNDVI