I'm trying to build OpenCV (4.5.1) from source, from the CMake-GUI output, there are 2 third-party libraries displayed as NO.
Other third-party libraries:
Intel IPP: 2020.0.0 Gold [2020.0.0]
at: C:/Users/opencv-4.5.1/_build/3rdparty/ippicv/ippicv_win/icv
Intel IPP IW: sources (2020.0.0)
at: C:/Users/opencv-4.5.1/_build/3rdparty/ippicv/ippicv_win/iw
Lapack: NO
Eigen: NO
Custom HAL: NO
Protobuf: build (3.5.1)
I want best performance of OpenCV, so I'd like to check what's the performance gain if I install Lapack or Eigen?
Does python's pip allow to distribute binary extensions as separate wheels for different hardware? For instance one version for arm, another for ivybridge, another for haswell?
I know one can prepare pip package which can build itself from sources during install, but this question is about a situation when a package lacks such facility.
EDIT: I am asking from a developer/maintainer perspective.
From the Armadillo install instructions:
If you are using sparse matrices, also install ARPACK and SuperLU.
Caveat: only SuperLU version 4.3 can be used!
On the SuperLU site there are three versions available: SuperLU, SuperLU_MT and SuperLU_DIST. Since the requirement is version 4.3, does it mean that only the single threaded version can be linked to Armadillo? If so, it means, that for sparse matrices only single PCs can be used, I cannot make use of the cluster available at my university.
Basically I'd like to install opencv so that it makes use of tbb and boost with the complete source code. However I think I will need to know how to display all the available install options for a port. (Install options I mean "+sth" after a port name, is that how you call it?)
In my concrete example, my line starts like
sudo port install opencv +tbb +python27
but I am not sure how to get the dev and the boost options...
Any ideas how to display options? Or specifically for opencv?
Thanks!
In addition to the answer provided by Barnabas Szabolcs, I have also found the info command is helpful for finding more information about a port, including the available variants, but also provides other interesting bits of information, such as the software license, maintainers, etc.
port info opencv
The above command results in the following output (as of the current portfile):
opencv #3.0.0_1 (graphics, science)
Variants: contrib, dc1394, debug, eigen, java, opencl, openni,
python27, python34, qt4, qt5, tbb, universal, vtk
Description: OpenCV is a library that is mainly aimed at real time
computer vision. Some example areas would be
Human-Computer Interaction (HCI), Object Identification,
Segmentation and Recognition, Face Recognition, Gesture
Recognition, Motion Tracking, Ego Motion, Motion
Understanding, Structure From Motion (SFM), and Mobile
Robotics.
Homepage: http://opencv.org
Extract Dependencies: unzip
Build Dependencies: cmake, pkgconfig
Library Dependencies: zlib, bzip2, libpng, jpeg, jasper, tiff, ilmbase, openexr,
ffmpeg
Platforms: darwin
License: BSD
Maintainers: stromnov#macports.org, openmaintainer#macports.org
Sorry, I have found it:
Port install options are called not options but variants. And the command is:
port variants opencv
in my case.
For those who care -- although in the code of opencv I have fond USING_BOOST flags -- there is no extra variant for boost support (perhaps it is automatic?).
My complete install line is
sudo port install opencv +debug +python27 +qt4 +tbb
I am trying to build OpenCV from source (latest SVN trunk) and there are several "optional" dependencies, which will amount to several gigabytes of downloading on their own, especially with the Qt Framework.
For example:
CUDA
GHOSTSCRIPT
MIKTEX
PYTHON
EIGEN
IPP
JASPER
JPEG
OPENEXR
OPENNI
PNG
QT
QT_OPENGL
TBB
TIFF
VIDEOINPUT
XIMEA
Can someone provide a list of what each of these external things provides - ranked by importance? (Sometimes subjective answers are the most insightful answers.) Which ones are built in the binary distribution?
Usually you can leave all the flags in default state unless you need to enable or disable some special features. All really important libraries are already there.
Options you listened can be split into several groups:
Image input/output
Actually OpenCV comes with a copy of these libraries for platforms where these libraries are missed (like Windows or Android).
TIFF
JASPER - jpeg2000 format
JPEG
PNG
OPENEXR - this one is not included into OpenCV
Video IO
VIDEOINPUT - video IO API for Windows platform. Since version 2.3.0 OpenCV embeds it and this flag is useful only to exclude videoinput library from build.
OPENNI - driver for Kinect
XIMEA - API for XIMEA cameras
Libraries of performance primitives
IPP - few dozens of OpenCV functions have IPP accelerated versions.
TBB - OpenCV has a number of functions parallelized with Intel TBB library.
EIGEN - some math functions (like SVD) can use power of Eigen library but OpenCV always provides alternative implementation.
GPU acceleration
CUDA - OpenCV comes with gpu module having a lot of functions accelerated with NVIDIA CUDA technology. If CUDA SDK is not found, then all functions degrade to CPU implementation.
Enhanced GUI
QT - OpenCV GUI functions (like imshow) has a QT version. Without QT they will default to native OS interfaces. (In case of Windows it will be WinAPI).
QT_OPENGL
Bindings to other languages
PYTHON - also build bindings for Python language
Building documentation
GHOSTSCRIPT - obsolete in 2.3.x (does not affect build)
MIKTEX - Windows only. Used to generate documentation in PDF format
Actually this is just a partial answer to your question. You have listened less than half of the options that can be set on OpenCV configuration step - other half is hidden because those options are not available for your platform.