Skip to content

Instantly share code, notes, and snippets.

View Octopusmode's full-sized avatar
😶‍🌫️

Maksim Osminin Octopusmode

😶‍🌫️
  • Saint Petersburg State University of Industrial Technologies and Design
  • Saint-Petersburg
  • 04:24 (UTC +03:00)
View GitHub Profile
@Octopusmode
Octopusmode / erode_dilate.py
Created February 20, 2023 16:59
OpenCV Erode & Dilation demo
from __future__ import print_function
import cv2 as cv
import numpy as np
import argparse
src = None
erosion_size = 0
max_elem = 2
max_kernel_size = 21
title_trackbar_element_shape = 'Element:\n 0: Rect \n 1: Cross \n 2: Ellipse'
title_trackbar_kernel_size = 'Kernel size:\n 2n +1'