Repository navigation
OpenCV 5.x API coverage: video, tracking, optflow gaps #2012
Description
Summary
Audit of the video (core), tracking (contrib), and optflow (contrib) OpenCV 5.x C++ API surface against the current OpenCvSharp C# wrapper. Part of a broader coverage sweep that started from closing the geometry/segment.hpp gap (#2000/#2001).
Baseline: opencv @ 40738fb, opencv_contrib @ 755e506 (both pinned submodule commits on main).
Gaps
video / tracking — modern DNN trackers and the whole legacy tracker family are unwrapped (9 items)
-
TrackerDaSiamRPN+Params(video/tracking.hpp:985-1020) — modern DNN-based tracker; not bridged or wrapped anywhere — medium -
TrackerNano+Params(video/tracking.hpp:1030-1063) — lightweight DNN tracker; not bridged/wrapped — medium -
TrackerVit+Params(video/tracking.hpp:1071-1109) — lightweight ViT tracker; not bridged/wrapped — medium- Note:
TrackerGOTURNwas removed from OpenCV entirely in 5.x — nothing to wrap there.
- Note:
-
Tracker.GetTrackingScore()(video/tracking.hpp:941) — missing on the wrapped baseTrackerclass — small -
legacy::tracker family (tracking_legacy.hpp:72-490, opencv_contrib) —TrackerMIL/Boosting/MedianFlow/TLD/KCF/MOSSE/CSRTentirely unbridged; only the modern (non-legacy)TrackerCSRT/TrackerKCF/TrackerMILexist today — large -
legacy::MultiTracker/MultiTracker_Alt/MultiTrackerTLD(tracking_legacy.hpp:312-454) — multi-object tracking wrapper, not present anywhere — medium -
legacy::upgradeTrackingAPI(tracking_legacy.hpp:490) — converts a legacy tracker to modernPtr<Tracker>; only relevant if legacy trackers get wrapped — small -
TrackerKCF.MODEenum +setFeatureExtractorcallback (opencv_contribtracking.hpp:105-111,144-145) — custom feature-extractor callback API not exposed — small -
DISOpticalFlow/VariationalRefinementOOP classes (video/tracking.hpp:701-880) — dense/variational optical flow classes missing on thevideoside (only free-function forms exist elsewhere) — medium -
FarnebackOpticalFlow/SparsePyrLKOpticalFlowOOPcreate()form (video/tracking.hpp:653-908) — only free-function/superres-bound variants are wrapped — small -
findTransformECCWithMask/findTransformECCMultiScale+ECCParameters(video/tracking.hpp:422-511) — new OpenCV-5 ECC alignment additions — small -
readOpticalFlow/writeOpticalFlow(video/tracking.hpp:591,601) —.flofile I/O helpers — small -
BackgroundSubtractor.Applymask overload (background_segm.hpp:87) —apply(image, knownForegroundMask, fgmask, learningRate)missing — small
Also flagged (cleanup, not a gap): OpenCvSharp.Tracking.TrackerTypes (src/OpenCvSharp/Modules/tracking/Enum/TrackerTypes.cs) is a stale enum from a pre-legacy-split API that doesn't map to any current factory — consider removing/repurposing once the legacy trackers land, or separately.
Internal, not user-facing (skip): feature.hpp's TrackerContribSamplerCSC/TrackerContribFeatureHAAR/TrackerStateEstimatorMILBoosting are CV_EXPORTS_W but not CV_WRAP'd — no bindable methods.
optflow — only motion-template + calcOpticalFlowSF/SparseToDense are wrapped; four algorithm families missing (5 items)
- Real
cv::optflow::DualTVL1OpticalFlow(optflow.hpp:218) — naming collision, not just a gap: the existing C#DualTVL1OpticalFlowclass actually binds to thecv::superres::native functions, notcv::optflow::. The truecv::optflow::DualTVL1OpticalFlow/createOptFlow_DualTVL1is unwrapped — medium -
createOptFlow_DeepFlow/SimpleFlow/Farneback/SparseToDensefactories (optflow.hpp:165-174) — none exposed viaCv2.OptFlow— small -
OpticalFlowPCAFlow+PCAPrior+createOptFlow_PCAFlow(pcaflow.hpp:74,94,142) — entire PCAFlow API missing — medium - RLOF family:
RLOFOpticalFlowParameter,DenseRLOFOpticalFlow,SparseRLOFOpticalFlow,calcOpticalFlowDenseRLOF/SparseRLOF,createOptFlow_DenseRLOF/SparseRLOF(rlofflow.hpp:64,233,412,501,538,545,548) — entire RLOF API missing — large -
GPCTrainingSamples/GPCTree/GPCForest/GPCDetails(sparse_matching_gpc.hpp:98,154,~230,301) — Global Patch Collider, template-heavy; entirely missing — large
Notes
Effort tags: small = a native bridge function/property + thin C# wrapper; medium = a small class or multi-member accessor set; large = a substantial class or multi-class family.
Activity
Add opencv5 video/tracking/optflow API coverage (issue shimat#2012)