Skip to content

Instantly share code, notes, and snippets.

@valera-rozuvan
Created January 10, 2016 14:28
Show Gist options
  • Select an option

  • Save valera-rozuvan/5ce818fb842fd5636f6a to your computer and use it in GitHub Desktop.

Select an option

Save valera-rozuvan/5ce818fb842fd5636f6a to your computer and use it in GitHub Desktop.
bash_history of an OpenCV 2.4.11 and Python 2.7 install on a raspberry pi 2
sudo raspi-config
df -h
cat /proc/cpuinfo
/opt/vc/bin/vcgencmd measure_temp
sudo shutdown -h now
sudo ifconfig
/opt/vc/bin/vcgencmd measure_temp
htop
top
/opt/vc/bin/vcgencmd measure_temp
cat /etc/rc.local
sudo dpkg-reconfigure locales
sudo dpkg-reconfigure tzdata\
sudo dpkg-reconfigure tzdata
date
sudo ifconfig
exit
sudo dpkg-reconfigure tzdata
date
/opt/vc/bin/vcgencmd measure_temp
sudo ifconfig
passwd
/opt/vc/bin/vcgencmd measure_temp
sudo raspi-config
df -h
sudo rpi-update
sudo shutdown -r now
sudo aptitude update
sudo aptitude upgrade
sudo shutdown -r now
sudo aptitude update
sudo aptitude upgrade
sudo shutdown -r now
/opt/vc/bin/vcgencmd measure_temp
exit
sudo aptitude update
sudo aptitude upgrade
git --version
mkdir from_source
cd from_source/
ls -a -h -l
git clone http://git.videolan.org/git/x264.git
cd x264/
ls -a -h -l
./configure --host=arm-unknown-linux-gnueabi --enable-shared --disable-opencl
sudo aptitude search lavf
make --jobs=4
sudo shutdown -h now
/opt/vc/bin/vcgencmd measure_temp
exit
cd from_source/x264/
git status
sudo make install
sudo ldconfig
cd ..
wget https://github.com/FFmpeg/FFmpeg/archive/n2.5.4.tar.gz
tar -zxvf n2.5.4.tar.gz
ls -a -h -l
rm -rf n2.5.4.tar.gz
ls -a -h -l
cd FFmpeg-n2.5.4/
sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-shared --enable-swscalew
sudo ./configure --arch=armel --target-os=linux --enable-gpl --enable-libx264 --enable-nonfree --enable-shared --enable-swscale
make --jobs=4
sudo make install
sudo ldconfig
cd ..
ls -a -h -l
whet https://github.com/Itseez/opencv/archive/2.4.11.tar.gz
wget https://github.com/Itseez/opencv/archive/2.4.11.tar.gz
tar -zxvf 2.4.11.tar.gz
rm -rf 2.4.11.tar.gz
ls -a -h -l
cd opencv-2.4.11/
mkdir build
cd build/
cd ~
sudo aptitude install build-essential cmake pkg-config
sudo aptitude install libjpeg8-dev libtiff4-dev libjasper-dev libpng12-dev
sudo aptitude install libgtk2.0-dev
sudo aptitude install libavcodec-dev libavformat-dev libswscale-dev libv4l-dev
sudo aptitude install libatlas-base-dev gfortran
sudo ldconfig
cd ~
mkdir temp
cd temp/
wget https://bootstrap.pypa.io/get-pip.py
sudo python get-pip.py
cd ~
rm -rf temp/
sudo pip install virtualenv virtualenvwrapper
sudo rm -rf ~/.cache/pip
nano ~/.profile
source ~/.profile
mkvirtualenv cv_01
sudo aptitude install python2.7-dev
clear
sudo aptitude install libgtk2.0-dev pkg-config
clear
pip install numpy
cd from_source/opencv-2.4.11/build/
cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D BUILD_NEW_PYTHON_SUPPORT=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -DBUILD_SHARED_LIBS=ON ..
make --jobs=4
sudo make install
sudo ldconfig
ls -a -h -l /usr/local/lib/python2.7/site-packages
cd ~/.virtualenvs/cv_01/lib/python2.7/site-packages/
pwd
ls -a -h -l
cd ~/.virtualenvs/cv_01/lib/python2.7/site-packages/
pwd
ln -s /usr/local/lib/python2.7/site-packages/cv2.so cv2.so
ls -a -h -l
ln -s /usr/local/lib/python2.7/site-packages/cv.py cv.py
ls -a -h -l
cd ~
python
exit
sudo aptitude install tightvncserver
tightvncserver
vncserver :0 -geometry 1024x600 -depth 24
exit
sudo shutdown -h now
sudo shutdown -h now\
sudo shutdown -h now
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment