Automatic
Pixel Ruler

Pixel-perfect screen measurement app with GPU-accelerated edge detection. Automatically detects and dimensions UI rectangles in real time.

01

Overview

Automatic Pixel Ruler is a Windows desktop tool that overlays real-time pixel measurements on your screen. Using GPU-accelerated screen capture, image pre-processing, and computer vision detection, it automatically identifies rectangular regions and displays their dimensions without any manual drawing.

It runs as a compact, always-on-top panel alongside your other running applications. A full-screen transparent overlay continuously analyses every frame and renders measurement labels directly onto the display.

Key Capabilities

🔍 Auto Rectangle Detection
GPU-accelerated edge detection finds and dimensions rectangles in real time.
📏 Multiple Units Support
In addition to pixels, dimensions can also be displayed in inches, millimeters, or centimeters corresponding to the actual physical size on screen.
📐 Manual Line Measurement
Pin two points on screen and measure the exact pixel span between them.
💻 Full-Screen Overlay
Transparent overlay renders labels over any application — no window switching needed.
💾 Screenshot Save
One key saves all or only mouse-highlighted rectangles as PNGs files, with a timestamped filename.
📺 Multi-Monitor
Select any connected display as the measurement target.
⚙ Persistent Settings
All tuning parameters are saved automatically and restored on next launch. They can also be saved to and loaded from disk, allowing you to create custom presets for different use cases.
📦 Virtual Environments Support
Works in virtual machines such as Windows SandBox, Hyper-V, etc.

System Requirements

ComponentRequirement
OSWindows 10 May 2020 Update "20H1" (version 2004 build 19041) or higher
 Windows 11 is recommended, since it's 'required for a full mouse and keyboard passthrough overlay (see the remarks in Overlay & Detection chapter)

02

Getting Started

Launching Automatic Pixel Ruler

The main panel opens in the bottom-right corner of your primary monitor. A transparent overlay simultaneously covers the entire screen and begins detecting rectangles.

ℹ️Automatic Pixel Ruler is a single-instance app. Launching it while already running brings the existing window to the foreground.

Quick Start

  1. Launch Automatic Pixel Ruler — the overlay becomes active on your primary monitor immediately.
  2. Move your mouse over the captured screen. Coloured rectangles will appear around detected UI elements, with dimensions displayed in pixels. The status bar updates with the current captured rectangle count and processing time.
  3. Press Ctrl+Shift+X (default) to start or stop a manual line measurement. Press Ctrl+Shift+X again or Esc to cancel this measurement at any time.
  4. Press Right Ctrl to save screenshots of highlighted rectangles, if any, to disk.
  5. Press Shift+Right Ctrl to save screenshots of all detected rectangles, if any, to disk. Be cautious with this one, as it can generate a large number of files if many rectangles are detected

03

Samples

In the following example, Automatic Pixel Ruler detects the rectangular regions of a Windows Explorer window, including the title bar, address bar, and content area. The dimensions of each detected rectangle are displayed in pixels directly on the screen, allowing you to quickly assess the size of different UI elements without needing to manually draw measurement lines or switch between applications. The Pixel special effect is applied as a pre-processing step to the captured screen image before detection, which simplifies the image and enhances edges of Windows Explorer.

Automatic Pixel Ruler samples - Explorer

In the next screenshot, Automatic Pixel Ruler detects rectangular regions in a floor plan image. The dimensions of each detected rectangle are displayed in centimeters corresponding to the actual physical size on screen.

Automatic Pixel Ruler samples - Floor plan

Measuring a web page in a browser window

In this example, Automatic Pixel Ruler detects the rectangular regions of a web page displayed in a browser window, including everything: the header, navigation bar, content sections, and images.

Automatic Pixel Ruler samples - Web1

In the second image, all detected rectangles dimensions are displayed. Dimensions are shown in in centimers corresponding to the actual physical size on screen.

Automatic Pixel Ruler samples - Web2

Measuring an image with heads and faces, with and without pre-processing

In this example, the Oil special effect is applied as a pre-processing step to the captured screen image before detection. This effect simplifies the image and enhances edges, making it easier for the detection algorithm to identify rectangular regions around heads and faces.

Automatic Pixel Ruler samples - Heads with pre-processing

