OpenCV 5.0.0 through C++23 modules; the upstream cv:: API is preserved.
English · 简体中文 · Upstream · Releases · mcpp · Index
Sixteen main modules, optional native windows, codecs, video and ORT CPU; pinned upstream sources are separate from adapters.
Optional modules require their corresponding mcpp features.
import mcpplibs.mwrap.opencv;: Enabled module aggregateimport mcpplibs.mwrap.opencv.core;: Mat, types and basic operationsimport mcpplibs.mwrap.opencv.imgproc;: Image processing and drawingimport mcpplibs.mwrap.opencv.imgcodecs;: Image loading and savingimport mcpplibs.mwrap.opencv.highgui;: Window API; select a backend featureimport mcpplibs.mwrap.opencv.videoio;: Video input/outputimport mcpplibs.mwrap.opencv.dnn;: Neural network inference
More Modules API -> Usage and API
mcpp new vision --template [email protected]
cd vision
mcpp run[dependencies]
mcpplibs.mwrap.opencv = { version = "5.0.0", features = ["imgproc", "imgcodecs-png"] }import mcpplibs.mwrap.opencv;
namespace macros = mcpplibs::mwrap::opencv::macros;
int main() { return cv::Mat(8, 8, macros::CV_8UC3).empty(); }Core is mandatory; default=[]. Select capabilities explicitly.
| Feature | Purpose |
|---|---|
all-modules |
Sixteen main modules; backends stay explicit |
highgui-native |
GTK3 / Win32 / Cocoa windows |
imgcodecs-png, imgcodecs-jpeg, imgcodecs-webp |
Selected image formats |
videoio-native, videoio-ffmpeg |
Native platform / FFmpeg video |
dnn-onnxruntime |
ORT CPU inference |
simd, simd-emulated |
Native baseline / software vectors |
Macro mappings use .macros; include <mwrap/opencv/macros.hpp> before imports for preprocessing macros.
The default template generates its own image. Named templates: :window, :video, :onnxruntime.
Examples · Usage
Tested with Linux GCC/LLVM, Windows LLVM and macOS ARM64 LLVM. Window templates need a desktop session. Physical cameras require devices; GPU/contrib and nonbaseline ISA are outside this release. Architecture · Coverage and compiler limits
Apache-2.0; upstream and selected dependencies retain their notices.
Wrapper: Apache-2.0, mcpp-community. Original upstream README and licenses. Upstream licenses remain unchanged.