Build OpenCV static libraries for iOS - ios

I'm trying to build OpenCV static libraries from source code for iOS.
How can I do this?
OpenCV provides a python script to build an iOS framework, but it builds an iOS framework (which is not what I want, because it takes 350 MB).

Related

MIP C++ SDK Integration in iOS Project

I am looking for steps to be followed to integrate MIP C++ SDK into iOS project.
Added include folder to project.
Looking for steps how to map libs in bin folder to diff environments

How to cross compile OpenCV with ffmpeg

I want to cross compile opencv with ffmpeg for arm.
I have cross compiled ffmpeg, how do I configure cmake to see the ffmpeg?
Edit: I am cross compiling for AR Drone 2.0. I use toolchain under platform/linux.
The answer to your specific problem is to use cmake-gui which provides you a visual interface to ease the process of setting up variables, like your ffmpeg package location.
However I have 2 recommendations:
Download the most updated toolchain.
DO NOT USE THIS GUIDE. Use instead the toolchain that you find in the package in sources\platforms\android\android.toolchain.cmake: read inside, you'll find the correct instructions at the beginning of the file.
Another optional recommendation: use ninja as build system, much faster.
I was successful in cross compiling OpenCV with ffmpeg for AR Drone's ARM processor by writing my own toolchain file where I explicitly set all the linker, pkg_config and compiler paths to relevant directories containing the cross-compiled stuff.
I have written a blog post detailing the entire process here:
How to Cross-Compile OpenCV with FFmpeg for AR Drone (ARM Processor).

Porting OpenCV on WinCE07 platform

I have created a HOG based human detection code using OpenCV. While the code is runs well on my Windows 7 system, I now need to port this on a WinCE07 platform. How do I compile OpenCV for WinCE07 platform.
OpenCV site has instruction to build OpenCV from source, see "Installation in Windows - Installation by Making Your Own Libraries from the Source Files".
Basically you need:
A suitable development environment for Windows CE (some years ago the environment was eMbedded Visual C++ 4.0, I do not know what Microsoft has now).
The source code of OpenCV.
CMake, it is the program for managing the build. CMake will create the projects and solutions files. Usually CMake automatically recognize your development environment.

Can OpenCV be downloaded & built for Angstrom (BeagleBoard) not as part of the toolchain?

Simple question: can I build OpenCV on Angstrom (BeagleBoard) without downloading it as part of the toolchain ? meaning by downloading the code of the Unix version and building it
(of course, the build process itself would have to be done via the toolchain, but do I have to download the OpenCV as part of the toolchain rather than later, as separated files) ?
You can download OpenCV source code and use the toolchain to compile it. You might have to do some patching yourself, but you wouldn't be first to succeed.

OpenCV as a static library (cmake options)

I want to use OpenCV library in an embedded system and I need to compile my project using OpenCV as a static library.
How can I create the library using cmake options ?
To build OpenCV as static library you need to set BUILD_SHARED_LIBS flag to false/off:
cmake -DBUILD_SHARED_LIBS=OFF ..
But I think it is not enough for your task because you actually need to cross-compile library for you architecture. In case of Android or IOS such port already exists and you can simply use it. In case of another platform you need to create your own cmake toolchain file for cross-compiling and probably make a number of fixes in OpenCV build system.
The BUILD_SHARED_LIBS=OFF cmake option will create static libraries.
It should be noted that at the time of writing this, OpenCV does not really support static build, in that the result will not be useable when installed somewhere.
https://github.com/opencv/opencv/issues/21447#issuecomment-1013088996

Resources