// the find
hybridgroup/gocv
Go package for computer vision using OpenCV 4 and beyond. Includes support for DNN, CUDA, OpenCV Contrib, and OpenVINO.
GoCV is a Go wrapper around OpenCV 4 via CGo, giving Go programs access to the full OpenCV ecosystem — video capture, DNN inference, CUDA acceleration, ArUco markers, optical flow, and more. It's the only maintained Go/OpenCV binding that tracks current OpenCV releases. Target audience is Go developers doing real-time computer vision or video processing who don't want to drop into Python or C++.
1. Tracks OpenCV releases closely — currently on 4.12.0, which is recent, and CI runs on Linux/macOS/Windows so platform parity is actually tested. 2. The C-style wrapper approach (hand-written .h/.cpp shims instead of SWIG) means the binding surface is understandable and debuggable without a SWIG PhD. 3. The Mat profiler with pprof integration is a genuinely useful addition — CGo memory doesn't go through the GC, so leak detection would otherwise be painful. 4. CUDA, OpenVINO, and contrib modules are first-class supported sub-packages with their own CI, not afterthoughts.
1. CGo is the whole story here, so cross-compilation is effectively dead — you cannot build for Linux from macOS without Docker, and the install story is 'build OpenCV 4.12.0 from source first', which takes 30+ minutes and breaks whenever OpenCV bumps a minor version. 2. Every Mat must be manually closed or you leak C heap — the profiler helps find leaks after the fact, but the API has no RAII story and no idiomatic Go equivalent; it's easy to ship production code that slowly OOMs. 3. The Go API mirrors the OpenCV C++ API structure closely by design, but that means the naming and call patterns feel alien in Go — methods like `DetectMultiScale` returning raw `[]image.Rectangle` with no error are a Go antipattern. 4. DNN inference support covers ONNX/TF/Caffe models but there's no first-class integration with modern inference runtimes (TensorRT, ONNX Runtime); you're stuck with OpenCV's own DNN module, which lags on operator support.