def run(self, ips, snap, img, para = None): strc = np.ones((para['h'], para['w']), dtype=np.uint8) ndimg.binary_opening(snap, strc, output=img) img *= 255