Building opencv-dsp

Hi,

I took a second shot at building this now that I have managed to extract the .exe containing imglib (and verified that there is a bug report in TI to provide a .bin or .tar.gz for that) and the build gets a bit further.

I was following http://code.google.com/p/opencv-dsp-acceleration/wiki/Instruction_For_Building_Examples and it looks like it's missing an important step, namely copying libopencv.a, is that right? If so can that be changed to link against the opencv shared libraries? The opencv buildsystem is quite backwards and allows either shared or static libs, but not both. And since the current default in angstrom is shared libs, it would be nice if opencv-dsp would use shared libs as well. It would also save some diskspace :slight_smile:

regards,

Koen

Thanks! I think I have an openembedded recipe to build it after those changes :slight_smile:

I've found and fixed one bug in the dsplib recipe in OE (turns out Roger already added it to OE a while back): http://cgit.openembedded.org/cgit.cgi/openembedded/commit/?id=17cf1e72de473ffd2f11e213bacd18800afc78f0

IMGlib is still not being helpfull, but we're getting there :slight_smile:

Hi,

The library is changed from static to shared. Instruction is updated on how to copy the library. It could simply be done by “#make install”.

I pushed a recipe that can compile your project: http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/opencv/opencv-dsp-acceleration_svn.bb

I do have some questions/feature requests:

1) Can the lib have an SOVERSION to make tracking changes easier? E.g. add -Wl,libopencv_dsp.so.1.0 to CFLAGS? http://rute.2038bug.com/node26.html.gz shows how to do this.
2) Can the lib be installed to /usr/lib like all the other system libraries?
3) Can you include the system CFLAGS and LDFLAGS into the build? (see recipe)
4) Related to 2), can you let the linker find the opencv lib instead of adding a hard rpath to lib/libopencv_dsp.so?
5) Can you make the cmem layout match the gstreamer-ti one (mem=99M, 128M@128M) or if that's not enough, match the dsplink sample ones (mem=80M, 128M@128M). It would be a shame to reboot when I want to use opencv instead of play movies.

I know existing TI software doesn't do all that, but we're slowly changing that :slight_smile:

regards,

Koen

Hi Koen,

Thanks for the recipe.
Please, find the answers below for question regarding features.

I pushed a recipe that can compile your project: http://cgit.openembedded.org/cgit.cgi/openembedded/tree/recipes/opencv/opencv-dsp-acceleration_svn.bb

I do have some questions/feature requests:

  1. Can the lib have an SOVERSION to make tracking changes easier? E.g. add -Wl,libopencv_dsp.so.1.0 to CFLAGS? http://rute.2038bug.com/node26.html.gz shows how to do this.

I will take a look into this document and work on the version.

  1. Can the lib be installed to /usr/lib like all the other system libraries?

Yes, they can be.

  1. Can you include the system CFLAGS and LDFLAGS into the build? (see recipe)

I will see the recipe and do that.

  1. Related to 2), can you let the linker find the opencv lib instead of adding a hard rpath to lib/libopencv_dsp.so?

I will add this to the list too.

  1. Can you make the cmem layout match the gstreamer-ti one (mem=99M, 128M@128M) or if that’s not enough, match the dsplink sample ones (mem=80M, 128M@128M). It would be a shame to reboot when I want to use opencv instead of play movies.

I had a problem of process being killed by the OS due to no free memory when I was running at 80M. This happened when I was working with video on OpenCV. That is why I shifted the memory map. I will further investigate and try to match that with gstreamer-ti.

I may need some time for some of the issues above. As midterm eveluation is near, I would like to work upon undone algorithms and benchmarking before looking into these issues.

These were all feature requests, don't let them get in the way of the midterm eval. Listen to Katie when it comes to midterm requirements :slight_smile:

Thanks!