import matplotlib.pyplot as plt import numpy as np from function import * plt.ion() plt.axis("off") img = read("./dog/cow_img.bmp") maskImg = read("./dog/cow_mask.bmp") img = img.copy() height, width = img.shape[:2] mask = np.zeros((height,width),dtype=bool) for y in range(height): for x in range(width): mask[y,x] = maskImg[y,x] == 255 for y in range(height): for x in range(width): if mask[y,x]: img[y,x] = (255,0,0) plt.imshow(mask) plt.show() plt.title("mask de l'image") plt.pause(1) plt.title("génération de l'image") img = doTheInpainting(img,mask,2) plt.imshow(img) plt.title("image final") plt.pause(20)