Ask Your Question
0

Open cv 3.1.0, open cv 2.4.13 -Java - building library with cmake/ Visual Studio

asked 2016-07-17 17:16:46 -0500

tacocat88 gravatar image

updated 2016-07-19 21:40:06 -0500

Given the the above requisites , how to replicate the standard open cv build as downloadable from github? When my build is built, It doesn't produce the open cv x.x-Java.dll. It does however build the opencvx.x-Java.jar (sometimes).

There are .dll files for the created modules in the build folder, but there is no Java folder with opencv_java310/2423.dll to be found in the build folder. The open cv installation from github has a Java folder with this .dll file. It's missing from my build. I have looked in my build folder folders but that .dll file is not generated.

The build fails partly with the mentioned errors to the include files, but still creates the .jar file and .dll files for the modules.

Have explored some more: installed correct Python version for cmake, 3.5, built and installed numpy 1.11.1, have set debug and numpy include dirs.

Visual studio express 2015 for desktop Windows says with error c1083 for opencv_python3 that it cannot open include file _numpyconfig.h. It is NOT asking for the numpyconfig.h file which reside in /user/.../numpy x.x.x/numpy/core/include/numpy. It's asking for a _numpyconfig file referred to as an #include header file in the numpyconfig.h file.

Visual Studio also complains on behalf of opencv_java with error c1083 that it cannot open include file opencv2/reg.hpp.

What do I do?

Please can some experienced person give solution?

Right, I tried a new take on it. Cloned the repo for open cv , made source and target folders. Checked cmake for errors. I'll attempt build it without any attempt to add modules from open cv contrib or anything even moderately advanced .Now I don't get .jar file either. The number of errors tallies to 83. On the bright side, the tally of warnings were zero. Not all bad.

Right, tried once more. This time also being sure getting rid of old reference to Python 2.7 in cmake, only referencing Python 3.5. Now I've got 1 fail but this is an fatal link error. LNK1104: cannot open file Python35_d.lib.and there are neither .jar file nor opencv_javax.x.dll file.

Ignoring the issue of Python bindings and net beans, I've got new and even more errors, this time from cmake. "Cmake error at modules/Java/cmake_install.cmake.31 file INSTALL cannot find "c:/users/.../open cv-2413.jar"

Opencv_java:" class%(%s) is duplicated %"

MSB3073 The command "set local c:\programfiles...\cmake.exe -DBUILD_TYPE=Debug -P cmake-install...."

After the build the Src org opencv only has four folders with no content. The install folder has no .jar file, it has no open cv -dll file file.

Got opencv 2.4, made build and source directories, made path for Ant, included open cv _java in cmake, using visual studio with c/c++ compilers, using All Build, then install.

edit retag flag offensive close merge delete

Comments

  • if it build a .jar file, there must be a corresponding .dll as well. search harder.
  • ignore your netbeans for now (irrelevant) also any errors related to the python bindings (not your problem, atm)
berak gravatar imageberak ( 2016-07-18 11:23:07 -0500 )edit

1 answer

Sort by ยป oldest newest most voted
0

answered 2016-07-20 16:15:58 -0500

tacocat88 gravatar image

Avoid grey hair, don't try to combine distribution 2.4.13 and 3.1.0. Amongst several issues pertaining to Java wrapper build script written in Python these distributions are incompatible. Someone skilled enough in Python and Java can easily rewrite or write their own scripts to create a middle ground of the versions, however that's beyond my capabilities.

It also seems like the downloadable zips from github are a better choice than to clone. But that's just my experience.

My solution therefore is to use each distribution in their own projects (I'm using Java) and make global import of both versions but only refer to one specific for each of the projects

edit flag offensive delete link more
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-07-17 17:16:46 -0500

Seen: 710 times

Last updated: Jul 20 '16