Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

opencv erosion

import cv2
import numpy as np

img = cv2.imread('input.png', 0)

# The first parameter is the original image, kernel is the matrix with
# which image is convolved and third parameter is the number
# of iterations and will determine how much you want to erode the image.
kernel = np.ones((5,5), np.uint8)
img_erosion = cv2.erode(img, kernel, iterations=1)
 
cv2.imshow('Input', img)
cv2.imshow('Erosion', img_erosion)
 
cv2.waitKey(0)
Comment

PREVIOUS NEXT
Code Example
Python :: panda3d 
Python :: how to delete role discord py rewrite 
Python :: django radio button 
Python :: median of a list in python 
Python :: Set a random seed 
Python :: how download youtube video in python 
Python :: circumference of circle 
Python :: python class variables make blobal 
Python :: python depth first search 
Python :: check if number is between two numbers python 
Python :: python iterate through files in directory 
Python :: is number python 
Python :: pandas change to numeric 
Python :: how to find 1 st digit in python 
Python :: Taking a list of strings as input, our matching function returns the count of the number of strings whose first and last chars of the string are the same. Also, only consider strings with length of 2 or more. python 
Python :: dataframe from dict 
Python :: tqdm progress bar python 
Python :: load img cv2 
Python :: create column for year in dataframe python 
Python :: matplotlib overlapping labels 
Python :: dataframe move row up one 
Python :: python list comprehension cartesian product 
Python :: tensorflow_version 
Python :: string remove everything after character python 
Python :: python how to get pixel values from image 
Python :: create dictionary from keys and values python 
Python :: python convert to percentage 
Python :: element wise subtraction python list 
Python :: find max length in string in pandas dataframe 
Python :: django models.py convert DateTimeField to DateField 
ADD CONTENT
Topic
Content
Source link
Name
5+6 =