DataImage digitizer

Measure areas and read data from chart images

Calibrate the axes, trace an area or pick it by colour, and get real values on linear or log scales. Everything runs in your browser, so the image never leaves your computer.

Method

How the numbers are computed

Four reference points fix the mapping from pixels to axis values. The line through X1 and X2 is a line of constant Y, and the line through Y1 and Y2 is a line of constant X. That gives an affine map, so rotated or slightly skewed scans are handled without extra steps.

u = a·xpx + b·ypx + e v = c·xpx + d·ypx + f(1)

Here u = X on a linear axis and u = log10 X on a log axis; v is the same for Y. A shape drawn with straight edges is a polygon in (u, v), and its real area follows from Green’s theorem, integrated exactly along every edge:

A = | ∮ X dY | = | Σedges ∫ X(u) · Y′(v) dv |(2)

Colour regions are measured pixel by pixel. Each pixel adds the real area it covers, which grows with X and Y on log axes:

A = Σpixels |ad − bc| · (ln 10 · X) · (ln 10 · Y)(3)

The ln 10 · X factor applies only to a log X axis, and ln 10 · Y only to a log Y axis. A ratio is the sub area divided by the main area in real units. The tool also reports the on-screen (pixel) ratio and how much of the sub area lies inside the main area.

Table 1. Areas from the tool match exact answers on linear, log and rotated axes

CheckExactToolError, %
Log–log triangle, polygon8181.00000.000
Semi-log triangle, polygon2.908652.908650.000
Axes rotated 30°, rectangle1010.00000.000
Log–log chart, rectangle traced as polygon810810.0000.000
Log–log chart, same rectangle by colour810808.437−0.19
Log–log chart, area under √x / 5 by colour3082.883063.97−0.61
Polygon checks use exact corner coordinates. The chart checks use a 880 × 660 px matplotlib figure, calibrated by clicking tick marks as a reader would. Colour regions lose part of the edge pixels, so their error shrinks as the region gets larger on screen.

Notes

What to watch for

  • JPEG compression blurs colours. A colour tolerance of 30–60 usually separates a filled region cleanly; tick “Fill holes” when grid lines or labels cut through it.
  • A freehand shape that crosses itself is measured with signed areas. Draw around the region without crossing.
  • “Save project” stores the image, calibration, shapes and points in one file, so a measurement can be checked or repeated later.