How to install phash on ubuntu

来源:互联网 发布:商家联盟系统源码 编辑:程序博客网 时间:2024/05/24 07:10

The basic intro of installing phash on ubuntu


First Step:

     Download the phash from web (of course) : https://www.phash.org/download/


Second Step:

      Fill the required Package.

   $ sudo apt-get install make libsndfile-dev checkinstall   $ sudo apt-get install cimg-dev libjpeg62 libfftw3-3 imagemagick graphicsmagick

  or

 $ wget https://downloads.sourceforge.net/project/cimg/CImg-1.5.4.zip $ wget http://phash.org/releases/pHash-0.9.5.tar.gz  $ wget http://www.mega-nerd.com/SRC/libsamplerate-0.1.8.tar.gz $ wget http://sourceforge.net/projects/mpg123/files/mpg123/1.15.1/mpg123-1.15.1.tar.bz2/download
 $ tar xvf libsamplerate-0.1.8.tar.gz $ cd libsamplerate-0.1.8 $ ./confiure $ make && make install $ $ tar xvf mpg123-1.15.1 $ cd mpg123-1.15.1 $ ./configure $ make && make install We need to copy CImg.h in the /user/local/include folder $ unzip CImg-1.5.4.zip $ cp CImg-1.5.4/CImg.h /usr/local/include


Third Step:

   Install

   $ tar xvf pHash-0.9.5.tar.gz   $ cd pHash-0.9.5   $ ./configure LIBS='-lpthread'
   $ make && sudo make install


Forth Step:

ldconfig

pip install phash