02-08-2013 06:02 PM
Im on windows tho, trying to comile it, but no luck duno what im doing wrong...if some one can write up a few steps explaining how to set it up, cmake the libraries in windows. I'm using cmake gui, and the instruction are not relavent to windows??,
02-11-2013 08:54 AM
Okay.. I followed the README instructions from our github partial port of OpenCV here:
On MacOS X, this built fine. no problems.
If you are using some gui and not following the published instructions, then you are unfortunately on your own, as I do not know what sort of gui you are using, nor do I know how to use it, nor do I have a copy of it, etc. I am assuming you are an expert at using your tools, so this shouldn't be too difficult for you to figure out. If you are not, then I would suggest using the recommended tools for this. Note that once you have your library built, you should be able to link it against code generated from whatever development environment you want.
In any event...
I got my libopencv_*.so files built. Then I created a new project in momentics called HelloOpenCV as an empty C++ screen project (Makefile). I then opened up my common.mk, and added the path to my OpenCV libs to EXTRA_LIBVPATH and added opencv_core to LIBS. At this point, you'll notice that the recursive makefile system will throw an error because it can't find libopencv_core.a. Just create an empty placeholder file in the libs directory alongside the .so file and you'll be fine. Add libopencv_core.so to your bar-descriptor assets, and you should be good to go. (well, you'll also want to update your EXTRA_INCVPATH appropriately when you start including headers).
I found that opencv was looking for some other include files not on my include path (ext/atomicity.h and bits/c++config.h).. I found those in my NDK installation and also added the appropriate paths to my EXTRA_INCVPATH.
For the record, here are my EXTRA_INCVPATH, EXTRA_LIBVPATH, and LIBS lines (excuse the hard-coding):
2 \ $(QNX_TARGET)/../target-override/usr/include \ /Users/smcveigh/git/OpenCV/modules/core/include \ /Users/smcveigh/git/OpenCV/modules/highgui/include \ $(QNX_TARGET)/usr/include/c++/4.6.3 \ $(QNX_TARGET)/usr/include/c++/4.6.3/arm-unknown-nt o-qnx8.0.0eabi # Extra library search path for target overrides and patches EXTRA_LIBVPATH+=$(QNX_TARGET)/../target-override/$ (CPUVARDIR)/lib \ $(QNX_TARGET)/../target-override/$(CPUVARDIR)/usr/ lib \ /Users/smcveigh/git/OpenCV/build/lib LIBS+=bps screen m opencv_core
I cut & paste a chunk of code from this sample into my code (excluding the part that draws to the screen):
I deployed and ran this binary on my device and I can see that libopencv_core.so was loaded, and my code ran fine:
# pidin -p HelloOpenCV mem
pid tid name prio STATE code data stack
54386923 1 native/HelloOpenCV 10r RECEIVE 0 4060K 12K(516K)*
54386923 2 native/HelloOpenCV 10r REPLY 0 4060K 4096(132K)
54386923 3 native/HelloOpenCV 10r RECEIVE 0 4060K 4096(132K)
HelloOpenCV @ 8048000 8192 8192
libc.so.3 @ 1d10000 532K 16K
libpps.so.1 @78000000 24K 8192
libproxyinfo.so.1 @78018000 8192 8192
opencv_core.so.2.4 @7801e000 1324K 28K
libz.so.2 @78171000 60K 8192
libm.so.2 @78190000 128K 8192
libstdc++.so.6 @781c0000 624K 36K
libsocket.so.3 @78277000 124K 24K
libscreen.so.1 @782a0000 68K 8192
libbps.so.3 @78bc0000 256K 8192
/dev/mem @28d00000 ( 0) 3840K
So everything looks ready to use... however...
NOTE: our OpenCV port is using GNU STL, whereas Cascades I believe is using the Dinkum variant of those libs. It is not likely you will be able to use this library with a Cascades project today. We are going to look at unmangling OpenCV from GNU STL, but I cannot give a timeline for this work.
02-12-2013 09:05 PM
when you compile the opencv using cmake, what kind of generator are we suppose to use, is it Mingw compiler or Eclipse CDT 4 Mingw generator, or something else?
02-12-2013 09:14 PM - edited 02-12-2013 09:16 PM
I don't know what a generator is.
I just followed the readme: called the configure script, ran ccmake to clear some options, and then ran make.
I am using the BB10 NDK's armle-v7 cross-compiling toolchain.
Isn't mingw for compiling windows binaries? You are not compiling OpenCV for windows.
take a look at the configure-qsk script and see what options it is setting up?
02-12-2013 09:44 PM - edited 02-13-2013 10:09 AM
yes, but you are not trying to build opencv to run on windows.
Have you installed the BB10 NDK yet? If so, have you installed a copy of cmake? If so, you now have all of the tools to follow the readme and build opencv.
02-13-2013 06:39 AM
Until the readme is updated, you might have some luck with the binary libraries I compiled.
I will be removing this archive once the readme is updated.
Note that I haven't had time to test them. But it's compiled per the documented instructions.
(And I can pretty much guarantee the person who wrote those instructions was not on Windows...)
06-10-2013 05:37 PM
when the monentics ide gives the error about how it cannot find the libopencv_core.a file you say tha
Just create an empty placeholder file in the libs directory alongside the .so file and you'll be fine
what do you mean by this statement?