← all repositories
abreheret/PixelAnnotationTool

Paint-by-numbers segmentation with OpenCV watershed

A Qt5 desktop tool that turns rough brush strokes into pixel-accurate masks using OpenCV's watershed algorithm.

1.5k stars C++ Data ToolingComputer Vision
PixelAnnotationTool
Velocity · 7d
+0.5
★ / day
Trend
steady
star history

What it does

PixelAnnotationTool is a C++/Qt5 desktop app for labeling images at the pixel level. You scribble rough markers over regions with a brush, hit run, and OpenCV’s watershed algorithm floods out the boundaries. If the segmentation bleeds into the wrong area, you paint more markers and iterate until the mask is clean. It works on directories of images, not just single files.

The interesting bit

The “pseudo-manual” approach is the practical sweet spot: you do the high-level decisions (what is foreground, what is background), and the algorithm handles the tedious edge-following. It’s faster than tracing every contour by hand, but more controllable than fully automatic segmentation.

Key highlights

  • Uses OpenCV’s marker-based watershed algorithm for boundary detection
  • Iterative refinement: add markers, re-run, repeat
  • Cross-platform binaries available for Linux, macOS, and Windows
  • LGPL v3.0 licensed
  • Pre-built releases on GitHub; build from source requires Qt ≥5, CMake ≥2.8, OpenCV ≥2.4

Caveats

  • Last substantial update appears to be 2017; dependencies are dated (Qt5, OpenCV 2.4, Visual Studio 2015)
  • README is sparse on details like export formats, hotkeys, or batch processing behavior
  • No mention of GPU acceleration or modern deep-learning back-ends

Verdict

Worth a look if you need quick, dirty pixel masks for a small dataset and don’t want to train a neural net. Skip it if you need collaborative cloud labeling, automatic instance segmentation, or a actively maintained toolchain.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.