def count_thresholds(stain, channel_lightness, thresh_channel,
    thresh_empty_default):
    """
    Counts thresholds. "stain" is a distribution map of stain, channel_lightness is a L channel from
    original image in HSL color space. The output are the thresholded images of stain-positive areas and
    empty areas.
    """
    thresh_stain = stain > thresh_channel
    thresh_empty = channel_lightness > thresh_empty_default
    return thresh_stain, thresh_empty
