Sunday, April 13, 2014

Package opencv was not found (CentOs 6.5)

$g++ `pkg-config --cflags --libs opencv` anycode.cpp -o anycode

Package opencv was not found in the pkg-config search path.                                             
Perhaps you should add the directory containing `opencv.pc'                                              
to the PKG_CONFIG_PATH environment variable                                                              
No package 'opencv' found

Solution
1) find opencv.pc
$ locate opencv.pc

/mnt/vol3/installers/opencv/opencv-2.4.8/build/unix-install/opencv.pc      
...    
/usr/local/lib/pkgconfig/opencv.pc  

2) then add to enviroment variable the path
$ export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/usr/local/lib/pkgconfig/



Friday, April 11, 2014

Virtual Machine over Ubuntu 12.04

1) KVM

$sudo egrep '(vmx|svm)' --color=always /proc/cpuinfo
$sudo apt-get install ubuntu-virt-server python-vm-builder kvm-ipxe virtinst libcap2-bin
$sudo adduser `id -un` libvirtd
$sudo adduser `id -un` kvm
$sudo virsh -c qemu:///system list
$sudo apt-get install bridge-utils
$sudo /etc/init.d/networking restart
$sudo vi /etc/network/interfaces
#add this lines
auto kvmbr0
iface kvmbr0 inet dhcp
bridge_ports eth0

$ sudo /etc/init.d/networking restart


References:
[1] http://www.mrxuri.com/2013/11/22/install-kvm-on-ubuntu-server-12-04-lts-and-create-a-virtual-machine.html
[2] http://www.howtoforge.com/virtualization-with-kvm-on-ubuntu-12.04-lts

Thursday, April 10, 2014

Latex recursos

Cuando queremos colocar varias imágenes en una misma fila [4] y [5], nos dan un ejemplo para colocar 3 imágenes en una, cada una usa comandos diferentes.

\begin{figure} 
  \begin{subfigure} [b]{0.3\textwidth}
     \includegraphics{}
  \end{subfigure}
  ...
\end{figure}

\begin{figure}
  \minipage{0.32\textwidth}
    \includegraphics{}
  \endminipage
  ...
\end{subfigure}

Cuando las imágenes se desordenan es decir no conservan el lugar que queremos podemos usar [6], que resumido seria:

\begin{figure}[htpb]
  ...
\end{figure}



Referencias:
[1] TexMaker   http://www.xm1math.net/texmaker/
[2] Other editor http://www.texniccenter.org/
[3] Manual/Lo necesario para trabajar con Latex(Crear Pdf)http://copa.uniandes.edu.co/software/latex/manual.html

[4] Floats, Figures, Captions http://en.wikibooks.org/wiki/LaTeX/Floats,_Figures_and_Captions
[5] http://tex.stackexchange.com/questions/10245/how-to-order-3-images-horizontally
[6] http://stackoverflow.com/questions/518284/problem-with-float-and-pictures-in-latex

Virtual Printer over Ubuntu


$sudo apt-get install cups-pdf
$sudo /etc/init.d/cupsys restart
 
references
[1] http://ubuntuportal.com/2012/04/easy-way-to-create-pdf-printer-in-ubuntu-12-04.html
[2] http://ubuntuforums.org/showthread.php?t=140815

Latex over Ubuntu 12.04/Centos 6.5

Ubuntu
$sudo apt-get install texlive-full
$sudo apt-get install texmaker

Centos
#yum install tetex
#yum install texlive-*



references:
[1] http://www.linuxhispano.net/2010/11/16/instalar-latex-ubuntu/
[2] http://askubuntu.com/questions/392102/how-to-install-latex-in-ubuntu-13-10

Tuesday, April 08, 2014

Photoshop CS6 Over Ubuntu 12.04

1) Prerequisites
wine installed
winetricks installed

2) Add complements (this take many minutes)
$winetricks -q atmlib gdiplus ie6 vcrun2005sp1 vcrun2008 fontsmooth-rgb corefonts msxml3 msxml6 vcrun2010

3) Download Photoshop
https://www.dropbox.com/s/lzg1hdwwjsy0550/Adobe%20Photoshop%20CS6%20Extended-FOR-UBUNTU%20WIN.zip

4) Install using wine
$wine Adobe\ Photoshop\ CS6\ Extended.exe

5) Post install
$winetricks fontsmooth-rgb

 

references:
[1] https://www.winehq.org/download/ubuntu
[2] http://wiki.winehq.org/winetricks
[3] http://ibuxcomputer.wordpress.com/2013/10/24/como-instalar-photoshop-en-ubuntu-13-04/

Sunday, April 06, 2014

OpenCV Centos 6.5 VideoCapture doesn't work with video files

You need recompile

when  you make configure files
#cmake ..
Or
#cmake -D CMAKE_BUILD_TYPE=RELEASE -D CMAKE_INSTALL_PREFIX=/usr/local -D WITH_TBB=ON -D BUILD_NEW_PYTHON_SUPPORT=ON -D WITH_V4L=ON -D INSTALL_C_EXAMPLES=ON -D INSTALL_PYTHON_EXAMPLES=ON -D BUILD_EXAMPLES=ON -D WITH_QT=ON -D WITH_OPENGL=ON ..


Verify summary

# yum search ffmpeg

ffmpeg-devel.xxxx

gstreamer-ffmpeg.xxxx

# yum search gstreamer
gstreamer-devel.xxxx
gstreamermm.xxxx

install using yum

finally

export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/usr/local/lib


references:
[1] http://prateekvjoshi.com/2013/10/18/package-opencv-not-found-lets-find-it/

Firefox open multiple private window

    /opt/firefox/firefox-bin --profile $(mktemp -d) --private-window www.google.com www.bing.com