def makemarkedmask(maskA, maskB):
    ' create a new mask based on existing image and coming mask\n\n    :param maskA: binary image\n    :param maskB: binary image\n    :return: binary image\n    '
    inter = cv2.bitwise_xor(maskA, maskB)
    inter = cv2.bitwise_and(inter, maskB)
    inter = cv2.bitwise_xor(inter, maskB)
    markedmask = cv2.bitwise_not(inter)
    return markedmask
create a new mask based on existing image and coming mask

:param maskA: binary image
:param maskB: binary image
:return: binary image
def makemarkedmask(maskA, maskB):
    ' create a new mask based on existing image and coming mask\n\n    :param maskA: binary image\n    :param maskB: binary image\n    :return: binary image\n    '
    inter = cv2.bitwise_xor(maskA, maskB)
    inter = cv2.bitwise_and(inter, maskB)
    inter = cv2.bitwise_xor(inter, maskB)
    markedmask = cv2.bitwise_not(inter)
    return markedmask