Skip to content

Instantly share code, notes, and snippets.

1. ARITHMETIC
import cv2, numpy as np, matplotlib.pyplot as plt
# ---------- LOAD & PREPARE IMAGES ----------
img1 = cv2.cvtColor(cv2.resize(cv2.imread('image1.jpg'), (300,200)), cv2.COLOR_BGR2RGB)
img2 = cv2.cvtColor(cv2.resize(cv2.imread('image2.jpg'), (300,200)), cv2.COLOR_BGR2RGB)
# ---------- 1) ARITHMETIC OPERATIONS ----------
arith = [
img1,