nihui/opencv-mobile

The minimal opencv for Android, iOS, ARM Linux, Windows, Linux, MacOS, HarmonyOS, WebAssembly, watchOS, tvOS, visionOS

What it solves

OpenCV is a massive, feature-rich library for computer vision, but its standard build is often too large and heavy for mobile and embedded applications. This project provides highly optimized, minimal builds of OpenCV specifically tailored for resource-constrained environments.

How it works

It offers pre-compiled binary packages of various OpenCV versions (from 2.4.13.7 to 5.0.0) that have been stripped down to their essential components. By removing unnecessary modules and bloat, it significantly reduces the library size—for example, shrinking the OpenCV 5.0.0 Android package from over 300MB to roughly 25MB.

Who it’s for

Developers building computer vision applications for Android, iOS, ARM Linux, HarmonyOS, or WebAssembly who need a lightweight, easy-to-integrate version of OpenCV without the overhead of the full official distribution.

Highlights

  • Massive reduction in binary size compared to official OpenCV builds.
  • Supports a wide range of platforms including Android, iOS, Linux, Windows, macOS, and WebAssembly.
  • Includes specialized support for Apple platforms like visionOS, watchOS, and tvOS.
  • Provides additional utility features like CJK character support in cv::putText and HTTP-based JPG streaming for cv::VideoWriter.
  • All binaries are built from source via GitHub Actions, ensuring transparency and security.

Related

  • Project
  • Project
  • Project
  • Project
  • Project