def applymark(img, mask):
    ' Apply a mask to an image to keep only active cells.\n\n    :return: image\n    '
    img = cv2.bitwise_and(img, img, mask=mask)
    return img
Apply a mask to an image to keep only active cells.

:return: image
def applymark(img, mask):
    ' Apply a mask to an image to keep only active cells.\n\n    :return: image\n    '
    img = cv2.bitwise_and(img, img, mask=mask)
    return img