Repository navigation
Releases
mojo-cv v0.1.5
mojo-cv-public v0.1.5
Released: 2026-11-08 · Commit: 11f3713 · Previous: v0.1.4
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
resizewithinterp=1on uint8 is now cv2's fixed-point linear resize, bit exact (the comparison bar goes from max difference 1 to 0).cv_circle_outlinethick lines: cv2'sLine2plots its first endpoint, so the missing tip pixels in five measured segments are gone.
Changes
Changed
- uint8 linear
resizefollows cv2's integer arithmetic (tests/casesimgproc.txt,resize_general.txtandtools/fastpath_check.pynow demand maxdiff 0).
Fixed
_line2plots cv2 Line2's first endpoint (fivecv_circle_outlinerows intools/fastpath_check.py, found by a 1500-line sweep againstcv2.line, 9 hits).
Verified
| Check | Result |
|---|---|
scripts/ci.sh on this tree (Mojo 1.2.0, cv2 5.0 oracle; 2D cases, fastpath, 3D, malformed, ransac, stereo) |
PASS ci, 420 PASS rows, 0 FAIL |
pkg-conda dry run on the version commit (H1-H3,H6) |
PASS: mojo-cv-0.1.5-hb0f4dca_0.conda |
Known limits
- As in v0.1.4. This release carries dev-repo work that was never published.
Upgrade / run
None: no API change; uint8 linear resize output may differ from 0.1.4 by one grey level where it now matches cv2 exactly.
Commits
11f3713build: bump version to 0.1.59a9de38feat: uint8 linear resize is cv2's fixed point, _line2 first endpoint (dev work)
mojo-cv v0.1.3
mojo-cv-public v0.1.3
Released: 2026-11-07 · Tag: v0.1.3 · Previous: v0.1.2
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
- Docs only: CHANGELOG names no home path.
Changes
Changed
CHANGELOG.mdand the release notes name no home path.
Verified
| Check | Result |
|---|---|
mojo-lib-audit on this tree |
PASS |
gh-publish --check (ci-local) |
OK |
Known limits
- As in v0.1.2.
Upgrade / run
None: no code or API change.
Commits
git log v0.1.2..v0.1.3
mojo-cv v0.1.2
mojo-cv v0.1.2
Released: 2026-11-04 · Commit: 935554f · Previous: v0.1.1
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
StereoSGBMat 1080p with 128 disparities peaks at 1.5 GB instead of 11.7 GB, with the same output byte for byte.cvtColorBGR to RGB no longer writes into the next row for widths 9, 10, 17, 18, 25, 26, ...; the gray and
YCrCb paths no longer read past the row.- Malformed input raises an error instead of crashing: a
.mcvheader larger than its data, a short file, glb
accessors out of bounds, and mismatched arguments to remap, blobFromImage, HOGScores, Farneback flow, bfmatch and
knnmatch. - The package precompiles (
mojo precompile src/mojocv), so the conda recipe builds; it builds on Mojo 1.3
nightly too.
Changes
Added
recipe.yaml(conda packagemojo-cv),docs/design.md.
Changed
StereoSGBMkeeps one uint16 cost volume and rolling path rows;blockSizeabove 16 now raises.- The 3D command-line entry moves to
tools/cli3d.mojo(mojo build -I src tools/cli3d.mojo).
Fixed
cvtColorSIMD blocks stay inside their row (bgr2rgb, bgr2gray, rgb2gray, YCrCb).Mat.loadchecks the header size against the file before it allocates; a short.mcvfile or a missing argument
raises instead of aborting.Rng.sampleraises when n < k instead of looping forever.thresholdsaturatesmaxvalto the dtype's range.ransac_itersreturns the cap when the inlier share vanishes (it returned a large negative number).remap,blobFromImage,HOGScores,calcOpticalFlowFarneback,bfmatchandknnmatchcheck their
inputs' shapes and raise on a mismatch.- glb accessor bounds cannot wrap.
- Builds on Mojo 1.3.0.dev2026110305 as well as 1.2.0.
Verified
| Check | Result |
|---|---|
ci-local: the GitHub workflow in a clean Ubuntu 24.04 container, Mojo 1.2.0, MAX 26.7.0 |
PASS |
Known limits
StereoSGBMacceptsblockSizeup to 16.- As in v0.1.0 otherwise.
Upgrade / run
uv sync
mojo build -I src tools/cli3d.mojo -o cli3d # was: the entry inside src/mojocv/cli3d.mojo
Commits
935554ffix(release): pyproject.toml, recipe.yaml, uv.lock say 0.1.2bda27c7docs: design.md, recipe.yaml, oracle packages in the dev groupea82689fix(cv): main() moves out of the package into tools/cli3d.mojof4722f9ci(cv): run tests/ransac_iters.mojo in the gate40d097dfix(cv): ransac_iters uses log1p so a vanishing inlier share gives the cap412b7b9fix(cv): threshold saturates maxval to the dtype range1ae86effix(cv): bfmatch and knnmatch raise on descriptors of different width9c59fe3fix(cv): calcOpticalFlowFarneback checks the frames' shape and channelseacc957fix(cv): HOGScores raises unless the svm holds 3781 floats855aff2fix(cv): blobFromImage raises when mean has fewer values than channels1b7847ffix(cv): remap raises when the two maps differ in shapeffeffd6build: mojo-upgrade gives src/main.mojo 240 s191ce15fix: build on Mojo 1.3 nightly3fe3034perf(cv): StereoSGBM peak RSS 11.7 GB -> 1.5 GB at 1080p/128, output unchangedba088fcci(cv): run tools/malformed_check.py in the gate4c2c81dchore(cv): delete polar_rotation, Js.count and a redundant clause; version 0.1.14d1017efix(cv): glb accessor bounds cannot wrapf52b18efix(cv): Rng.sample raises when n < k instead of looping forever24f635cfix(cv): a short .mcv file or a missing input argument raises instead of aborting1147350fix(cv): Mat.load checks the header size before it allocates9e24054fix(cv): cvtColor SIMD blocks stay inside their row514e610docs: CI, latest-release and license badges
mojo-cv v0.1.1
mojo-cv v0.1.1
Released: 2026-10-29 · Commit: 96526b4 · Previous: v0.1.0
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
- Moves from the Mojo 1.2 nightly to the stable Mojo 1.2.0 and MAX 26.7.0 release.
Changes
Changed
- The pin moves from
mojo 1.2.0.dev2026102105/max 26.7.0.dev2026102105tomojo 1.2.0/max 26.7.0; README and skill drop the nightly wording.
Verified
| Check | Result |
|---|---|
ci-local: the GitHub workflow in a clean Ubuntu 24.04 container, Mojo 1.2.0 and MAX 26.7.0 |
PASS |
Known limits
- As in v0.1.0.
Upgrade / run
uv sync # installs Mojo 1.2.0 and MAX 26.7.0
Commits
96526b4docs: toolchain is Mojo 1.2aa6773fbuild: Mojo 1.2.0 / MAX 26.7.0 stable
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