Thursday, August 30, 2012
[compile] SVM_struct
Recently, i'm interested in SVM struct software: http://tfinley.net/software/svmpython2/
However, when i'm compiling it, i got the following error.
/usr/bin/ld: note: 'exp@@GLIBC_2.2.5' is defined in DSO /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libm.so so try adding it to the linker command line
/usr/lib/gcc/x86_64-linux-gnu/4.6/../../../x86_64-linux-gnu/libm.so: could not read symbols: Invalid operation
I googled the problem, and find that it is caused by the gcc-4.6 compiler.
The problem was gone after i removed -lm in LDFLAGS
Thursday, June 28, 2012
[Ubuntu 12.04 + win7 dual boot on RAID 1]
1) Download ubuntu alternate install iso.
http://releases.ubuntu.com/precise/
2) Install
3) Reboot...But no Grub2 is installed.
4) Install Grub2.
http://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
boot-repair
5) Reboot. Should have ubuntu entries.
6) open terminal. sudo update-grub. Win7 entry will be added to Grub2.
http://releases.ubuntu.com/precise/
2) Install
3) Reboot...But no Grub2 is installed.
4) Install Grub2.
http://www.howtogeek.com/114884/how-to-repair-grub2-when-ubuntu-wont-boot/
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt-get update
sudo apt-get install -y boot-repair
boot-repair
5) Reboot. Should have ubuntu entries.
6) open terminal. sudo update-grub. Win7 entry will be added to Grub2.
Wednesday, May 30, 2012
Install FLANN with Python support
1) download FLANN http://www.cs.ubc.ca/~mariusm/index.php/FLANN/FLANN
2) download compiled DLL files from PCL: http://pointclouds.org/downloads/windows.html
3) put DLLs in src/python/bindings/lib
4) put src/python folder into python27/lib/site-package
2) download compiled DLL files from PCL: http://pointclouds.org/downloads/windows.html
3) put DLLs in src/python/bindings/lib
4) put src/python folder into python27/lib/site-package
Monday, April 16, 2012
Install OpenCV 2.3 with Python support
http://www.youtube.com/watch?v=b3IQyhJXK78
/* Installing OpenCV 2.3 in Ubuntu.I had a lot of problems initially to install and port the OpenCV library to Python. But after reading a lot of blogs I finally found a solution which I have posted below. */ //jayneil.dalal@gmail.com //28-10-11 1)Install all pre requisites sudo apt-get install build-essential sudo apt-get install cmake sudo apt-get install pkg-config sudo apt-get install libpng12-0 libpng12-dev libpng++-dev libpng3 sudo apt-get install libpnglite-dev libpngwriter0-dev libpngwriter0c2 sudo apt-get install zlib1g-dbg zlib1g zlib1g-dev sudo apt-get install libjasper-dev libjasper-runtime libjasper1 sudo apt-get install pngtools libtiff4-dev libtiff4 libtiffxx0c2 libtiff-tools sudo apt-get install libjpeg8 libjpeg8-dev libjpeg8-dbg libjpeg-prog sudo apt-get install ffmpeg libavcodec-dev libavcodec52 libavformat52 libavformat-dev sudo apt-get install libgstreamer0.10-0-dbg libgstreamer0.10-0 libgstreamer0.10-dev sudo apt-get install libxine1-ffmpeg libxine-dev libxine1-bin sudo apt-get install libunicap2 libunicap2-dev sudo apt-get install libdc1394-22-dev libdc1394-22 libdc1394-utils sudo apt-get install swig sudo apt-get install libv4l-0 libv4l-dev sudo apt-get install python-numpy sudo apt-get install build-essential libgtk2.0-dev libjpeg62-dev libtiff4-dev libjasper-dev libopenexr-dev cmake python-dev python-numpy libtbb-dev libeigen2-dev yasm libfaac-dev libopencore-amrnb-dev libopencore-amrwb-dev libtheora-dev libvorbis-dev libxvidcore-dev 2)Install the python development headers sudo apt-get install python-dev 3)Download the source code: http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.3/ 4)Go to the directory where OpenCV is downloaded via the terminal only and then un zip the package: (note:- It is recommended that you move the downloaded OpenCV package to the home/<user> directory tar -xvf OpenCV-2.3.1a.tar.bz2 cd OpenCV-2.3.1/ 5)Now make a new directory called build and go in to it mkdir build cd build 6)Run Cmake cmake -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=OFF -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON .. 7)Now make make 8) Make it permanent sudo make install 9)Configuring OpenCV for using shared libraries: sudo gedit /etc/ld.so.conf.d/opencv.conf Add the following line at the end of the file (it may be an empty file, that is ok) and then save it: /usr/local/lib Close the file and run the following command to configure the library: sudo ldconfig OR RUN : export LD_LIBRARY_PATH=/usr/local/lib 10)Open your .bashrc file and add the following: gedit .bashrc sudo gedit /etc/bash.bashrc add the following at the end of the file - PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig export PKG_CONFIG_PATH Save and close the file 11) Reboot the system http://ubuntuone.com/0qwnXh8VoufDMHGiu5kLIK (Link to download this text file)
Tuesday, April 3, 2012
How to pass IEEE PDF eXpress Site
In my first submission I followed the instructions here and everything was wonderful, but one week later I had to update the paper, I
added a line and did the same procedure but it failed! I got the following error:
"miktex gpl ghostscript 8.60 unrecoverable error exit code 1"
Then I tried the same procedure again with the first file which successfully passed my first pdfexpress trial, but it also gave the
same error. I tried with different computers but failed. I updated mixtex to 2.9 but again failed. Later I solved the problem with the
following procedure:
I did not have GhostScript in my computer so downloaded it from
http://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/gs900/gs900w32.exe
and GhostView from
http://pages.cs.wisc.edu/~ghost/gsview/index.htm
I formed my .ps file as usual (either described in this page or directly from latex "dvi to ps" button), opened my ps file with
GhostView and did the same settings given in the last line of the solution offered in this page (the line starting with ps2pdf) as
follows:
1- Open your ps file with GSView.
2- From GSView "File" menu select "Convert".
3- A dialog box will open. Select "pdfwrite" from left of the box. At the right there is a "Properties" button, select it and do the
following settings:
Set "CompatibilityLevel" to 1.4
Set "PDFSETTINGS" to /prepress
Set "EmbedAllFonts" to true
(I also set "SubsetFonts" to true, but I don't know if it is necessary).
4- Click OK and save your file. And at last it absolutely passes the pdfexpress!
added a line and did the same procedure but it failed! I got the following error:
"miktex gpl ghostscript 8.60 unrecoverable error exit code 1"
Then I tried the same procedure again with the first file which successfully passed my first pdfexpress trial, but it also gave the
same error. I tried with different computers but failed. I updated mixtex to 2.9 but again failed. Later I solved the problem with the
following procedure:
I did not have GhostScript in my computer so downloaded it from
http://mirror.cs.wisc.edu/pub/mirrors/ghost/GPL/gs900/gs900w32.exe
and GhostView from
http://pages.cs.wisc.edu/~ghost/gsview/index.htm
I formed my .ps file as usual (either described in this page or directly from latex "dvi to ps" button), opened my ps file with
GhostView and did the same settings given in the last line of the solution offered in this page (the line starting with ps2pdf) as
follows:
1- Open your ps file with GSView.
2- From GSView "File" menu select "Convert".
3- A dialog box will open. Select "pdfwrite" from left of the box. At the right there is a "Properties" button, select it and do the
following settings:
Set "CompatibilityLevel" to 1.4
Set "PDFSETTINGS" to /prepress
Set "EmbedAllFonts" to true
(I also set "SubsetFonts" to true, but I don't know if it is necessary).
4- Click OK and save your file. And at last it absolutely passes the pdfexpress!
Thursday, March 8, 2012
[Linux] Easiest way to compile LAPACK shared library !!!
1) Download Lapack 3.4.0
http://www.netlib.org/lapack/lapack-3.4.0.tgz
2) Get autoconf tool here (Thanks to Prof. Allin Cottrell !)
http://www.wfu.edu/~cottrell/lapack/
3) Follow the Readme in autoconf tool.
Enjoy!!
Edit Makefile to use different compiler flags:
http://www.netlib.org/lapack/lapack-3.4.0.tgz
2) Get autoconf tool here (Thanks to Prof. Allin Cottrell !)
http://www.wfu.edu/~cottrell/lapack/
3) Follow the Readme in autoconf tool.
Enjoy!!
Edit Makefile to use different compiler flags:
-funroll-all-loops -O3 -msse2 -mfpmath=sse -ftree-vectorize -g -fPIC
Friday, February 3, 2012
[Matlab] How to flip an image?
im = im (:, end : -1 : 1, :);
Subscribe to:
Posts (Atom)