This is the exact same image and parameters, but the original captured screen image is shown instead of the pre-processed one. This can be toggled on and off in the interface, using or buttons in the title bar, to help you understand how the app is interpreting the screen content and how different pre-processing settings affect detection.

Automatic Pixel Ruler samples - Heads w/o pre-processing

04

The Interface

The main window is a compact, horizontally resizable panel with three zones: a title bar with app info and controls, a property grid for tuning parameters, and a status bar with a live readout of detected rectangle count and GPU processing time for the last captured frame.

Window Areas

How it works

Before diving into detailed explanations of each setting, let's take a high-level look at how Automatic Pixel Ruler captures and processes screen data to detect rectangles in real time:

Automatic Pixel Ruler how it works
Automatic Pixel Ruler main window with property grid
1
Title Bar
2
Adaptive or Fixed Sampling
3
Detection parameters
4
Input Display or All Displays
5
Pre-Processing parameters
6
Special Effects
with variable parameters
7
Status Bar
💡 In addition to dragging sliders, values can be edited clicking on a number before the slider, and typing.
When a value is being edited, pressing Up or Down arrow increments or decrements this value by 1, providing fine control.
1
Title Bar — Get to About, Help Microsoft Store, Settings, Reset Settings, Pause / Resume capture. Drag to reposition the window, like any Window on the desktop.
2
Adaptive or Fixed Sampling — With adaptative Sampling on (by default), processing frequency auto-adjusts based on elapsed capture time. When off, fixed sampling is defined by the minimum interval between frames.
⚠️ Very low Fixed Sampling values can raise CPU/GPU load significantly. Keep Adaptive Sampling on unless you need consistent frame intervals.
4
Input Display — Selects which monitor's input to capture (here: DELL U2715H). This option appears only when two or more displays are connected. You can choose to capture a single display or all connected displays.
7
Status Bar — Live readout of detected rectangle count and GPU processing time for the last captured frame. Updated in real time as you move your mouse and interact with applications, giving you continuous feedback on detection performance and screen activity.
3

Detection Parameters

Min Detection Area — Specifies the minimum side length a rectangle must have to be detected and displayed.

Rectangles smaller than this threshold are ignored, which helps filter out tiny or irrelevant shapes.

The default is 30 px. In this case, it is set to 74 px, meaning rectangles smaller than 74 × 74 = 5476 pixels (regardless of exact width and height) will be filtered out.
Edge Thresholds — Edge Thresholds — These define the hysteresis bounds used in edge detection, with values ranging from 0 to 255.

strong threshold determines the minimum intensity for a pixel to be considered a definite edge. Pixels above this value are always treated as edges.

weak threshold sets the minimum intensity for pixels that might be edges.

Pixels between the weak and strong thresholds are only considered edges if they are connected to strong edges. This hysteresis mechanism helps reduce noise and broken edges: weak, isolated pixels are ignored, while weak pixels connected to strong edges are preserved. Default values are Strong = 100 / Weak = 50 (as shown here), which balance edge sensitivity and noise suppression. Adjusting these values can make the detection more sensitive (lower thresholds) or more selective (higher thresholds) depending on the captured image.

5

Pre-Processing Parameters

Luma Posterization — Brightness quantisation (0–64). It merges areas of similar brightness before edge detection, which can help simplify the captured image and highlight major edges while ignoring minor brightness variations.
Chroma Compression — Colour quantisation (0–32). It reduces the variety of colors in captured the image, which helps produce cleaner and more defined edges by minimizing subtle color variations.
💡Level 3 usually gets down to grayscale, which can be useful for certain input styles.
Blur — It applies a Gaussian blur smoothing effect to the captured image, which can help reduce noise and minor details that might interfere with edge detection.

Blur Radius controls the strength of the blur effect, with higher values creating a more pronounced blur. However, excessive blurring can cause edges to become too soft and less defined, so it's important to find a balance that reduces noise without losing important edge information.

Blur Quality controls the quality of the blur effect, with higher values producing a smoother and more visually appealing result at the cost of increased processing time.

Sketch — It applies a sketch-like effect to the captured image, which can help enhance edges and contours by creating a stylized representation of the screen content.

Sketch Size controls the size of the area used to compute the sketch effect, with higher values creating a more pronounced stylized effect.

Sketch Strength controls how much the sketch effect emphasizes edges, with higher values making edges more pronounced in the stylized image.

6

Pre-Processing Special Effects Parameters

