Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

opencv dilate

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 dilate the image.
kernel = np.ones((5,5), np.uint8)
img_dilation = cv2.dilate(img, kernel, iterations=1)
 
cv2.imshow('Input', img)
cv2.imshow('Dilation', img_dilation)
 
cv2.waitKey(0)
Comment

PREVIOUS NEXT
Code Example
Python :: deleting dataframe row in pandas based on column value 
Python :: how to remove rows with certain values pandas 
Python :: how to install whl file in python 
Python :: where are python libraries installed in windows 
Python :: python add element to array 
Python :: changing the current working directory in python 
Python :: how to determine python project parent dir 
Python :: delete directory if exists python 
Python :: pandas select columns by index list 
Python :: cant install tensorflow pip python 3.6 
Python :: ValueError: `logits` and `labels` must have the same shape, received ((None, 2) vs (None, 1)). 
Python :: shutil move file 
Python :: view(-1) in pytorch 
Python :: get rid of unnamed column pandas 
Python :: get a colomn of csv in pandas 
Python :: armstrong python 
Python :: extract pdf with python 
Python :: where to find location of where python is installed linux 
Python :: python count characters 
Python :: pandas backfill 
Python :: python set cwd to script directory 
Python :: pandas dataframe read string as date 
Python :: python convert string to sentence case 
Python :: basic tkinter gui 
Python :: Python Requests Library Put Method 
Python :: python check if character is letter 
Python :: get text selenium 
Python :: python slice string 
Python :: full form of rom 
Python :: union dataframe pyspark 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =