I have only built OSSIM on Fedora, but I see some things that might be tripping you up.
Your script installs ossim-core and libossim-dev, this is not a good idea. These are pretty old. When you call from the command line without specifying which OSSIM you're talking about (the built one or the package) you can get very frustrated if you change your built version and nothing seems to be changing!
I would turn off the predator plugin unless you plan on using it (for UAV video). Remove anything that has to do with Kakadu. You are right, this is a $ library. I don't believe that OSSIM has another way of reading in JPEG2000 unless GDAL supports it. We don't typically build the plugins that I mention to turn off below. Jpeg support can come from the GDAL plugin.
Remove: DKAKADU_LIBRARY, DKAKADU_AUX_LIBRARY, DKAKADU_ROOT_SRC
Turn off: DBUILD_OSSIMREGISTRATION_PLUGIN, DBUILD_OSSIMOPENJPEG_PLUGIN, DBUILD_OSSIMPREDATOR, DBUILD_OSSIMCONTRIB_PLUGIN
Turn on: DBUILD_OSSIMGDAL_PLUGIN
Rebuild OSSIM. If the package for GDAL isn't working with your machine, I've downloaded gdal and compiled it successfully many times.( http://trac.osgeo.org/gdal/wiki/DownloadSource ) version 1.7.3 should work. I haven't tested the latest version.
OSSIM can open TIF and NITF
OSSIM_PLUGIN = SAR imagery types
GDAL_PLUGIN = Everything else
As for the segfault. I think it comes from mismatch in what you're building with versus running with. Just incase, could you send the cpp (You may have dereferenced a null pointer on accident)?
We've seen seg faults on linux when using jpeg images in opencv. We've found png to be more stable. There may be a conflict with the jpeg you've installed from apt-get and the one that opencv is using. If your simple program is opening the same image with the same function as the complex one, then that rules out jpeg problem though.
Bryan
-----Original Message-----
Hi to all,
I'm hoping someone can help me. I've been trying to install Open-CV, OSSIM and the ICode-MDA in the Linux Ubuntu 10.10 environment.
I have successfully installed Open-CV and tested it. The ICode-MDA examples that only require Open-CV also work 100%.
However, I'm struggling with the OSSIM installation. I have the basic ossim framework installed (or at least I think so). Ossim compiles to 100% with no errors, but only when certain plugins are disabled. I have tested a few basic examples and they seem to work. But when I try more complicated programs such as edge detection using ossim I get segmentation faults. This indicates to me that my ossim installation is not complete and obviously missing the necessary plugins. See attached script for entire compile procedure. The selected options that work for me are:
cmake .. -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release -DBUILD_OSSIM_MPI_SUPPORT=OFF -DCMAKE_LIBRARY_PATH=$OSSIM_DEPENDENCIES/lib -DCMAKE_INCLUDE_PATH=$OSSIM_DEPENDENCIES/include -DCMAKE_FRAMEWORK_PATH=$OSSIM_DEPENDENCIES/Frameworks -DCMAKE_INSTALL_PREFIX=$OSSIM_INSTALL_PREFIX -DBUILD_OSSIMPREDATOR=ON -DBUILD_OSSIM_PLUGIN=ON -DBUILD_OSSIMGDAL_PLUGIN=OFF -DBUILD_OSSIMKAKADU_PLUGIN=OFF -DKAKADU_ROOT_SRC=$OSSIM_DEPENDENCIES/kakadu-6.3 -DKAKADU_LIBRARY=$OSSIM_DEPENDENCIES/kakadu/bin/libkdu_v62R.so -DKAKADU_AUX_LIBRARY=$OSSIM_DEPENDENCIES/kakadu/lib/libkdu_a62R.dyli -DBUILD_OSSIMPNG_PLUGIN=ON -DBUILD_OSSIMREGISTRATION_PLUGIN=ON -DOSSIM_FRAMEWORK_GENERATION=ON -DBUILD_OSSIMQT=ON -DBUILD_OSSIM_PACKAGES=ON -DBUILD_SHARED_LIBS=ON -DOSSIM_BUILD_DOXYGEN=ON -DBUILD_OSSIMOPENJPEG_PLUGIN=ON -DBUILD_OSSIMCONTRIB_PLUGIN=ON -DBUILD_OSSIMGEOPDF_PLUGIN=OFF -DBUILD_OSSIMHDF_PLUGIN=OFF
I believe the error lies in that my GDAL plug-in isn't enabled and doesn't compile. As soon as I enable the GDAL option -DBUILD_OSSIMGDAL_PLUGIN=ON the compiler complains that it is looking for the "libkdu_a62R.dylib" (which is a mac file if i'm not mistaken) to compile this. I also cannot download this file anywhere (licensed by Kakadu software, http://www.kakadusoftware.com/ ). I have emailed Kakadu and they say I need to purchase a license for this - which I'm not looking to do at this stage.
Is this true, do i really need this file to compile GDAL into OSSIM. I find that difficult to believe because from what I understand is that this Kadadu lib just handles Jpeg2000 file types. If so why isn't an open source implementation of this being used? I assume I'm just compiling it wrong for this?
Please have a look at the attached script. It is straight forward. I first install all the required packages that I need. I'm sure there are many packages in there that are not necessary, but I just added them as I was trying to get it to work. I then check out OSSIM, export the required variables and attempt to compile it. I then manually set-up the prefences-file. The script then installs OpenCV and checks-out ICODE-MDA and compiles it. I'm hoping that someone can find an error and point me in the right direction.
I hope this all makes sense and that you can follow it. If there are any questions please let me know.
Thanks
Regards
Manfred
|