None — No special effects applied. The captured image is processed with the standard pre-processing steps (blurring, posterization, chroma compression) without any additional transformations.
Pixel — Applies a pixelation effect to the captured image before edge detection.

Block Size controls the size of the pixel blocks, with higher values creating a more pronounced pixelation effect.

Automatic Pixel Ruler Pixel settings

Oil — Applies an oil painting effect to the captured image before edge detection. This effect creates a stylized, smoothed version of the screen content, which can help emphasize larger shapes and reduce noise from fine details.

Paint Radius controls the size of the area used to compute the oil painting effect, with higher values creating a more pronounced smoothing effect.

Paint Details controls how much detail is preserved in the oil painting effect, with higher values retaining more of the original image's details while still applying the stylized effect.

Sampling Quality controls the quality of the oil painting effect, with higher values producing a smoother and more visually appealing result at the cost of increased processing time.

Automatic Pixel Ruler Oil settings

⚠️ High Paint Radius, Paint Details, or Sampling Quality values can significantly increase GPU processing time, which may lead to lower frame rates and higher latency in detection.
Crystal — Applies a crystal-like distortion effect to the captured image before edge detection.

Cell Size controls the size of the crystal cells, with higher values creating a more pronounced distortion effect.

Edge Emphasis controls how much the effect emphasizes edges, with higher values making edges more pronounced in the distorted image.

Automatic Pixel Ruler Crystal settings


05

Overlay & Detection

The overlay is a full-screen transparent window sitting above all other windows, updated in real time. It captures the active display and processes frames, runs edge detection, and draws results. All Automatic Pixel Ruler windows are themselves excluded from screen recording and capture.

Automatic Rectangle Detection

Automatic Pixel Ruler continuously processes incoming frames from input displays. Rectangles meeting the minimum area threshold get a coloured border and a pixel-dimension label — e.g. 320 × 48. Each rectangle gets a unique color from its screen position so labels stay visually distinct.

Overlay & Input

When Automatic Pixel Ruler is running, the overlay is fully transparent to user input—mouse clicks and keyboard actions pass through to underlying windows. This allows you to interact with applications as normal while still seeing the measurement overlays on top. You can hover over buttons, menus, or any UI element, click anywhere or use the keyboard, to see captured rectangles list evolve in real-time.

⚠️ Unlike Windows 11, Windows 10 has system limitations that prevent the overlay from passing input through to other windows. As a result, the overlay captures mouse and keyboard events, which blocks interaction with applications underneath it. Automatic Pixel Ruler overlay window can still intercept input even when it appear invisible.

However, some system-level controls remain usable. In particular, the Taskbar can still be accessed, and Alt + Tab can be used to switch between open windows.

The or Pause / Resume button in the title bar can also be used to temporarily disable the overlay, allowing you to interact with applications and then re-enable it when needed.

Highlights

All rectangles detected under the mouse pointer are highlighted. A highlighted rectangle has a thicker border and a larger label displaying its dimensions (width and height). For example, if the label shows 640 × 480 (2/5), it means this is the second rectangle, sized 640 pixels wide by 480 pixels high, out of five rectangles currently highlighted under the mouse pointer.

The list of highlighted rectangles is reset whenever the mouse pointer moves.

At a given mouse position, multiple rectangles may be detected (for example, a button inside a panel). However, only one rectangle is shown with a semi-transparent fill (of the same color as its border) to make it visually stand out as the active highlight. The active highlight is the last rectangle drawn, so it appears on top of the others.

Press Left Ctrl to cycle through the rectangles detected under the mouse pointer. Each press moves the active state to the next highlighted rectangle in the list.

Manual Line Measurement

In addition to automatic rectangle detection, you can measure the pixel distance between any two points on the screen by entering Manual Line Measurement mode. This is useful for measuring non-rectangular spans or verifying dimensions that may not be automatically captured as rectangles.

  1. Press Ctrl+Shift+X or the shortcut you have defined if you changed default settings. Your cursor position is recorded as the start point.
  2. Move the mouse anywhere. A live line is drawn with a bounding-rectangle dimension label.
  3. Press the shortcut again or Esc to cancel.
💡The label shows the horizontal and vertical span, not the diagonal. A 100 px horizontal line reads 100 × 0.

Saving Rectangles Screenshots

