Supported Platforms
OpenCV supports the following major platforms:Linux
Native support for x86, x86_64, ARM, and other architectures
Windows
Full support via Visual Studio and MinGW toolchains
macOS
Universal binaries for Intel and Apple Silicon
Android
AAR packages and NDK integration
iOS
XCFramework with Objective-C and Swift support
Architecture Support Matrix
OpenCV supports a wide range of processor architectures across different platforms:| Platform | Architectures | Build System |
|---|---|---|
| Linux | x86, x86_64, ARM (v7, v8), RISC-V, PowerPC, MIPS | CMake + Make/Ninja |
| Windows | x86, x86_64, ARM64 | CMake + Visual Studio/Ninja |
| macOS | x86_64, arm64 (Apple Silicon) | CMake + Xcode |
| Android | armeabi-v7a, arm64-v8a, x86, x86_64 | CMake + Gradle/NDK |
| iOS | armv7, arm64, i386, x86_64 (simulator) | CMake + Xcode |
Minimum Requirements
Build Tools
- Linux
- Windows
- macOS
- Android
- iOS
- GCC 5.x+ or Clang 3.4+
- CMake 3.5.1+
- Make or Ninja
- Git (optional)
Runtime Requirements
Minimum OS versions for running OpenCV applications:
- Linux: Kernel 2.6.32+ (older kernels may work with reduced functionality)
- Windows: Windows 7 SP1 or later
- macOS: macOS 10.12 (Sierra) or later
- Android: API Level 21 (Android 5.0 Lollipop) or later
- iOS: iOS 9.0 or later
Cross-Compilation Support
OpenCV provides toolchain files for cross-compilation:Available Toolchains
Theplatforms/ directory contains toolchain files for:
- ARM:
arm-gnueabi.toolchain.cmake,aarch64-gnu.toolchain.cmake - RISC-V:
riscv64-gcc.toolchain.cmake,riscv64-clang.toolchain.cmake - MIPS:
mips32r5el-gnu.toolchain.cmake,mips64r6el-gnu.toolchain.cmake - PowerPC:
ppc64-gnu.toolchain.cmake,ppc64le-gnu.toolchain.cmake
Hardware Acceleration
OpenCV leverages platform-specific acceleration technologies:| Platform | Acceleration Technologies |
|---|---|
| All Platforms | SSE2/3/4, AVX, AVX2, AVX-512, NEON |
| Linux | OpenCL, CUDA, TBB, OpenMP, VA-API |
| Windows | OpenCL, CUDA, TBB, OpenMP, DirectX |
| macOS | OpenCL, TBB, Accelerate Framework |
| Android | OpenCL, Vulkan, NNAPI, FastCV (Qualcomm) |
| iOS | Accelerate Framework, Metal, Core ML |
Binary Distributions
Pre-built binaries are available for common configurations:- Windows: Installer packages for Visual Studio 2015-2022 (x86, x64)
- Android: AAR packages via Maven Central
- iOS: Pre-built frameworks available in releases
- Python:
pip install opencv-pythonfor major platforms
Platform-Specific Considerations
Mobile Platforms
For iOS and Android:
- Framework/AAR sizes can be large (~50-100MB). Consider using modular builds to reduce size.
- Some modules are not available on mobile (e.g., highgui video capture)
- Use
--withoutflag when building to exclude unnecessary modules
