Skip to content

Instantly share code, notes, and snippets.

@Nerdyvedi
Nerdyvedi / gsoc19_alpha_matting.md
Last active February 19, 2020 14:06
[GSoC'19]Alpha matting

Google Summer of Code 2019 with OpenCV

Alpha matting

Student: Vedanta Keshav Jha
Mentor: Steven Puttermans

Link to accomplished work:

@Nerdyvedi
Nerdyvedi / alpha_mask_blend.py
Last active March 19, 2019 12:55 — forked from garybradski/alpha_mask_blend.py
Blend one image with another using an alpha mask in python
import cv2
# Read the images
foreground = cv2.imread("puppets.png")
background = cv2.imread("ocean.png")
alpha = cv2.imread("puppets_alpha.png")
# Convert uint8 to float
foreground = foreground.astype(float)
background = background.astype(float)