Got a colored plot, but no raw data? Get a CSV back from the plot itself, entirely on your own machine.
Download for Windows · Quick start · How it works · FAQ · 中文说明
You want to compare against a curve from a paper or report, but all you have is the image. Clicking points one by one in a web digitizer works once. By the fifth plot of the week, it's no longer a workflow.
But many engineering plots already draw each curve in its own bright color. Curve Extractor uses that: it separates the traces by color, maps pixels to axis values, and writes a wide CSV. Then it lets you overlay the result on the original so you can see whether to trust it.
| Feature | What it actually does | |
|---|---|---|
| 🎨 | Color-based extraction | Finds saturated color candidates in the plot area and extracts each trace by RGB + tolerance. No click-tracing. |
| 🔢 | Axis OCR (tick labels only) | Tesseract reads the axis tick numbers to calibrate automatically. It does not "AI-read" the curve. |
| ✋ | Manual fallback | OCR missed? Pick the plot's top-left / bottom-right in the GUI and type the X/Y ranges. |
| 📐 | Multiple Y axes | Bind each series to left_1, right_1, … with its own min/max. |
| 🤖 | Auto-binding | Heuristically binds red / green / blue candidates to series; override with --series or in the GUI. |
| 🚫 | Exclusion regions | Box out legends, labels or annotations before extracting (GUI). |
| 📄 | Wide CSV | x plus one column per series (name_unit); blanks where a trace is missing. Opens in Excel or pandas. |
| 🔍 | Overlay check | GUI preview on the original. DOCX batch also writes _overlay, _side_by_side, _color_fit images and _metrics.csv. |
| 📚 | DOCX batch | Processes reports laid out as Pic n: / Statement n:; skips table-like images and checks results against statement text. |
| 🔒 | Local & offline | A desktop tool, not a web app. Your plots never leave your machine. MIT licensed. |
-
Download
CurveExtractor-0.2.0-windows-x64.zipfrom the latest release. -
Unzip it and keep the
_internalfolder next toCurveExtractor.exe, then double-click the exe. -
(Optional, for automatic axis reading) install Tesseract for Windows and add it to
PATH, or set:$env:TESSERACT_CMD = "C:\Program Files\Tesseract-OCR\tesseract.exe"
Tesseract is not bundled. Without it, you can still box the plot, type the ranges, extract and export.
git clone https://github.com/AL-LIN-S/DataExtracker.git
cd DataExtracker
python -m venv .venv
source .venv/bin/activate # Windows PowerShell: .\.venv\Scripts\Activate.ps1
python -m pip install -U pip
python -m pip install -e .| OS | Tesseract (for axis OCR) |
|---|---|
| Windows | UB Mannheim installer + PATH or TESSERACT_CMD |
| macOS | brew install tesseract |
| Linux | sudo apt install tesseract-ocr |
GUI
python -m curve_extractor # or: curve-extractorCLI (installed entry point: curve-extractor-cli)
python -m curve_extractor.cli examples/sample_rgb_plot.png --output extracted.csv# 1) Single image: auto axis OCR + auto color binding -> one CSV
python -m curve_extractor.cli examples/sample_rgb_plot.png --output extracted.csv
# 2) Bind series yourself when auto-binding picks the wrong colors
# format: NAME:UNIT:R,G,B:TOLERANCE:Y_AXIS (repeat --series per curve)
python -m curve_extractor.cli path/to/plot.png --output extracted.csv \
--series "frequency:Hz:235,0,0:45:left_1" \
--series "power:MW:0,235,0:45:right_1"
# 3) Print more color candidates (default 6)
python -m curve_extractor.cli path/to/plot.png --max-colors 10
# 4) DOCX batch: every "Pic n" plot -> CSV + overlay/side-by-side/color-fit/metrics
python -m curve_extractor.cli report.docx --output-dir outputsThe single-image CLI prints the detected plot area, X range, Y axes, color candidates and bindings, then writes only the CSV you asked for.
DOCX batch mode writes pic_NNN.csv plus review images per picture, and batch_summary.csv / batch_summary.txt. It exits with code 2 if any picture failed.
Expected DOCX layout
Pic 1:
[plot image]
Statement 1:
[optional text used for validation]
Pic 2:
[plot image]
[optional table image]
Statement 2:
[optional text]
Table-like images are treated as statement / validation input, not as plots.
flowchart LR
A["🖼️ Plot image<br/>or DOCX"] --> B["🔢 Calibrate axes<br/>Tesseract tick OCR<br/>or manual box + ranges"]
B --> C["🎨 Color candidates<br/>in plot area"]
C --> D["🤖 Bind series<br/>auto R/G/B or --series"]
D --> E["📈 Extract per column<br/>color mask, drop jumps,<br/>fill short gaps"]
E --> F["📄 Wide CSV<br/>x, name_unit, …"]
E --> G["🔍 Overlay check<br/>overlay · side-by-side<br/>color-fit · metrics"]
| Original plot | Extracted curves overlaid | Side by side |
|---|---|---|
Pixel quantization, axis calibration and color binding all add error, so results are not 100% accurate.
Use the overlay: if the extracted line sits on the original trace, use the numbers. If it doesn't, fix the plot box, ranges or colors and export again.
In DOCX batch mode, _metrics.csv reports per series source_coverage_fraction, path_on_source_fraction and missing_fraction so you can spot bad extractions without opening every image.
Works best: white background · saturated colored lines · linear axes. Will struggle: log axes (not supported) · dark backgrounds · grayscale scans · same-color tangled curves.
Is this a web app? Are my images uploaded?
No. It's a local desktop / command-line tool. Nothing is uploaded.Do I need Tesseract?
Only for automatic axis calibration (it reads tick numbers). In the GUI you can always pick the plot corners and type the ranges by hand. The single-image CLI relies on OCR, so it needs Tesseract.Does it support log axes or grayscale plots?
Not currently. Axes are linear, and series are separated by color.The colors were bound to the wrong series.
Auto-binding is heuristic. Use--series NAME:UNIT:R,G,B:TOLERANCE:Y_AXIS on the CLI, or add/edit series in the GUI's color table, then re-check the overlay.
What language is the GUI in?
The GUI labels are currently in Chinese (导入图片, 自动识别坐标轴, 识别候选颜色, 提取并预览, 导出 CSV …). The flow follows the same five steps described above.Windows says Tesseract was not found.
Addtesseract.exe to PATH or set TESSERACT_CMD to its full path, then restart the app or terminal.
Ideas, none of them promised yet. Feedback and PRs are welcome:
- Windows one-folder GUI build (v0.2.0 release)
- Merge the v0.2 Windows build branch into
main - Log-scale axes
- Better handling of dark backgrounds and grayscale / line-style series
- English GUI labels
- Publish to PyPI
Issues and pull requests are welcome. Please include a synthetic or shareable plot if you report an extraction problem, and don't post confidential project figures.
python -m pip install -e ".[dev]"
python -m pytest -qMIT © Curve Extractor contributors
没有原始数据,只有一张图? Curve Extractor 在你自己的电脑上,把彩色曲线图按颜色拆开、按坐标轴换算,导出宽表 CSV,再把结果叠回原图让你核对。
- Windows: 到 Releases 下载
CurveExtractor-0.2.0-windows-x64.zip,解压后双击CurveExtractor.exe(_internal文件夹要和 exe 放在一起)。 - 源码:
python -m pip install -e .,然后 GUI 用python -m curve_extractor,命令行用python -m curve_extractor.cli 图.png --output extracted.csv。 - Tesseract 只用来读坐标轴刻度数字,不是"AI 识曲线",需要另外安装。没装也可以在 GUI 里手动框图区、填范围。
- 适用: 白底、彩色曲线、线性坐标。对数轴、深色底、灰度图暂不支持。结果不是 100% 准确,用之前一定要看叠图。
完整中文教程(GUI 逐步说明、输出文件、测试):README.zh-CN.md