Closed twixrider closed 8 years ago
hi,
you need the opencv_contrib repo, also, the java bindings are not enabled by default.
add "java" at the end of line 2 here , and try to rebuild (cmake && make && make install)
do i have to download the contrib-repo and put it into my project or how do i add it (just with the cmake?)?
yes. download it to any folder, point your main opencv cmake settings to it:
cmake -DOPENCV_EXTRA_MODULES_PATH=/path/to/contrib/modules /main/opencv_source_directory
please take a minute with the readme here
ty very much!!!
good luck, come back, if you run into further trouble ;)
-- Configuring incomplete, errors occurred! CMake Error: Cannot open file for write: C:/Program Files (x86)/CMake/bin/CMakeCache.txt.tmp CMake Error: : System Error: Permission denied CMake Error: Unable to open cache file for save. C:/Program Files (x86)/CMake/bin/CMakeCache.txt CMake Error: : System Error: Permission denied
can you show, where you start this, and what is you cmake cmdline ?
(it should probably write to /your/main/opencv/build/CMakeCache.txt , not the one in cmake/bin)
C:\Program Files (x86)\CMake\bin>cmake -DOPENCV_EXTRA_MODULES_PATH=C:\OpenCV\opencv_contrib-master\modules C:\OpenCV\opencv\sources
i could not start the cmake from the opencv_build_directory cant find "cmake" -error
i start the command tool with admin rights!
please make a "build" folder somewhere, and start cmake from there. (this will be the folder for all the "temp" files, expect something like 3gb ;)
i think, the way you did it, it expected to build in cmake/bin (and thus tried to overwrite the readonly cmakecache.txt there)
CMakeOutput.txt CMakeError.txt
ok my problem was i didnt add the cmake/bin folder to the systemvariables (im using windows) now when i start cmake from the buildfolder of opencv (like in the readme) i get following message:
yea, fun. it did not find the compiler ;)
either: locate the vcvars.bat in your visualstudio folder, and run that before cmake
or: set vars manually: CMAKE_CXX_COMPILER=/full/path/to/cl.exe
(similar to all vars it complains about)
sidenote: you also want cmake -DBUILD_SHARED_LIBS=OFF for java, else the opencv_java.dll depends on all other opencv dll's at runtime
ok ill try. thanks man for your effort!
nicht den tag vorm abend loben ;)
hello again, i reinstalled the visual studio and tried again the cmake-command:
cmake -DOPENCV_EXTRA_MODULES_PATH=C:\OpenCV\opencv_contrib-master\modules C:\OpenCV\opencv\sources
diffent error log appeard(which is hopefully better than the old one): attached visual studio is 2015 community edition!
sorry attach didnt work:
hmm, sorry, can't really help now (no vs2015 here).
it still did not find your compiler, but i'm at loss why or how so.
i guess, it will work, once you can just call cl.exe from a cmdline (that's more or less the same, what those build tools are trying)
ok, no problem. is the cl.exe from the visual studio?
yes, ofc. it's the c/c++ compiler
so i figured out what the problem was. visual studio 2015 community, dont install the c++ components, neighter the c++ compiler. just go the install.exe and go modify, choose "programm language" and choose c++. it will install the c++ compiler as well. no the cmake command worked for me :)
hmm my application (working in intelliJ and updated the import of the library) still wont find the import org.opencv.face.*; now.. any ideas?
so, you build the opencv libs, and created a new opencv-310.jar and a new opencv_java310.dll ?
did you enable the java bindings for the face module (see 2nd comment) ?
i added java to the CmakeList.txt. where do i have to perform the make -j5 command?
in your build folder
C:\OpenCV\opencv\build>make -j5 make: *\ No targets specified and no makefile found. Stop.
ok thats the problem. i already got a "face" folder in the open_cv models folder
@berak It is not necessary to add "java" at the end of line 2 here, and try to rebuild (cmake && make && make install) Just include the path of the modules and it will be ready. But how to get opencv_java341.dll and opencv-341.jar for 64 bits and 32 bits in visual studio 2017? I can only get the 32 bit. I have another problem, I can not group all the .dll files into one.
Hey, i cannot import the org.opencv.face - class. like in your: "https://github.com/berak/opencv_smallfry/blob/master/java_face3.0/src/SimpleSample.java" example.
im using opencv 3 and loaded the opencv-300.jar
i hope you can help me!
ty and BR