Press Right Ctrl to save PNG images of all rectangles currently highlighted under the mouse pointer. Each highlighted rectangle is captured and exported as a separate PNG file. During the saving process, the overlay window may pause briefly while the images are being generated and written to disk. This pause is normal and typically lasts only a short moment, depending on the number and size of the rectangles being saved.

Press Shift+Right Ctrl to save PNG images of all rectangles. Be cautious with this option, as it can generate a large number of files if many rectangles are detected on the screen.

Example filename: Automatic Pixel Ruler 2026-03-24 1966(3).png

The default file name format is Automatic Pixel Ruler, followed by the current date, an Automatic counter that resets daily, and, if multiple rectangles are highlighted under the mouse pointer, the index of the highlighted rectangle.


06

Keyboard Reference

Key / ActionEffect
Left CtrlEnter Highlight mode and cycle through detected rectangles
Right CtrlSave all highlighted rectangles screenshots to disk
Shift+Right CtrlSave screenshots of all detected rectangles to disk
Ctrl+Shift+XToggle manual line-measurement mode (configurable in settings)
EscCancel active line measurement
Shift+Ctrl at launchReset window position to default, ignoring saved state
ℹ️The Draw Line shortcut can be changed in Settings. Must include Ctrl and must not conflict with a registered system hotkey.

07

Settings

Click in the title bar to open Settings dialog:

Automatic Pixel Ruler settings

From there you can:

Resetting Settings

Click in the title bar and confirm to restore all visual tuning parameters to factory defaults. Other non-visual settings (such as dimensions unit, etc.) are not affected.


08

Files & Data

Settings File

Configuration is stored at:

%LocalAppData%\Automatic Pixel Ruler\settings.json

This file is updated automatically on change and on close. A 30-day rolling backup of it is maintained int the settings.bak directory aside it. Close the application and delete settings.json to reset everything to defaults.

Screenshots

Saved as PNG files in the configured Save Directory (default: Pictures\Screenshots). Filenames encode the app name, date, and an incrementing counter.

Tuning Profiles

Individual parameter sets can be saved as .apixruler files (JSON format). Share between machines or keep as presets for different workflows.

.apixruler files can be associated with Automatic Pixel Ruler, allowing you to double-click them in Windows Explorer to load specific tuning profiles. This is useful for quickly switching between different detection configurations for various tasks or sharing settings with others.


09

Tips & Troubleshooting

Optimisation Tips

.apixruler files

Troubleshooting

ProblemResolution
Fails with "Not Supported" errorUpdate Windows to the required version.
Overlay active, no rectangles appearLower Min Rectangle Area, Weak and Strong Edge Thresholds. Verify correct Input Display is selected.
Overlay is too cluttered with rectanglesIncrease Min Rectangle Area or adjust Edge Thresholds to filter out smaller or less defined rectangles.
Detection misses certain UI elementsExperiment with Pre-Processing parameters and Special Effects to enhance features relevant to the missed elements.
External screenshot misses the overlayScreenshots are only saved for highlighted rectangles under the mouse.
Measurements in inches, cm, or mm seem inaccurate If the application is running inside a virtual machine, the display size shown on the desktop may not match the virtual display’s true resolution, which can result in incorrect calculations. Try running the virtual machine in fullscreen mode.
Overlay blocks input (mouse, keyboard) on Windows 10 Windows 10 doesn't support input passthrough for transparent overlays. Use Taskbar or Alt+Tab to switch windows, or upgrade to Windows 11 for full input passthrough support.
Pre-Processing effects cause high CPU / GPU loadReduce parameters for effects like Blur, Oil, or Crystal, or disable them entirely to improve performance.
I can't really see the rectangle or the area I'm interested in Use Left Ctrl to cycle through highlighted rectangles under the mouse pointer. The active highlight has a semi-transparent fill to make it visually distinct.
There are no saved screenshots after pressing Right CtrlOnly highlighted rectangles under the mouse pointer are saved as screenshots. Ensure you have highlighted rectangles before saving.
Manual Line Measurement doesn't activate Check or reassign the shortcut for manual line measurement mode in Settings. Must include Ctrl and must not conflict with another app's hotkey.
App starts but immediately crashesTry resetting settings by holding Shift+Ctrl while launching to ignore saved window position.
10

Diagnostics & Licensing

Click in the title bar to open About dialog:

Automatic Pixel Ruler About and Help

From there you can: