Skip to content

Instantly share code, notes, and snippets.

View PrefixCoder's full-sized avatar

Funtykov Mykyta PrefixCoder

View GitHub Profile
@PrefixCoder
PrefixCoder / imblend.py
Last active February 1, 2025 15:36
Image blending via Laplacian pyramids
import cv2 as cv
import numpy as np
def build_gauss_pyr(img, n_layers):
pyr = [img]
for _ in range(n_layers):
pyr.append(cv.pyrDown(pyr[-1]))
return pyr
def build_lap_pyr(gauss_pyr):