Corners detection – OpenCV 3.4 with python 3 Tutorial 22
Corners detection image: [python] import cv2 import numpy as np img = cv2.imread("squares.jpg") gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) corners = cv2.goodFeaturesToTrack(gray, 150, 0.8,…
Lines detection with Hough Transform – OpenCV 3.4 with python 3 Tutorial 21
We’re going to learn in this tutorial how to detect the lines of the road in a live video using Opencv with…
Template matching – OpenCV 3.4 with python 3 Tutorial 20
Template matching image: [python] import cv2 import numpy as np img = cv2.imread("simpsons.jpg") gray_img = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) template = cv2.imread("barts_face.jpg", cv2.IMREAD_GRAYSCALE) w,…
Find and Draw Contours – OpenCV 3.4 with python 3 Tutorial 19
We’re going to see in this tutorial how to find and draw the contours. Contours are simply the boundaries of an object….
Edge detection – OpenCV 3.4 with python 3 Tutorial 18
What you will learn about edge detection The opencv edge detection is the image processing procedure, that allows you to structure the…
Morphological transformation – OpenCV 3.4 with python 3 Tutorial 17
Source code Images transformation: [python] import cv2 import numpy as np img = cv2.imread("balls.jpg", cv2.IMREAD_GRAYSCALE) _, mask = cv2.threshold(img, 250, 255, cv2.THRESH_BINARY_INV)…
Smoothing images – OpenCV 3.4 with python 3 Tutorial 16
[python] import cv2 import numpy as np img = cv2.imread("early_1800.jpg") averaging = cv2.blur(img, (21, 21)) gaussian = cv2.GaussianBlur(img, (21, 21), 0) median…
Adaptive thresholding – OpenCV 3.4 with python 3 Tutorial 15
[python] import cv2 import numpy as np img = cv2.imread("book_page.jpg") _, threshold = cv2.threshold(img, 155, 255, cv2.THRESH_BINARY) img_gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY) mean_c…
Affine transformation – OpenCV 3.4 with python 3 Tutorial 14
[python] import cv2 import numpy as np img = cv2.imread("grid.jpg") rows, cols, ch = img.shape cv2.circle(img, (83, 90), 5, (0, 0, 255),…