This repository was archived by the owner on Nov 22, 2026. It is now read-only.
Repository navigation
v0.1.0
mojo-cv v0.1.0
Released: 2026-10-26 · Commit: the one tagged v0.1.0 · Previous: first release
What it does
OpenCV-style computer vision in Mojo on the CPU, with 3D, CAD and calibration helpers. Each op is checked against cv2 5.0 (2D) or a numpy, brute-force or closed-form oracle (3D) on the same input. A library (from mojocv.imgproc import ...) and a command-line tool (mojo-cv OP OUT IN... [k=v] on .mcv files).
Highlights
- 258 2D rows pass against cv2 5.0 (HOG against cv2 4.8.1, which has the detector) and 161 3D rows pass against their oracles, on inputs generated from fixed seeds.
- 36 of 51 1080p rows are faster than cv2 on one run on a 7800X3D (Otsu 0.05 ms vs 1.07, GaussianBlur 5x5 0.23 vs 0.59, HOG detection 46.7 vs 71.1 ms); 11 are more than 1.5x slower and are listed in
docs/bench.md. - Two bugs the old fixtures could not see are fixed: bilinear warp and remap read the wrong rows for lanes on the second-to-last source row (up to 160 grey levels off), and 8-connected components were numbered in pixel order where cv2 numbers them by 2x2 block.
Changes
First public release, no earlier version.
Verified
| Check | Result |
|---|---|
tests/run.sh: 258 rows vs cv2 5.0 and 4.8.1 |
rows: 258 pass: 258 fail: 0 |
tests/run3d.sh: 161 rows vs numpy, brute force, closed forms |
161/161 cases passed |
tools/fastpath_check.py: odd shapes, 1, 3 and 4 channels vs cv2 |
BAD 0 |
examples/quickstart.mojo built and run |
exit 0, values asserted |
scripts/ci.sh (Mojo 1.2.0.dev2026102105, MAX 26.7.0.dev2026102105) |
PASS ci |
Known limits
- Needs the pinned Mojo and MAX nightly; Mojo 1.1.0 does not finish compiling the code.
- CPU only, no Python binding; files are
.mcv, not PNG or JPEG. - The real-photo rows (
tests/cases/real.txt) and the Blender GLB check are run by hand, not in CI. - StereoSGBM, GrabCut, findEssentialMat and chessboard corner order are not cv2's algorithms;
docs/2d.mdstates how they differ.
Upgrade / run
git clone https://github.com/amarbaro/mojo-cv && cd mojo-cv && uv sync
.venv/bin/mojo run -I src examples/quickstart.mojo
Commits
v0.1.0first public release