Ask Your Question

Gauthier's profile - activity

2016-11-22 08:31:00 -0600 received badge  Editor (source)
2016-11-22 08:02:48 -0600 asked a question Adding an executable to opencv

I am trying to write a test program for OpenCV's MOG2 background subtraction. My aim is to write tests to aid refactoring the background subtraction for my specific use case.

To achieve that, I created a directory test in modules/video/.

In this directory test/ I created a file test_mog2.cpp. This test source file contains #include "../src/bfbg_gaussmix2.cpp". (That's right, the cpp file, because I want to be able to test the internals of the module without otherwise exposing its help classes to the outside world.)

My problem is to make the build system around this.

I added add_subdirectory(test) to modules/video/CMakeLists.txt.

Then a new modules/video/test/CMakeLists.txt, which content is:

if ( NOT TARGET test-mog2 )
  ADD_EXECUTABLE( test-mog2 test_mog2.cpp)

The complier complains:

modules/video/test/../src/precomp.hpp:47:36: fatal error: opencv2/core/utility.hpp: No such file or directory

I tried to print ${OpenCV_INCLUDE_DIRS} in a message(), it seems empty. Is that because I'm inside OpenCV source tree and I haven't done find_package on OpenCV?

How do I make sure that my test source program test/test_mog2.cpp is compiled with the correct -I option?

2016-11-11 04:51:44 -0600 asked a question Compiling OpenCV with flags for armhf i.MX6

I am trying to build OpenCV's master for my i.MX6q with the following flags:

-mthumb -O3 -march=armv7-a -mcpu=cortex-a9 -mtune=cortex-a9 -mfpu=neon mvectorize-with-neon-quad -mfloat-abi=hard
  • is it going to make a difference, or is this kind of stuff supposed to be detected automatically?

The build does not work, I get this message:

intrin_neon.hpp:1205:42: error: 'vcvt_f16_f32' was not declared in this scope

I tried to remove -mfloat-abi=hard altogether, it didn't help. cmake refers to libs there /usr/lib/arm-linux-gnueabihf/, so I supposed that hard was the correct option? Anyway, both with and without give the same error message.

What can I do to build OpenCV optimized for i.MX6?

2016-10-20 02:29:58 -0600 received badge  Supporter (source)