Friday, October 3, 2014

Installing OpenCV in Linux

Install dependecies:

$sudo apt-get install build-essential libgtk2.0-dev libjpeg-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy python-tk libtbb-dev libeigen2-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev libx264-dev libqt4-dev libqt4-opengl-dev sphinx-common texlive-latex-extra libv4l-dev libdc1394-22-dev libavcodec-dev libavformat-dev libswscale-dev

$mkdir OpenCV
$cd OpenCV
$git clone https://github.com/Itseez/opencv.git
$cmake CMakeLists.txt
$make
$sudo make install


Make a file under /etc.ld.so.conf.d folder. Name it opencv.conf
Write /usr/local/lib/ and save the file.

$sudo gedit /etc/ld.so.conf.d/opencv.conf
$sudo ldconfig -v

Set the system variables:

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

$export LD_LIBRARY_PATH=~/opencv/OpenCV-2.0.3/release/:$LD_LIBRARY_PATH
$sudo ldconfig

$sudo gedit /etc/bash.bashrc

Type this to the last line of bash.bashrc:

PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig
export PKG_CONFIG_PATH



Wednesday, October 1, 2014

Installing LIBLAS in Linux

Start with installing GDAL, Libgeotiff and Laszip libraries which will be necessary to build LIBLAS.

Installing GDAL (this might take an hour):

$sudo apt-get install build-essential python-all-dev
$wget http://download.osgeo.org/gdal/gdal-1.9.0.tar.gz
$tar xvfz gdal-1.9.0.tar.gz
$cd gdal-1.9.0
$./configure --with-python
$make
$sudo make install    

Installing Libgeotiff:

sudo apt-get install proj proj-bin proj-data libproj-dev libtiff4-dev libgeotiff-dev libgdal1-dev gdal-bin python-gdal libgdal1-1.7.0

Installing Laszip:

cd /opt/source
wget http://download.osgeo.org/laszip/laszip-2.1.0.tar.gz
tar xvfz laszip-2.1.0.tar.gz
cd laszip-2.1.0
mkdir build
mkdir cmake_build
cd cmake_build
# run cmake
cmake .. -DCMAKE_INSTALL_PREFIX=/opt/source/laszip-2.1.0/build
# compile
make -j$threads
# install into build dir
make install


Finally now you can download LIBLAS source codes and install by typing:

$ git clone git://github.com/libLAS/libLAS.git liblas
$ cd liblas
$ mkdir makefiles
$ cd makefiles
$ cmake -G "Unix Makefiles" ../
$ make

Setting Jupyter and Tensorflow on Google Cloud Platform

https://towardsdatascience.com/running-jupyter-notebook-in-google-cloud-platform-in-15-min-61e16da34d52