def remove_specularity(img_files):
"""
Removes highlights/specularity in Images from multiple view points
:param img_files: File names of input images in horizontal order (important)
"""
# read images from file names
imgs = read_images(img_files)
# solve each pair of image.
# assumption: Input images are in order
for i in range(len(imgs) - 1):
logging.debug('processing images {} and {}'.format(i+1, i+2))
imgs[i], imgs[i+1] = _solve(imgs[i], imgs[i + 1])
for i, path in enumerate(img_files):
fname = os.path.basename(path)
res_file = os.path.join(RESULTS_DIR, fname)
logging.info('saving the results in {}'.format(res_file))
cv.imwrite(res_file, imgs[i])
评论列表
文章目录