Skip to content

Add Doxygen documentation across traincascade and refresh project READMEs#29

Merged
vladiant merged 1 commit into
mainfrom
add_documentation
Apr 30, 2026
Merged

Add Doxygen documentation across traincascade and refresh project READMEs#29
vladiant merged 1 commit into
mainfrom
add_documentation

Conversation

@vladiant
Copy link
Copy Markdown
Owner

Summary

Documents the cascade-trainer library, the traincascade CLI entry point and the test suite with Doxygen-style comments, and rewrites the two top-level README files so the repository structure and build flow are discoverable. No functional code changes — only comments and Markdown.

Motivation

The traincascade sources were largely undocumented and the project README contained only a one-line description. New contributors had to read the OpenCV legacy ML hierarchy (CvStatModelCvDTree/CvBoost → cascade subclasses) end-to-end to understand the layout. This MR adds inline API documentation and a high-level map so the codebase is self-describing.

Changes

Doxygen comments — public headers (include)

  • File-level @file briefs on all 20 headers.
  • Class/struct briefs and field-level docs on parameter types: CvCascadeParams, CvCascadeBoostParams, CvDTreeParams, CvBoostParams, CvHaarFeatureParams, CvLBPFeatureParams, CvHOGFeatureParams.
  • Method-level @brief / @param / @return on the main entry points: CvCascadeClassifier::train, the CvFeatureEvaluator interface, CvDTree's train/predict/find_split_*/prune_cv, CvBoost/CvCascadeBoost/CvCascadeBoostTree, and the CvDTreeTrainData / CvCascadeBoostTrainData setup helpers.
  • Documented the CC_* XML tag macros and the CV_SUM_OFFSETS / CV_TILTED_OFFSETS integral-image helpers.

Doxygen comments — driver

  • traincascade.cpp: added @file block, @brief on main(), and per-variable doc comments explaining the parameter structs and the argument-parsing fallthrough into scanAttr().

Markdown

  • README.md: expanded "About" with project purpose, repository-layout table, build instructions (CMake + Ninja, coverage build), architecture overview of the class hierarchy, doc links, and a license note distinguishing OpenCV-derived files. CI badges preserved.
  • README.md: added a per-file table mapping each test_*.cpp to the component it exercises, plus CTest run instructions and a pointer to the coverage build.

Intentionally not modified

OpenCV-licensed verbatim sources keep their original Intel / OpenCV Foundation headers untouched:

  • traincascade/lib/src/o_*.cpp
  • annotation, createsamples, visualisation

Validation

  • cmake --build build --target traincascade[10/10] Linking CXX executable traincascade/traincascade, clean.
  • No new diagnostics on edited headers.
  • Diff: 23 files, +934 / −106 (comments and Markdown only).

Checklist

  • Build succeeds (Ninja).
  • No source/behavior changes — comments and docs only.
  • CI badges and license headers preserved.
  • Test-suite layout documented.

@vladiant vladiant merged commit 49de413 into main Apr 30, 2026
7 checks passed
@vladiant vladiant deleted the add_documentation branch April 30, 2026 07:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant