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?
Related
Ubuntu 20.04 64-bit aarch64
I have successfully built High Performance Linpack (HPL-2.3) from source specifying the OpenBLAS serial shared library in the HPL Make.myconfig file. HPL runs happily.
I would now like to build HPL using the OpenBLAS OpenMP shared library version. Having done a recursive grep omp on the HPL source directory I can't find any OpenMP pragmas in the source code.
My question is, when I build HPL do I need to specify -fopenmp as a compile option? My thinking is that HPL is not using OpenMP, and does not need to know that the OpenBLAS shared library it is linked does use OpenMP. I'm sure I could be wrong, but I don't know why...
Best regards
I would like to know what they mean with "prebuilt gcc"?
gcc is the compiler, but what do they mean by prebuilt? And why does google offer a prebuilt gcc for their android. Can I just not use the regular gcc?
GCC has a source code repository available via SVN.
In some scenarios, you need to download the source code and build the GCC yourself (specially when you have custom hardware). But for most cases, 'pre-built' GCC for your hardware and OS is enough.
I'm trying to install python numpy from source with libraries Lapack and Atlas. I have realized that Atlas itself contains lapack library. However if I compile it(atlas only), it has 0.5 MB. When Netlib Lapack is deployed than the library liblapac.a has more than 13 MB. This leads me to following questions:
Questions regarding numpy/scipy:
can i install numpy/scipy only with netlib's Lapack, or only with Atlas lib?
(if answer for 1 is yes) if only Atlas lib is installed (no netlib's Lapack) -are there any disadvantages (performance, functions unavailable,...)
is there any performance review how numpy/scipy are doing w/out Lapack/Atlas installed?
Numpy, or Scipy does use more Atlas/Lapack? is there any significant difference?
thanks!
ATLAS is not a full LAPACK implementation. It only provides a few routines that are optimized.
This ATLAS page explains how to build full LAPACK that also uses ATLAS.
From the page:
ATLAS natively provides only a relative handful of the routines which comprise LAPACK.
The SciPy Homepage tells you that you need LAPACK for SciPy, but not for numpy:
Before building, you will also need to install packages that NumPy and SciPy depend on
BLAS and LAPACK libraries (optional but strongly recommended for NumPy, required for SciPy): typically ATLAS + LAPACK, or MKL, or ACML
[...]
To summarize, if you want SciPy, you need LAPACK. If you want a faster LAPACK, you might want to install ATLAS, too. If you only want numpy, LAPACK is not required, but considered a good idea by the SciPy people.
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.
Is it possible to compile native GCC for ARM (host == target == ARM) using Code Sourcery G++?
If it is not possible, could I use crosstool-NG to build the cross-compile and then using this one for compiling the native ARM GCC?
Thank you,
Edit: as to why: I'm creating my own distro for beagleboard...
CodeSourcery provides prebuilt toolchains only for Linux/x86 and Windows (see "Host System Requirements" here). If you want a native ARM-hosted toolchain, you should be able to build one using a cross-compiler. If you want a prebuilt one, you can try some of the existing ARM distros such as Debian-arm, or Aboriginal Linux (it's made to be run in QEMU but you can probably extract the compiler from it and run natively).
Tiny C Compiler runs decently natively on the kindle 3.
Find it on the mobileread forums compiled for native use.
Code sourcery toolchain works for simple comilation via "arm-none-linux-gnueabi-gcc foo.c" IIRC with no effort. creating native arms. Crosstools-ng as well but neither natively AIUI.
I looked into http://buildroot.uclibc.org/downloads/manual/manual.html#_about_buildroot
for a more comprehensive solution.
There are some options in there for what you require IIRC using x-compile to make the compiler but Crosstools is the more robust chain I had trouble with codesourcery doing true static build. HTH
better off to use openembedded