Repolode
nihui

nihui/opencv-mobile

A minimal, cross-platform build of OpenCV with a trimmed module set and smaller binaries for Android, iOS, ARM Linux, Windows and other targets.

Stars
3,374
Forks
458
Open issues
64
Last commit
18 days ago

What is it?

opencv-mobile is a stripped-down build of the OpenCV computer vision library, aimed at devices where the official package is too large. It provides prebuilt binaries for OpenCV 2.4.13.7, 3.4.20, 4.14.0 and 5.0.0 across Android, iOS, ARM Linux, Windows, Linux, macOS, HarmonyOS, WebAssembly, watchOS, tvOS and visionOS, and the official Android package is reported at 303 MB versus 25 MB here.

Size is reduced by reimplementing some modules such as highgui, disabling RTTI and exceptions, and selecting a smaller set of CMake options. Image read and write use stb instead of the usual image codecs, and GUI functions like imshow are dropped on most platforms, with a Linux framebuffer and Windows path kept for display. Face detection and other dedicated algorithms are excluded, and CUDA and OpenCL are disabled.

The repository also includes a source package and build steps so developers can regenerate a custom build with their own module choices. It adds a CJK-capable putText that uses embedded font bitmaps, and an http jpg streaming output on Linux.

Key features

  • 01Prebuilt packages for OpenCV 2.4, 3.4, 4.14 and 5.0 across many platforms
  • 02Smaller binaries than the official builds, with CUDA and OpenCL disabled
  • 03Image I/O implemented with stb instead of full codec libraries
  • 04Linux framebuffer and Windows imshow support for display without a desktop
  • 05Scripted build flow for custom module selection

Use cases

  • Shipping OpenCV image processing inside an Android or iOS app without a large library footprint
  • Running vision code on ARM Linux or RISC-V development boards
  • Building embedded displays that show frames directly through the Linux framebuffer
  • Drawing CJK text onto images with the bundled putText replacement

Quick start

  1. 1

    Download the package for your platform from the releases page

  2. 2

    Unzip the package and link it into your C++ project

Things to know

  • OpenCV 5.0.0 packages require a C++17-capable compiler.
  • Windows OpenCV 5.0.0 packages are provided only for VS2019, VS2022 and VS2026.

In collections

Topics

FAQ

What is opencv-mobile?
A minimal, cross-platform build of OpenCV with a trimmed module set and smaller binaries for Android, iOS, ARM Linux, Windows and other targets. opencv-mobile is a stripped-down build of the OpenCV computer vision library, aimed at devices where the official package is too large. It provides prebuilt binaries for OpenCV 2.4.13.7, 3.4.20, 4.14.0 and 5.0.0 across Android, iOS, ARM Linux, Windows, Linux, macOS, HarmonyOS, WebAssembly, watchOS, tvOS and visionOS, and the official Android package is reported at 303 MB versus 25 MB here.
Is opencv-mobile free to use? What license does it have?
opencv-mobile is open source under the Apache-2.0 license. Check the license terms before using it in commercial products.
Is opencv-mobile still maintained?
Actively maintained. The last commit to opencv-mobile was on Oct 20, 2026.
What can I use opencv-mobile for?
Shipping OpenCV image processing inside an Android or iOS app without a large library footprint Running vision code on ARM Linux or RISC-V development boards Building embedded displays that show frames directly through the Linux framebuffer Drawing CJK text onto images with the bundled putText replacement
How do I install opencv-mobile?
Download the package for your platform from the releases page Unzip the package and link it into your C++ project
Where can I get opencv-mobile?
The source code and installation instructions are on GitHub: https://github.com/nihui/opencv-mobile

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects