main.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:specularity-removal 作者: gmichaeljaison 项目源码 文件源码
def _solve(img1, img2):
    h, w, d = img1.shape

    # step 1: Find homography of 2 images
    homo = homography(img2, img1)

    # step 2: warp image2 to image1 frame
    img2_w = cv.warpPerspective(img2, homo, (w, h))

    # step 3: resolve highlights by picking the best pixels out of two images
    im1 = _resolve_spec(img1, img2_w)

    # step 4: repeat the same process for Image2 using warped Image1
    im_w = cv.warpPerspective(im1, np.linalg.inv(homo), (w, h))
    im2 = _resolve_spec(img2, im_w)

    return im1, im2
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号