Pages

Topics

Tools

↑↓navigate↵openescclose

Python guides

Every published Python guide, newest first, with practical examples you can copy into your own project.

3,965 guides across 14 topics

Topics

Latest Python guides

Comparison of StandardScaler, MinMaxScaler, and Normalizer transformations on sample data.
Python

Python sklearn StandardScaler MinMaxScaler and Normalization

Compare how StandardScaler, MinMaxScaler, and Normalizer work in scikit-learn and learn how to choose the right transformer for your data.

scikit-learnfeature scalingStandardScalerMinMaxScaler
A split illustration showing a Pillow logo and an OpenCV logo with an image being processed between them, representing the comparison of the two Python image libraries.
Python

Python OpenCV vs Pillow: Choosing the Right Image Library

Compare OpenCV and Pillow for Python image processing: how they store images, where their APIs differ, and how to choose the right library for your project.

OpenCVPillowImage ProcessingComputer Vision
A visual representation of a digital image being processed as a NumPy array with OpenCV, showing pixel grid and array operations.
Python

Using Python OpenCV with NumPy for Image Processing

Learn how OpenCV images are NumPy arrays in Python, how to access and modify pixels, and how to use vectorized operations for efficient image processing.

OpenCVNumPyImage ProcessingPython
Illustration of a face and a generic object being detected by bounding boxes in an OpenCV image processing pipeline.
Python

Python OpenCV Face and Object Detection Basics

Learn the basics of face and object detection with Python and OpenCV, including Haar cascades, template matching, contour-based detection, and practical performance tradeoffs.

OpenCVFace DetectionObject DetectionComputer Vision
A diagram showing video frames flowing from a capture source through a processing stage into an output video file, representing the OpenCV read-process-write pipeline.
Python

Python OpenCV: Write and Process Video

Learn how to read, process, and write video files with Python OpenCV using VideoCapture and VideoWriter, including codec selection and common pitfalls.

OpenCVVideo ProcessingVideoWriterComputer Vision
Illustration of a webcam feed with a single frame being extracted and saved as an image file
Python

Python OpenCV Webcam Video Capture and Frame Extraction

Capture webcam video with OpenCV in Python: set up VideoCapture, read frames in a loop, extract and save frames, handle camera errors, and manage buffer latency.

OpenCVWebcam CaptureFrame ExtractionVideo Processing
Illustration of a perspective transform in OpenCV showing a skewed quadrilateral mapped to a rectangle, with a homography matrix overlay.
Python

Python OpenCV Perspective Transform

Learn how to correct perspective distortion in OpenCV with Python using cv2.getPerspectiveTransform and cv2.warpPerspective, including point selection, common pitfalls, and when to choose a perspective transform over affine.

OpenCVPerspective TransformImage ProcessingComputer Vision
A magnified view of a template pattern being matched against a larger image grid, with a highlighted match region.
Python

Python OpenCV Template Matching and Image Comparison

Use OpenCV template matching in Python to locate known patterns, interpret match scores, find multiple detections, and know when to choose another image comparison method.

OpenCVTemplate MatchingImage ComparisonComputer Vision
Diagram showing morphological operations like erosion and dilation applied to a binary image with structuring elements.
Python

Python OpenCV Morphology and Image Preprocessing

Clean binary masks, remove noise, and highlight structures with OpenCV morphology in Python. Covers erosion, dilation, opening, closing, gradient, top hat, and black hat.

OpenCVImage ProcessingMorphological OperationsComputer Vision
Diagram showing a grayscale image with a square and circle, a Canny edge map in the middle, and the same shapes outlined with colored contours on the right.
Python

Python OpenCV Canny Edge Detection and Contours

python opencv canny edge detection and contours: Learn how to apply Canny edge detection and extract contours with OpenCV in Python, including threshold tuning, contou...

OpenCVPythonComputer VisionEdge Detection