You are currently browsing the Carl’s notes weblog archives for November, 2008.

Eclipse plugin folder

On Ubuntu Linux, Eclipse expects to find plugins in the /usr/local/lib/eclipse/ folder.

Matlab “Locking assertion failure.”

Running Matlab R2008a on Linux I got a bunch of error messages in the console.

Locking assertion failure. Backtrace:
#0 /usr/lib/libxcb-xlib.so.0 [0xb55257c7]
#1 /usr/lib/libxcb-xlib.so.0(xcb_xlib_unlock+0x31) [0xb5525891]
#2 /usr/lib/libX11.so.6(_XReply+0x254) [0xb57ef494]
#3 /usr/local/matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0xaec302be]
#4 /usr/local/matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0xaec0eed7]
#5 /usr/local/matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so [0xaec0f188]
#6 /usr/local/matlab/sys/java/jre/glnx86/jre1.6.0/lib/i386/xawt/libmawt.so(Java_sun_awt_X11GraphicsEnvironment_initDisplay+0x2f) [0xaec0f48f]
#7 [0xafb5c68e]

The solution is to run export MATLAB_JAVA=/usr/lib/jvm/java-6-sun/jre/ before running Matlab. A permanent solution is to add that line to /etc/profile.

See MatlabCentral for more details.

Acquiring videos from webcam and converting to PGM

ReacTIVision can process image data recorded as PGM files.

First acquire some video from the webcam with mencoder.

mencoder tv:// -tv driver=v4l2:width=640:height=480:device=/dev/video0 -nosound -ovc lavc -o myvideo.avi

This was taken from an article on linux.com. I’ve found that v4l2 works but v4l doesn’t. Replace video0 with your video device.

To convert the avi to a series of PGM files use mplayer.

mplayer -vo pnm:pgm myvideo.avi

undefined reference to `__gxx_personality_v0′

This error undefined reference to `__gxx_personality_v0' might appear when you try to link C++ object files with the C linker (cc or gcc) instead of the C++ linker (g++). Maybe the Makefile is using some default values for the compiler.