Verified Installs
*******************
- Original install by myself on Puppy 4.3.1
- Secondary install by myself on Puppy 4.3.0 (from fresh puppy install)
- Install by swindler on Puppy 4.3.1 (from fresh install)
*******************
I finally got OpenCV installed and running after many frustrating hours of hacking at terminal commands and tracking down libraries. Turns out it ended up being a lot simpler than I was making it, thanks to the PET package directory on the Puppy Official Site.
This is a HOW TO guide on how to get OpenCV up and running in Puppy:
First, we must install many prerequisites to even have the slighest chance at getting this thing to compile. Here are a list of all the packages that I installed before compiling. They can mostly all be downloaded from HERE
NOTE: It should be noted that before you start installing anything but the devx file, that you should verify that you have a recent version of gtk+-2.x (with the dev packages too). There should be some PETs in the same directory that the link above points to.
As noted by swindler, there may be an issue with the gtk+-2.18 PETs, but the gtk+-2.14 PETs work
The pets that are links are not in the folder mentioned above can be downloaded from the link when you click on them.
- devx_xxx.sfs
Python+=2.6.4-i486.pet
ffmpeg-20080731-i486.pet
ffmpeg_DEV-20080731-i486.pet
zlib-1.2.3.pet
libjpeg-6b.pet
libpng-1.2.22-patched1-pup4.pet
libtiff-3.7.4.pet
fontconfig-2.6.0-prescott.pet
fontconfig_DEV-2.6.0-prescott.pet
x264-20080731-2245-i486.pet
libv4l
After you have all of those packages installed, you need to get opencv
do that by running:
NOTE: <your_working_dir> indicates the path where you wish to install OpenCV
Code: Select all
#cd ~/<your_working_dir>
#svn co http://opencvlibrary.svn.sourceforge.net/svnroot/opencvlibrary/trunk .
First, we make a release directory where we will be installing to and cd into that directory.
Code: Select all
#cd ~/<your_working_dir>/opencv
#mkdir release
#cd release
NOTE: OpenCV now ONLY supports CMAKE to build. ./configure is no longer used.
Code: Select all
#cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_PYTHON_SUPPORT=ON ..
-- Looking for linux/videodev.h
-- Looking for linux/videodev.h - not found
-- Looking for linux/videodev2.h
-- Looking for linux/videodev2.h - not found
Then we have to modify the CMakeCache.txt file. If it says that those libraries are "found", then skip this step.
First of all, verify that the videodev.h and videodev2.h files exist in the directory: /usr/include/linux
If they don't, then you are likely missing a dependency, that we need to track down for you, before you can continue this install.
If they exist, then you need to open the CMakeCache.txt file from your release folder (should be in the current directory that you ran cmake from)
Search for the lines:
Code: Select all
//Have include linux/videodev.h
HAVE_CAMV4L:INTERNAL=
//Have include linux/videodev2.h
HAVE_CAMV4L2:INTERNAL=
Code: Select all
//Have include linux/videodev.h
HAVE_CAMV4L:INTERNAL=1
//Have include linux/videodev2.h
HAVE_CAMV4L2:INTERNAL=1
Now run:
Code: Select all
#make
#make install
Run the following code to add the libraries to the paths:
Code: Select all
#ldconfig -v
#export LD_LIBRARY_PATH=/usr/local/lib:$LD_LIBRARY_PATH
#cd ~/<your_working_dir>/opencv
#export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
Run the following code to run the cxcore and cv tests:
Code: Select all
#cd ~/<your_working_dir>/opencv/release/bin
#./cxcoretest
#./cvtest -d ~/<your_working_dir>/opencv/tests/cv/testdata/cv
Finally, it is time to have some fun! A good place to start is with the samples that install with OpenCV. You will need to navigate to the directory
Run the following to build the samples and run an example:
Code: Select all
#cd ~/<your_working_dir>/opencv/samples/c
#. build_all.sh
#./delaunay
If you have any questions or suggestions, please let me know. Also if you try it on another version of puppy, also let me know so I can add it to the verified versions.
ENJOY!!