Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Building artoolkitX prerequisites

pandayu edited this page Nov 13, 2018 · 1 revision

libjpeg

libcurl

OpenCV

These are the OpenCV libraries required:

opencv_calib3d
opencv_core
opencv_features2d
opencv_flann
opencv_highgui
opencv_imgcodecs
opencv_imgproc
opencv_video
opencv_videoio

Linux

sudo apt-get install build-essential cmake git pkg-config
sudo apt-get install libgtk2.0-dev libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libjasper-dev libdc1394-22-dev
git clone https://github.com/opencv/opencv
cd opencv
mkdir build-linux
cd build-linux
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_JAVA=OFF '-DCMAKE_INSTALL_RPATH="$ORIGIN/../lib"'
make
make install DESTDIR=${PWD}/installed

Linux (Raspbian)

sudo apt-get install build-essential git cmake pkg-config
sudo apt-get install libjpeg-dev libtiff5-dev libjasper-dev libpng12-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo apt-get install libxvidcore-dev libx264-dev
sudo apt-get install libgtk2.0-dev
sudo apt-get install libatlas-base-dev gfortran
git clone https://github.com/opencv/opencv.git
cd opencv
mkdir build-raspbian
cd build-raspbian
cmake .. -DCMAKE_BUILD_TYPE=Release -DBUILD_TESTS=OFF -DBUILD_JAVA=OFF -DBUILD_PERF_TESTS=OFF -DBUILD_DOCS=OFF -DBUILD_EXAMPLES=OFF '-DCMAKE_INSTALL_RPATH="$ORIGIN/../lib"'

macOS

git clone https://github.com/opencv/opencv
cd opencv
# Build opencv2.framework into build-macos.
python ./platforms/macos/build_framework.py build-osx

iOS

We use OpenCV binaries from opencv.org. Alternately, a slightly smaller static framework can be built thus:

git clone https://github.com/opencv/opencv
cd opencv
# Build opencv2.framework into build-ios without only the modules we require.
python ./platforms/ios/build_framework.py \
 ios \
 --without dnn \
 --without objdetect \
 --without ml \
 --without photo \
 --without stitching \
 --without videostab \
 --without cudaarithm \
 --without cudabgsegm \
 --without cudacodec \
 --without cudafeatures2d \
 --without cudafilters \
 --without cudaimgproc \
 --without cudalegacy \
 --without cudaobjdetect \
 --without cudaoptflow \
 --without cudastereo \
 --without cudawarping \
 --without cudev \
 --without viz \
 --without superres \
 --without objectdetect \
 build-ios
# Remove unwanted iOS simulator architectures from fat binary.
mv build-ios/opencv2.framework/opencv2 .
lipo opencv2 -remove i386 -remove x86_64 -output build-ios/opencv2.framework/opencv2
rm opencv2

Clone this wiki locally

AltStyle によって変換されたページ (->オリジナル) /