Skip to content

OpenCV 5.x: net-new small modules (plot, phase_unwrapping, hfs, signal, xstereo) #2017

Description

@shimat

Summary

Survey of OpenCV/opencv_contrib modules that OpenCvSharp does not wrap at all, filtered down to the ones that are small and compile cleanly with the project's existing dependency set today — no new vcpkg packages, no CI changes. (The larger rgbd module is tracked separately in its own issue since it's a multi-class, multi-PR effort.)

Checked every module in opencv/modules/ and opencv_contrib/modules/ against cmake/opencv_build_options.cmake's explicit BUILD_opencv_* OFF list and the dependencies vendored in vcpkg.json (only tesseract/zlib/libpng/libjpeg-turbo/tiff/libwebp on all platforms; freetype/harfbuzz/hdf5/eigen3/ffmpeg are osx-only; no CUDA/VTK/Qt/Ceres/OGRE/Matlab/Julia/Qualcomm vendored anywhere).

Candidates

plotPlot2d (small–medium)
  • Plot2d : Algorithm — factories create(InputArray)/create(x,y), ~18 CV_WRAP setters, render(OutputArray). Pure core+imgproc, zero dependency risk. Mechanical wrap, good "first PR" candidate.
phase_unwrappingHistogramPhaseUnwrapping (small–medium)
  • PhaseUnwrapping : Algorithm base + HistogramPhaseUnwrapping : PhaseUnwrapping with a nested Params struct. For structured-light/interferometry pipelines. Pure core+imgproc, zero dependency risk.
hfsHfsSegment (small–medium)
  • HfsSegment : Algorithmcreate(h,w,...), egb/spatial/slic threshold getters/setters, performSegmentCpu(/Gpu, CUDA-optional). The CPU path builds with zero hard dependency (CUDA is optional-only, unlike older OpenCV versions where it was required) — real-time superpixel/hierarchical segmentation.
signalresampleSignal (small)
  • resampleSignal(InputArray, OutputArray, inFreq, outFreq) — one free function, zero dependencies. Smallest candidate in this list.
xstereoQuasiDenseStereo (medium)
  • QuasiDenseStereo abstract class + create(Size, path), process/getDisparity/getMatch/sparse-and-dense Matches; MatchQuasiDense/PropagationParameters structs. Needs opencv_stereo + opencv_tracking, both already wrapped in this project — no new dependency.

Considered and rejected

  • xobjdetect — the only net-new symbol is WBDetector (waldboost detector), and it's plain CV_EXPORTS, not even CV_WRAP. The rest of the header duplicates functionality already covered by CascadeClassifier/HOGDescriptor. Buildable, but low value.
  • alphamat (infoFlow free function) and freetype (FreeType2 class) — both real, wrappable, small-to-medium surfaces, but hard-require Eigen3 (alphamat) or freetype2+harfbuzz (freetype), which are vendored in vcpkg.json for osx only. Not buildable on Windows/Linux CI today — revisit if/when those deps get vendored more broadly, or scope as macOS-only.
  • hdf — needs HDF5, not vendored on any platform.
  • cnn_3dobj, cannops — need Caffe/Glog/Protobuf or the Ascend CANN SDK respectively; neither vendored, and cannops is explicitly disabled on Windows/Apple/mobile targets regardless.
  • All CUDA modules, cudev, cvv (Qt), matlab/julia (language bindings), ovis (OGRE), sfm (needs Ceres+gflags+glog beyond just Eigen3), fastcv (Qualcomm SDK), viz (VTK) — none of these toolchains are vendored on any CI platform.
  • Modules explicitly turned off in cmake/opencv_build_options.cmake: bioinspired, ccalib, datasets, dnn_objdetect, dpm, fuzzy, gapi (already decided against separately — contrib migration + no clear demand), intensity_transform, mcc, rapid, reg, structured_light, surface_matching, videostab — out of scope by existing project decision, not re-litigated here.

Notes

Each candidate above needs the standard <module>_SomeClass.h / SomeClass.cs / NativeMethods_<module>_SomeClass.cs / SomeClassTest.cs scaffold described in .github/copilot-instructions.md, plus registering the module in the native CMake build if it isn't already compiled in (verify with a local cmake --build first — none of these are in the explicit OFF list, but confirm they actually produce a .lib/.a before wiring the C# side).

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions