01Chapter 1: Images as arrays: channels, BGR order and dtypesYou should know basic Python, NumPy array indexing, and the difference between grayscale and color images. OpenCV should be installed, and you should be able to read an image from disk.2 min read
02Chapter 2: Kernels and convolution with cv2.filter2DAssume you know basic Python, NumPy indexing and dtypes, pixels, and grayscale images. You should also have OpenCV installed and be able to read an image. This chapter explains the operation behind many filters: applying a small matrix, called a kernel, across an image.2 min read
03Chapter 3: What happens at the image borderAssume you know basic Python, NumPy array indexing, grayscale images, and how to run OpenCV. This chapter explains how cv2.filter2D handles pixels that fall outside an image.2 min read
04Chapter 4: Smoothing with box, Gaussian, median and bilateral filtersThis chapter assumes basic Python, NumPy array indexing, grayscale images, and an OpenCV installation that can read images. Smoothing reduces small intensity changes so that later processing is less affected by noise.2 min read
05Chapter 5: Matching the filter to the noiseAssume you know basic Python, NumPy array indexing and dtypes, pixels, grayscale images, and how to read images with OpenCV. This chapter focuses on choosing a smoothing filter after identifying the noise in an image.2 min read
06Chapter 6: Sharpening with unsharp maskingAssume you know basic Python, NumPy arrays, grayscale images, and OpenCV image loading. You should also understand that a filter applies a kernel to nearby pixels. Sharpening builds on smoothing: it uses a blurred image to find and strengthen fine detail.2 min read
08Chapter 8: Gradient magnitude and directionAssume you know basic Python, NumPy array shapes and dtypes, grayscale images, and Sobel derivatives in OpenCV. This chapter starts with two derivative images, gx and gy, and combines them into a description of each pixel's local intensity change.2 min read
09Chapter 9: The Laplacian and zero-crossing edgesAssume you know basic Python, NumPy arrays, grayscale images, and how to read images with OpenCV. You should also understand that a pixel stores an intensity value. This chapter uses those ideas to detect edges with the Laplacian, a second-derivative filter.1 min read
10Chapter 10: Canny edge detection and hysteresis thresholdsAssume you know basic Python, NumPy arrays, grayscale images, and OpenCV image loading. You should also understand that a grayscale image stores intensity values, usually from 0 to 255.2 min read
11Chapter 11: Global thresholding and the threshold typesAssume you know basic Python, NumPy array indexing, grayscale images, and how to use OpenCV. Global thresholding converts every pixel using one threshold value. It works best when the foreground and background have fairly consistent lighting.2 min read
12Chapter 12: Choosing the threshold automatically with OtsuThis chapter assumes basic Python, NumPy arrays, grayscale images, and an OpenCV installation that can read images. You should also know that a grayscale image stores each pixel as an intensity from 0 to 255.2 min read
13Chapter 13: Adaptive thresholding for uneven lightingThis chapter assumes basic Python, NumPy array indexing, grayscale images, and an OpenCV installation that can read images. You should also know that an image is an array of pixel intensities. In an 8-bit grayscale image, each pixel usually ranges from 0 for black to 255 for white.2 min read
14Chapter 14: Cleaning masks with erosion, dilation, opening and closingThis chapter assumes you know basic Python, NumPy array indexing and data types, grayscale images, and OpenCV image I/O. It also assumes you have a binary mask: an image containing foreground pixels and background pixels, usually represented by 255 and 0.2 min read
15Chapter 15: Putting it together: a filter, edge and threshold pipelineThis chapter assumes basic Python, NumPy array indexing and data types, grayscale images, and a working OpenCV installation. The goal is to build a pipeline that produces both an edge map and a foreground mask.1 min read
16Chapter 16: Tuning parameters and avoiding common mistakesThis chapter assumes Basic Python, NumPy array indexing and dtypes, and familiarity with grayscale images and OpenCV. You should also know how to read an image with cv2.imread.2 min read