Welcome new user! You can search existing questions and answers without registering, but please register to post new questions and receive answers. Note that due to large amounts of spam attempts, your first three posts will be manually moderated, so please be patient.
We have moved to a new forum at http://jevois.usc.edu, please check it out. The forum at jevois.org/qa will not allow new user registrations but is maintained alive for its useful past questions and answers.
Welcome to JeVois Tech Zone, where you can ask questions and receive answers from other members of the community.

Why doesn't JeVois use ARM compiler flags in OpenCV and other compiles?

0 votes
What about the following OpenCV flags?

-D ENABLE_NEON=ON

-D ENABLE_VFPV3=ON

For Raspberry Pi 3 I also use:

-D EXTRA_C_FLAGS="-march=armv8-a+crc -mfpu=neon-fp-armv8 -mtune=cortex-a53 -ftree-vectorize -mfloat-abi=hard"

-D EXTRA_CXX_FLAGS="-march=armv8-a+crc -mfpu=neon-fp-armv8 -mtune=cortex-a53 -ftree-vectorize -mfloat-abi=hard"

These flags cut the computation time of Canny Edges in half, for example.

Current JeVois Opencv flags:
    -DCMAKE_BUILD_TYPE=RELEASE \
    -DCMAKE_INSTALL_PREFIX=/usr/share/jevois-opencv-${ver} \
    -DCPACK_SET_DESTDIR=ON \
    -DPYTHON_DEFAULT_EXECUTABLE=/usr/bin/python${pyver}
-DPYTHON_EXECUTABLE=/usr/bin/python${pyver} \
    -DWITH_TBB=ON -DWITH_V4L=ON -DWITH_QT=OFF -DWITH_OPENGL=OFF
-DWITH_OPENCL=OFF -DWITH_VTK=OFF -DWITH_CUDA=OFF \
    -DWITH_EIGEN=ON -DBUILD_opencv_python2=OFF -DENABLE_FAST_MATH=1
-DWITH_OPENMP=ON -DENABLE_CXX11=ON \
    -DINSTALL_PYTHON_EXAMPLES=ON -DBUILD_EXAMPLES=ON
-DINSTALL_C_EXAMPLES=OFF \

-DOPENCV_EXTRA_MODULES_PATH=${opencvroot}/opencv_contrib-${ver}/modules
-DBUILD_opencv_hdf=OFF \
    -DENABLE_PRECOMPILED_HEADERS=OFF \

Chris
asked Oct 28, 2017 in Programmer Questions by Chris Atkeson (170 points)

1 Answer

+1 vote

Yes, we do use similar flags (but for A7). The part of the INSTALL file you are referring to is to compile opencv for host. So no arm flags here as the assumption is intel host.

Opencv for platform is compiled with arm flags as part as buildroot, in jevois-sdk

In jevois, we support compiling and running natively on an intel host (assumed fast) and cross compiling for the platform hardware (one specific arm A7 chip). Native compilation on intel is to allow fast development cycles: try your code on your fast desktop before you cross compile it for jevois, copy to microSD, etc.  native compilation on platform is too slow and annoying and is not supported. It takes over an hour to compile jevois and jevoisbase on a raspberry pi, but only 2 minutes on a dual xeon...

To create the entire cross-compiled OS with all utilities and libraries, we use buildroot. This is in jevois-sdk. The assumption here again is that a fast intel host will be used to cross compile buildroot. It does indeed take on the order of 10 hours to build the whole thing on a 48-core xeon with 256GB ram.

These have more details about this

http://jevois.org/doc/Concepts.html

http://jevois.org/doc/ProgrammerSource.html and following pages

answered Oct 28, 2017 by JeVois (46,580 points)
...