Show Menu
TOPICS×

s7vampy.merge_additive(image1, image2)

Merge two images using the additive filter.
Parameter image1:
image1
Path to the base image file.
Parameter image2:
image2
Path to the image file that you want to merge into the base image.
Returns:
Merged image.
Use this function to merge masks. Both images must be grayscale images and have the same dimensions.
Merging two masks:
    >>> from s7vampy import *
    >>> img = open_image("TestData/mask1.png")
    >>> img
    {name='TestData/mask1.png', has_alpha=False, size=(422, 640)}
    >>> img2 = open_image("TestData/mask2.png")
    >>> img2
    {name='TestData/mask2.png', has_alpha=False, size=(422, 640)}
    >>> merge_additive(img1, img2)
    {name='merge_additive', has_alpha=False, size=(422, 640)}