June 2016
Beginner to intermediate
304 pages
6h 24m
English
Edge detection is one of the most popular techniques in Computer Vision. It is used as a preprocessing step in many applications. Let's look at how to use different edge detectors to detect edges in the input image.
import sys import cv2 import numpy as np
chair.jpg:# Load the input image -- 'chair.jpg' # Convert it to grayscale input_file = sys.argv[1] img = cv2.imread(input_file, cv2.IMREAD_GRAYSCALE)
h, w = img.shape