Why the legend matters
The legend is the symbol key on the drawing — the small box that shows each symbol next to its description. ZeroCount uses it as the source of what to look for:
- Stage 1's OCR pass reads the legend box.
- Each symbol in the legend becomes a template.
- The detection pipeline searches every AOI for matches against those templates.
Without a legend (or with a badly-marked legend), Stage 1 has nothing to detect. The whole detection workflow depends on getting this right.
What ZeroCount looks for
A good legend gives ZeroCount the cleanest run:
- One symbol per row — the OCR pass works best on a grid where each symbol sits on its own line next to a single descriptive label.
- Symbols sized like real instances — if the legend draws a fitting at 2× the size it appears on the layout, template matching has to handle the scale difference. Not impossible, but slower and less accurate.
- Clear black-on-white or single-colour symbols — heavy shading or busy backgrounds inside legend cells make extraction harder.
Most architect-supplied legends meet this bar. Hand-marked-up legends often don't, which is when you'll need manual intervention in Stage 2.
The auto-detected legend
When you first open a drawing, ZeroCount runs OCR and tries to locate the legend automatically. If it finds one, you'll see a marker overlay on the legend region — usually a rectangle with a different colour from your AOIs.
Check the legend marker covers:
- All the symbols you want counted.
- Not the title block or rest of the drawing.
If the placement is close enough, you can adjust the corners just like an AOI polygon. If it's wildly off or missing entirely, set it manually.
Setting the legend manually
Manual legend placement is part of Stage 1's manual flow. The exact entry point depends on your setup, but generally:
- 1
With the drawing open in Stage 1, find the legend area on the drawing.
- 2
Draw a polygon or rectangle tight around it. Make sure every legend symbol sits inside the marker.
- 3
Close the shape. Stage 1 will use this region for OCR when you press Submit.
Cut off everything that isn't a symbol — the project's title, the revision history, the "Legend:" heading itself. Cleaner input gives a cleaner output.
What if the drawing has no legend?
You have three options:
- Manually count everything in Stage 2. Use Auto Count and Auto Count Symbol to pick out symbols by eye. Slower than auto-detection but works on any drawing. Turn on Skip Stage 1 to bypass legend setup entirely.
- Copy a legend from another drawing. If a sister drawing in the same project has a usable legend, use Region mask import to bring detection results across.
- Sketch a legend. For internal drawings without one, you can manually draw a few example symbols inside a region marked as the "legend" — Stage 1 will pull templates from them. This is fiddly and usually slower than manual counting.
Multiple legends on one drawing
Some packages put separate legends per discipline on the same sheet — one for lighting symbols, one for small power, and so on. ZeroCount's Stage 1 expects a single legend region. To handle multiple:
- Combine them visually into one rectangle by drawing a polygon that covers both.
- Or split the work — run Stage 1 with one legend, advance to Stage 2, then come back via Reset Drawing and run it again pointing at the other legend (you'll lose the first run's markers — duplicate the project first if you want to keep them).