Skip to content

Commit a61bd2c

Browse files
committed
Code Files Added
1 parent 090f78e commit a61bd2c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

65 files changed

+2228
-0
lines changed

Module 1/01_Codes/.DS_Store

6 KB
Binary file not shown.

Module 1/01_Codes/._README.txt

171 Bytes
Binary file not shown.
171 Bytes
Binary file not shown.

Module 1/01_Codes/3923_01

Whitespace-only changes.

Module 1/01_Codes/README.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
The install_opencv_ubuntu.sh script and ports.tar.gz MacPorts repository are in this directory and are also available on my website: http://nummist.com/opencv/install_opencv_ubuntu.sh and http://nummist.com/opencv/ports.tar.gz.

Module 1/01_Codes/__MACOSX

Whitespace-only changes.
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
#!/bin/bash
2+
3+
arch=$(uname -m)
4+
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then
5+
is_x86=1
6+
else
7+
is_x86=0
8+
fi
9+
10+
echo "Preparing to install OpenNI 1.5.4.0 (unstable), SensorKinect 0.93, OpenCV 2.4.3 and dependencies"
11+
mkdir opencv
12+
cd opencv
13+
14+
echo "Installing dependencies of OpenNI"
15+
sudo apt-get install libusb-1.0-0-dev freeglut3-dev
16+
17+
echo "Downloading OpenNI"
18+
if [ $is_x86 -eq 1 ]; then
19+
wget http://www.openni.org/wp-content/uploads/2012/12/OpenNI-Bin-Dev-Linux-x86-v1.5.4.0.tar.zip
20+
unzip OpenNI-Bin-Dev-Linux-x86-v1.5.4.0.tar.zip
21+
tar -xvf OpenNI-Bin-Dev-Linux-x86-v1.5.4.0.tar.bz2
22+
cd OpenNI-Bin-Dev-Linux-x86-v1.5.4.0
23+
else
24+
wget http://www.openni.org/wp-content/uploads/2012/12/OpenNI-Bin-Dev-Linux-x64-v1.5.4.0.tar.zip
25+
unzip OpenNI-Bin-Dev-Linux-x64-v1.5.4.0.tar.zip
26+
tar -xvf OpenNI-Bin-Dev-Linux-x64-v1.5.4.0.tar.bz2
27+
cd OpenNI-Bin-Dev-Linux-x64-v1.5.4.0
28+
fi
29+
echo "Installing OpenNI"
30+
sudo chmod a+x install.sh
31+
sudo ./install.sh
32+
cd ..
33+
34+
echo "Downloading SensorKinect"
35+
if [ $is_x86 -eq 1 ]; then
36+
wget --no-check-certificate https://github.com/avin2/SensorKinect/blob/unstable/Bin/SensorKinect093-Bin-Linux-x86-v5.1.2.1.tar.bz2?raw=true
37+
tar -xvf SensorKinect093-Bin-Linux-x86-v5.1.2.1.tar.bz2?raw=true
38+
cd Sensor-Bin-Linux-x86-v5.1.2.1
39+
else
40+
wget --no-check-certificate https://github.com/avin2/SensorKinect/blob/unstable/Bin/SensorKinect093-Bin-Linux-x64-v5.1.2.1.tar.bz2?raw=true
41+
tar -xvf SensorKinect093-Bin-Linux-x64-v5.1.2.1.tar.bz2?raw=true
42+
cd Sensor-Bin-Linux-x64-v5.1.2.1
43+
fi
44+
echo "Installing SensorKinect"
45+
sudo chmod a+x install.sh
46+
sudo ./install.sh
47+
cd ..
48+
49+
echo "Removing any pre-installed ffmpeg and x264"
50+
sudo apt-get remove ffmpeg x264 libx264-dev
51+
52+
echo "Installing dependenices of OpenCV"
53+
sudo apt-get install libopencv-dev
54+
sudo apt-get install build-essential checkinstall cmake pkg-config yasm
55+
sudo apt-get install libtiff4-dev libjpeg-dev libjasper-dev
56+
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev
57+
sudo apt-get install python-dev python-numpy python-scipy
58+
sudo apt-get install libtbb-dev
59+
sudo apt-get install libqt4-dev libgtk2.0-dev
60+
61+
echo "Downloading x264"
62+
wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20120528-2245-stable.tar.bz2
63+
tar -xvf x264-snapshot-20120528-2245-stable.tar.bz2
64+
cd x264-snapshot-20120528-2245-stable/
65+
echo "Installing x264"
66+
if [ $is_x86 -eq 1 ]; then
67+
./configure --enable-static
68+
else
69+
./configure --enable-shared --enable-pic
70+
fi
71+
make
72+
sudo make install
73+
cd ..
74+
75+
echo "Downloading ffmpeg"
76+
wget http://ffmpeg.org/releases/ffmpeg-0.11.1.tar.bz2
77+
echo "Installing ffmpeg"
78+
tar -xvf ffmpeg-0.11.1.tar.bz2
79+
cd ffmpeg-0.11.1/
80+
if [ $is_x86 -eq 1 ]; then
81+
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
82+
else
83+
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-shared
84+
fi
85+
make
86+
sudo make install
87+
cd ..
88+
89+
echo "Downloading v4l"
90+
wget http://www.linuxtv.org/downloads/v4l-utils/v4l-utils-0.8.8.tar.bz2
91+
echo "Installing v4l"
92+
tar -xvf v4l-utils-0.8.8.tar.bz2
93+
cd v4l-utils-0.8.8/
94+
make
95+
sudo make install
96+
cd ..
97+
98+
echo "Downloading OpenCV"
99+
wget -O OpenCV-2.4.3.tar.bz2 http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2/download
100+
echo "Installing OpenCV"
101+
tar -xvf OpenCV-2.4.3.tar.bz2
102+
cd OpenCV-2.4.3
103+
mkdir build
104+
cd build
105+
cmake -D CMAKE_BUILD_TYPE=RELEASE -D WITH_OPENNI=ON ..
106+
make
107+
sudo make install
108+
echo "OpenCV is installed to /usr/local/lib"
109+
echo "Appending \"/usr/local/lib\" to /etc/ld.so.conf"
110+
echo "/usr/local/lib" | sudo tee -a /etc/ld.so.conf
111+
sudo ldconfig
112+
echo "OpenCV ready to be used"

Module 1/01_Codes/ports.tar.gz

8.04 KB
Binary file not shown.

Module 1/02_Codes/.DS_Store

6 KB
Binary file not shown.

Module 1/02_Codes/3923_02

Whitespace-only changes.

0 commit comments

Comments
 (0)