Ask Your Question

judu29hbc's profile - activity

2015-03-28 18:11:08 -0500 commented answer crosscompile OpenCV 2.4.10

When you cmake. You can easily do it with cMakegui and just check the modules that you need. Configure generate and run make install and enjoy

2015-03-28 02:55:51 -0500 answered a question compile time errors in openCV/C++ code.

It doesn't show it because it is going too fast so you can see it. Just put something like 10000 in wait key function

2015-03-28 02:50:34 -0500 answered a question crosscompile OpenCV 2.4.10

You don't need to build perf anyway to make it on you platform so just disable it or go #if 0 in the opencv source code. Good luck but it should compile

2015-03-27 10:29:01 -0500 received badge  Editor (source)
2015-03-27 05:54:25 -0500 asked a question OpenCV cross-compiling/Embedded memory optimization

I am currently cross compiling OpenCV for a homemade architecture. Everything works perfectly expect that I want to optimize/reduce the memory .text section of the elf file. I am only cross-compiling the core, flann, zlib and imgproc module of opencv. Everything is done statically and I put all the compile flags for opencv cross-comp with -ffunction-sections -fdata-sections -fno-common and then I link with -Wl,--gc-sections for my binary.

I am only using the cv::Mat object and functions such as threshold, sobel and more complex one but when I nm (see man nm) I have a whole bunch of objects and functions that I never use and therefore my binary size explode. (I checked the opencv code and they are not used)

I suspect that the RTTI (Run Time Type Information) of C++ is the cause. Actually the compiler can't remove unused objects and functions because it is solved at run time ... That is why my compiler brings everything.

Is there any trick that could help me without too much modifying the opencv source code in order to reduce my binary size ?