Skip to content

chore: Upgrade opencv-em to 0.2.0 (OpenCV 4.10.0 -> 4.12.0)#63

Merged
kalwalt merged 2 commits into
devfrom
feature-upgrade-opencv-em
Jul 5, 2026
Merged

chore: Upgrade opencv-em to 0.2.0 (OpenCV 4.10.0 -> 4.12.0)#63
kalwalt merged 2 commits into
devfrom
feature-upgrade-opencv-em

Conversation

@kalwalt

@kalwalt kalwalt commented Jul 5, 2026

Copy link
Copy Markdown
Member

Bumps the pinned webarkit/opencv-em release from 0.1.6 to 0.2.0 (OpenCV 4.10.0 -> 4.12.0, emcc 3.1.38 -> 3.1.69) in WebARKit/CMakeLists.txt and tests/CMakeLists.txt.

While making the bump, two existing maintainability gaps were fixed alongside it rather than left for later:

  • WebARKit/CMakeLists.txt and tests/CMakeLists.txt each hardcoded the opencv-em version/URL independently, with no shared source of truth. Extracted both into a new cmake/OpenCVEm.cmake module that both files include(), so future bumps touch one place.
  • Neither file pinned a checksum on the downloaded zip. Added URL_HASH SHA256=... to each FetchContent_Declare, using digests pulled directly from GitHub's release API (no extra lookup needed since they were already available).

Release 0.2.0 also introduces a new SIMD-enabled emscripten build (opencv-js-4.12.0-emcc-3.1.69-simd.zip) that didn't exist in 0.1.6. Added a WEBARKIT_SIMD CMake option (default OFF) so this can be opted into later without another CMakeLists change; default behavior is unchanged (non-SIMD, matching today).

The CI Docker image (emscripten/emsdk:3.1.38 in .github/workflows/test.yml) is bumped to 3.1.69 in the same change, since it must match the emcc version opencv-em's emscripten build was compiled with.

Testing

Verified locally via cmake configure that all three variant combinations (native / emscripten / emscripten+SIMD) resolve to the exact expected 0.2.0 release URLs and hashes, and that the native FetchContent reaches the actual download step against the real URL. Full download + build (native and emscripten/Docker) could not be completed in the local sandbox due to a TLS/network restriction unrelated to this change — CI should exercise the real download and build for both targets.

- Extract shared release coordinates into cmake/OpenCVEm.cmake so
  WebARKit/CMakeLists.txt and tests/CMakeLists.txt no longer hardcode
  the version independently.
- Add WEBARKIT_SIMD option (default OFF) to opt into the new
  SIMD-enabled emscripten build shipped in opencv-em 0.2.0.
- Pin FetchContent_Declare URLs with SHA256 URL_HASH using digests
  from GitHub's release API.
- Bump CI's emscripten/emsdk Docker tag 3.1.38 -> 3.1.69 to match the
  emcc version used to build the new opencv-em release.
@kalwalt kalwalt self-assigned this Jul 5, 2026
@kalwalt kalwalt added enhancement New feature or request C/C++ code concerning the C/C++ code design and improvements Emscripten labels Jul 5, 2026
@kalwalt kalwalt moved this from To do to In progress in New markerless image tracking Jul 5, 2026
@kalwalt kalwalt moved this from In progress to Review in progress in New markerless image tracking Jul 5, 2026
@kalwalt kalwalt moved this from Review in progress to Reviewer approved in New markerless image tracking Jul 5, 2026
@kalwalt kalwalt merged commit 50db8f8 into dev Jul 5, 2026
1 check passed
@github-project-automation github-project-automation Bot moved this from Reviewer approved to Done in New markerless image tracking Jul 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C/C++ code concerning the C/C++ code design and improvements Emscripten enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant