Getting CCV to run on Ubuntu 9.10
Posted: 19 January 2010 12:22 AM   [ Ignore ]
Rank
Joined  2010-01-19
Total Posts:  1
New Member

Hi,

it took me a while but i managed to get ccv running on ubuntu 9.10
here is what i did, just in case anyone needs it

download the current version 0061 of openframeworks (0.6 doesn’t work on ubuntu 9.10)
check out the ccv sourrce form the repository

from the linux section of the ccv source tree copy apps/addonsExamples/Codeblocks_8_linux to apps/addonExamples of the openframeworks directory

from the linux section of the ccv source tree copy addons/ofxNCore/ to addons of the openframeworks directory

in addons/ofxNCore/src/Controls/ofxGuiButton.cpp change the
init method to load the image only if the string is set

if ( image.length() > {
        logo
.loadImage(image);
    
}

in addons/ofxNCore/src/Filters/CPUImageFilter.cpp

change the last three methods to

//--------------------------------------------------------------------------------
void CPUImageFilter::operator = ( const ofxCvGrayscaleImage_mom {
    
if(this != &_mom{  //check for self-assignment
        // cast non-const,  no worries, we will reverse any chages
        
ofxCvGrayscaleImagemom const_cast<ofxCvGrayscaleImage&>(_mom);
        
cvCopymom.getCvImage(), cvImage);
        
flagImageChanged();
    
else {
        ofLog
(OF_LOG_WARNING"in =, you are assigning a ofxCvGrayscaleImage to itself");
    
}
}

//--------------------------------------------------------------------------------
void CPUImageFilter::operator = ( const ofxCvColorImage_mom {
    
// cast non-const,  no worries, we will reverse any chages
    
ofxCvColorImagemom const_cast<ofxCvColorImage&>(_mom);
    
cvCvtColormom.getCvImage(), cvImageCV_RGB2GRAY );
    
flagImageChanged();
}

//--------------------------------------------------------------------------------
void CPUImageFilter::operator = ( const ofxCvFloatImage_mom {
    
// cast non-const,  no worries, we will reverse any chages
    
ofxCvFloatImagemom const_cast<ofxCvFloatImage&>(_mom);
    
cvConvertmom.getCvImage(), cvImage );
    
flagImageChanged();
}

then repair the broken fmodex libs and add the gstreamer libs like discribed here

and build it.

if you get any errors complaining that pglActiveTexture is missing try to reinstall mesa-common-dev

hope this helps,
guru

Profile
 
 
Posted: 30 January 2010 02:33 PM   [ Ignore ]   [ # 1 ]
Rank
Joined  2010-01-09
Total Posts:  46
New Member

I get the following error:

of_preRelease_v0061_linux_FAT/scripts/linux/ubuntu$ sudo ./install_dependencies.sh
...
ar cr ../../lib/linux/libopenFrameworks.a obj/Release/../../../openFrameworks/app/ofAppGlutWindow.o obj/Release/../../../openFrameworks/app/ofAppRunner.o obj/Release/../../../openFrameworks/graphics/ofImage.o obj/Release/../../../openFrameworks/graphics/ofGraphics.o obj/Release/../../../openFrameworks/graphics/ofBitmapFont.o obj/Release/../../../openFrameworks/graphics/ofTrueTypeFont.o obj/Release/../../../openFrameworks/graphics/ofTexture.o obj/Release/../../../openFrameworks/sound/ofSoundStream.o obj/Release/../../../openFrameworks/sound/ofSoundPlayer.o obj/Release/../../../openFrameworks/video/ofQtUtils.o obj/Release/../../../openFrameworks/video/ofGstUtils.o obj/Release/../../../openFrameworks/video/ofVideoGrabber.o obj/Release/../../../openFrameworks/video/ofVideoPlayer.o obj/Release/../../../openFrameworks/video/ofUCUtils.o obj/Release/../../../openFrameworks/utils/ofUtils.o obj/Release/../../../openFrameworks/utils/ofMath.o obj/Release/../../../openFrameworks/communication/ofSerial.o obj/Release/../../../openFrameworks/communication/ofArduino.o
chown: cannot access `../../lib/linux64/*’: No such file or directory

Why linux64? this is a 32 bit machine ... and which lib directory?

OK found it! ->
mkdir of_preRelease_v0061_linux_FAT/libs/openFrameworksCompiled/lib/linux64
touch of_preRelease_v0061_linux_FAT/libs/openFrameworksCompiled/lib/linux64/empty
sudo ./install_dependencies.sh

 Signature 

LED-LP, PS3Eye, Atom330, Ubuntu Lucid, Movid, PyMT

Profile
 
 
Posted: 30 January 2010 02:43 PM   [ Ignore ]   [ # 2 ]
Rank
Joined  2010-01-09
Total Posts:  46
New Member

and the next error:

sudo ./install_codeblocks.sh
...
E: Command line option ‘e’ [from -dev] is not known.

in line 31 of install_codeblocks.sh
pkg=$(pkg-config --list-all 2>&1 1>/dev/null | grep “Package ‘.*’,” | sed “s/Package ‘\(\.*\)/\1/g” | sed “s/\(\.*\)’.*/\1/g")
results to an empty string.
why is it not catched?

Now some paths that are not correct in codeblocks:
../../../libs/fmodex/inc has to be ../../../libs/fmodex/include
../../../libs/rtAudio has to be ../../../libs/rtAudio/include
(for what do we need rtAudio?—I think there are to much dependencies of not realy needed libs)

What to do with ofxVectorMath?
Take the version from CCV or of_preRelease_v0061? (mixing seems not so good ...)

tried to copy ...
cp -a tbeta/trunk/tbeta/Linux/addons/ofxVectorMath of_preRelease_v0061_linux_FAT/addons
cp -a tbeta/trunk/tbeta/Linux/libs/openFrameworks/communication/ofStandardFirmata* of_preRelease_v0061_linux_FAT/libs/openFrameworks/communication

now some libs in linux-subdirs:
cp -a of_preRelease_v0061_linux_FAT/libs/freetype/lib/linux/libfreetype.a of_preRelease_v0061_linux_FAT/libs/freetype/lib
cp -a of_preRelease_v0061_linux_FAT/libs/FreeImage/lib/linux/libfreeimage.a of_preRelease_v0061_linux_FAT/libs/FreeImage/libfreeimage.a
cp -a of_preRelease_v0061_linux_FAT/libs/rtAudio/lib/linux/libRtAudio.a of_preRelease_v0061_linux_FAT/libs/rtAudio/libRtAudio.a
cp -a of_preRelease_v0061_linux_FAT/libs/glee/lib/linux/libGLee.a of_preRelease_v0061_linux_FAT/libs/glee/libGLee.a
cp -a of_preRelease_v0061_linux_FAT/libs/gstappsink/lib/linux/liboFappsink.a of_preRelease_v0061_linux_FAT/libs/gstappsink/lib/liboFappsink.a

the fmodex.so:
cp of_preRelease_v0061_linux_FAT/apps/addonsExamples/Codeblocks_8_linux/bin/libs/libfmodex-4.22.00.so of_preRelease_v0061_linux_FAT/apps/addonsExamples/Codeblocks_8_linux/bin/libs/libfmodex.so

now I get:
Linking console executable: bin/Community_Core_Vision
/usr/bin/ld: cannot find -lunicap
Solution:
sudo cp of_preRelease_v0061_linux_FAT/libs/unicap/lib/linux/libunicap.a /usr/local/lib

After adding avformat and swscale to link libraries I get:
Linking console executable: bin/Community_Core_Vision
obj/Release/libs/openFrameworks/video/ofVideoGrabber.o: In function `ofVideoGrabber::initGrabber(int, int, bool)’:
ofVideoGrabber.cpp:(.text+0x22c): undefined reference to `ofGstUtils::setDeviceID(unsigned int)’
ofVideoGrabber.cpp:(.text+0x246): undefined reference to `ofGstUtils::initGrabber(int, int, int)’
ofVideoGrabber.cpp:(.text+0x2bb): undefined reference to `ofGstUtils::getPixels()’
-- what shall I do?

It would be very nice if someone who has compiled this Community_Core_Vision with ubuntu 9.10 could make a source-package with all modifications in it. wink
Otherwise we should think about building a new Version for ubuntu/linux from scratch!

 Signature 

LED-LP, PS3Eye, Atom330, Ubuntu Lucid, Movid, PyMT

Profile
 
 
Posted: 16 February 2010 01:51 PM   [ Ignore ]   [ # 3 ]
Avatar
Rank
Joined  2010-01-17
Total Posts:  53
New Member

THANK YOU SO MUCH !!
I was trying to understand how gdb works to fix the problem in ofxGuiButton and I saw this thread. I can finally build CCV with Eclipse, using the latest Unicap lib, patched with kaswy’s code smile
THANKS AGAIN

 Signature 

LLP + LCD Build Log

Profile
 
 
Posted: 02 March 2010 03:49 AM   [ Ignore ]   [ # 4 ]
Rank
Joined  2010-02-18
Total Posts:  18
New Member
bernt - 30 January 2010 02:43 PM

After adding avformat and swscale to link libraries I get:
Linking console executable: bin/Community_Core_Vision
obj/Release/libs/openFrameworks/video/ofVideoGrabber.o: In function `ofVideoGrabber::initGrabber(int, int, bool)’:
ofVideoGrabber.cpp:(.text+0x22c): undefined reference to `ofGstUtils::setDeviceID(unsigned int)’
ofVideoGrabber.cpp:(.text+0x246): undefined reference to `ofGstUtils::initGrabber(int, int, int)’
ofVideoGrabber.cpp:(.text+0x2bb): undefined reference to `ofGstUtils::getPixels()’
-- what shall I do?

You have to add ofGstUtils.h and ofGstUtils.cpp to Community Core Vision.cbp. They exist in of_preRelease_v0061_linux_FAT.

I don’t know how to do that using the CB GUI, so I modified Community Core Vision.cbp in gedit.
Basically, you just add those lines in the proper location (check the paths):

<Unit filename="../../../libs/openFrameworks/video/ofGstUtils.cpp">
            <
Option virtualFolder="libs/openframeworks/video/" />
        </
Unit>
        <
Unit filename="../../../libs/openFrameworks/video/ofGstUtils.h">
            <
Option virtualFolder="libs/openframeworks/video/" />
        </
Unit>

Let me know if you make some progress. I’m stuck with an OpenCV error.

Profile
 
 
Posted: 06 August 2010 02:34 PM   [ Ignore ]   [ # 5 ]
Rank
Joined  2009-12-17
Total Posts:  21
New Member

This seems to work for building and indeed, I can get something out of ccv. however gstreamer does not understand the PS3 eye-toy within openframeworks anymore and switching to the video file fails. Will post more when I have it.

Profile