Tuesday, July 2, 2013

Install opencv without root permission


1. Download old versions of OpenCV
- If gcc on my system is outdated, I may need to install an old-version of opencv.
- In my system (Fedora release 10 (Cambridge)), the OpenCV-2.4.1 or before seems to work.

2. Installation ([2][3])
- Run the following.

>> tar -xvf  OpenCV-2.4.0.tar.bz2
>> cd  ~/OpenCV-2.4.0/
>> mkdir release
>> cd release
>> cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/home/gunhee/lib/opencv2.4 -D BUILD_PYTHON_SUPPORT=ON -D PYTHON_EXECUTABLE=/home/gunhee/lib/python-2.7.3/bin/python -D PYTHONINTERP_FOUND=1 ..
(Assume that the python interpreter is at 'PYTHON_EXECUTABLE=/home/gunhee/lib/python-2.7.3/bin/python'.)
>> make
>> make install

- Add the following to the .bashrc file [3].
# opencv
export LD_LIBRARY_PATH=/home/gunhee/opencvlib/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/home/gunhee/opencvlib/lib/pkgconfig/:$PKG_CONFIG_PATH

- Test as follows to make sure whether the installation is successful [2].
>> cd ~/OpenCV-2.4.1/samples/c
>> sh  build_all.sh
>> ./facedetect  lena.jpg

- Test as follows to make sure whether the installation (for python) is successful [1].


>> cp ~/OpenCV-2.4.1/release/lib/cv2.so ~/lib/python-2.7.3/lib/python2.7/site-packages/
>> cd ~/OpenCV-2.4.1/samples/python
>> python delaunay.py


Reference
- [3] Install OpenCV without root: http://www.mesimian.com/installing-opencv/

Tuesday, December 18, 2012

Useful links for natbib package

(1) Natbib reference sheet
- http://mirror.unl.edu/ctan/macros/latex/contrib/natbib/natnotes.pdf

(2) Issue with Springer spbasic
- http://tex.stackexchange.com/questions/75182/issue-with-springer-spbasic

Sunday, December 9, 2012

Squeezing Space from Latex

http://www.eng.cam.ac.uk/help/tpl/textprocessing/squeeze.html

Wednesday, May 23, 2012

Creat postscript (ps) file by using TexShop

1. Save all image files as *.ps
  - In Adobe Acrobat, File > Save as > More Options > Encapsulated ostScript(.eps).

2. In the TexShop preferences,
  - Check Tex+DVI in the Typesetting tab.
  - Check Save Postscript File in the Engine tab.
  - Click Typeset.

Saturday, March 3, 2012

[MATLAB] Check which toolboxes have used in my code

1. First run you code.

2. Type '>> license('inuse')' .

3. If your code used image processing toolbox, output is

image_toolbox
matlab

Otherwise, if no toolbox was used, then only 'matlab' will be shown.

Wednesday, February 1, 2012

Turn off iTerm beep sound

Check
Bookmarks --> manage profiles --> terminal profiles --> default --> silence terminal bell.

Monday, August 9, 2010

[Emacs] Turn off the automatic break of long lines


This feature is called 'hard-wrap'.

In the usual emacs, add
(auto-fill-mode 0)
to your '~/.emacs'.

In the Aquamacs on OS X, add
(remove-hook 'text-mode-hook 'auto-detect-wrap)
to your '~/Library/Preferences/Aquamacs Emacs/Preferences.el'.

Ref) http://lists.aquamacs.org/pipermail/aquamacs-devel/2009-January/001823.html