I use Ubuntu 16.04, GCC 5.5.0, opencv-3.0.0.
here is my cmake command:
mkdir build && cd build cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INST