Categories
Blog Final Year Project Posts

FYP – Pedestrian Detection – Test 2

The latest version of my final year project, almost complete. It’s designed to be a pedestrian detection system used in reversing cameras on cars. Possibly more information to come, see here – projects/finalyearproject/

Categories
Linux OpenCV Posts Ubuntu

How To: Fix “No accelerated colorspace conversion found from yuv420p to bgr24.” | OpenCV-2.2.0 & Ubuntu 10.10

[swscaler @ 0xbf2130]No accelerated colorspace conversion found from yuv420p to bgr24.

This problem is basically an issue converting YUV to RGB using ffmpeg, in order for it to work ffmpeg needs to be recompiled with x264. To get around it use the following to recompile ffmpeg and OpenCV 2.1/2.2:

  1. Follow steps 1-to-4 of FakeOutdoorsman’s guide on ubuntuforums.org – here
  2. OpenCV 2.1/2.2 Install Guide by Sebastian Montabone – here
Categories
OpenCV Posts Ubuntu

Yet Another OpenCV/Karmic error – symbol lookup error: /usr/local/lib/libhighgui.so.4

symbol lookup error: /usr/local/lib/libhighgui.so.4: undefined symbol: av_free_packet

To fix it simply make sure /usr/local/lib is in your library path by using the following command:

export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH

Categories
HowTo OpenCV Posts Ubuntu

HowTo: Install OpenCV in Ubuntu Karmic (9.10)

Heres how I got OpenCV installed:

First install some needed packages

sudo apt-get install build-essential libgtk2.0-dev

Now you need to grab FFmpeg for the install to work

svn checkout svn://svn.ffmpeg.org/ffmpeg/trunk ffmpeg

The svn didn’t work for me, probably something to do with the proxy I’m under at Uni so I had to grab the source and compile it:

Download – http://ffmpeg.org/releases/ffmpeg-0.5.tar.bz2

(skip the tar step if you svn the package)

tar -jxvf ffmpeg-0.5.tar.bz2

Configure and install ffmpeg

cd ffmpeg

./configure --enable-shared

make

sudo make install

Next grab a copy of OpenCV (I used OpenCV-2.0.0.tar.bz2 in this guide)

Download – http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.0/

tar -jxvf OpenCV-2.0.0.tar.bz2

cd OpenCV-2.0.0

./configure --with-ffmpeg --with-gtk --with-quicktime=false

make

sudo make install

Now you should be setup, try running one of the sample programs to test it:

cd samples/c/

. build_all.sh

./facedetect

Categories
HowTo OpenCV Posts Ubuntu

Problems Installing OpenCV in Ubuntu Karmic (9.10)

UPDATE

I now have it working and wrote a guide of how I got it to work –

http://alexsleat.com/2009/12/02/howto-install-opencv-in-ubuntu-karmic-9-10/

END UPDATE

I found a great guide on getting OpenCV to install on Ubuntu Karmic (9.10) –http://ivkin.net/2009/11/installing-opencv-2-0-on-ubuntu-9-10-karmic-koala/

Most the comments show the guide works however I have a couple of problems:

Firstly when reloading the libraries to make opencv show up
ldconfig -v | grep opencv
That results in the following output:
/sbin/ldconfig.real: Cannot stat /lib/i486-linux-gnu: No such file or directory
/sbin/ldconfig.real: Cannot stat /lib64: No such file or directory
/usr/local/opencv/lib:

However continuing on with the installation and it is able to compile all the sample programs, but when attempting to run most of them it seems it fails at running the GUI:
./facedetect
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvNamedWindow, file highgui/window.cpp, line 100
terminate called after throwing an instance of 'cv::Exception'
Aborted

When I find the fix for this I will make sure to update the post, if you find my post and fix it yourself please leave a comment how you did it.