Show Menu

s7vampy.merge_additive_mask(image1, image2, mask)

Merge image2 in to a masked region of image1 using the additive filter.
Parameter image1:
Path to the base image file.
Parameter image2:
Path to the image file that you want to merge into image1 .
Parameter mask:
Masked region in image1 .
Merged image.
This function is used to merge illumination maps. The images and the mask are all required to be grayscale images and have the same dimension.
Merge two illumination maps:
    >>> from s7vampy import *
    >>> img = open_image("TestData/illum1.png")
    >>> img
    {name='TestData/illum1.png', has_alpha=False, size=(422, 640)}
    >>> img2 = open_image("TestData/illum2.png")
    >>> img2
    {name='TestData/illum2.png', has_alpha=False, size=(422, 640)}
    >>> mask = open_image("TestData/mask1.png")
    >>> mask
    {name='TestData/mask1.png', has_alpha=False, size=(422, 640)}
    >>> merge_additive_mask(img1, img2, mask)
    {name='merge_additive_mask', has_alpha=False, size=(422, 640)}