Archive | Image Processing

Ordering coordinates clockwise with Python and OpenCV

Today we are going to kick-off a three part series on calculating the size of objects in images along with measuring the distances between them. These tutorials have been some of the most heavily requested lessons on the PyImageSearch blog. I’m super excited to get them underway — and I’m sure you are too. However, before we start learning how to […]

Continue Reading 31

OpenCV center of contour

Today, we are going to start a new 3-part series of tutorials on shape detection and analysis. Throughout this series, we’ll learn how to: Compute the center of a contour/shape region. Recognize various shapes, such as circles, squares, rectangles, triangles, and pentagons using only contour properties. Label the color of a shape. While today’s post is […]

Continue Reading 57

Detecting machine-readable zones in passport images

Today’s blog post wouldn’t be possible without PyImageSearch Gurus member, Hans Boone. Hans is working on a computer vision project to automatically detect Machine-readable Zones (MRZs) in passport images — much like the region detected in the image above. The MRZ region in passports or travel cards fall into two classes: Type 1 and Type 3. Type 1 […]

Continue Reading 28

Watershed OpenCV

The watershed algorithm is a classic algorithm used for segmentation and is especially useful when extracting touching or overlapping objects in images, such as the coins in the figure above. Using traditional image processing methods such as thresholding and contour detection, we would be unable to extract each individual coin from the image — but by leveraging the […]

Continue Reading 44