blog
Table des matières
- 2026:
- 2025:
4 billet(s) pour septembre 2026
| Notes HTTP Strict Transport Security - HSTS | 2026/09/18 11:04 | Jean-Baptiste |
| Notes GNU Linux GPU carte graphiques | 2026/09/08 15:49 | Jean-Baptiste |
| Notes GNU Linux graphique | 2026/09/08 15:42 | Jean-Baptiste |
| Notes urlencoding - passer des mots de passe en HTTPS | 2026/09/03 17:58 | Jean-Baptiste |
Compilation OpenCV sur Debian
Voir aussi :
- skimage est une alternative à OpenCV
- YOLO (Python)
Compilation et installation d'OpenCV 3.3.0 sous Debian 9
Prérequis
sudo apt-get update sudo apt-get install -y build-essential sudo apt-get install -y cmake git libgtk2.0-dev pkg-config libavcodec-dev libavformat-dev libswscale-dev sudo apt-get install -y python-dev python-numpy libtbb2 libtbb-dev libjpeg-dev libpng-dev libtiff-dev libdc1394-22-dev sudo apt-get -y install unzip # Pour la création du .deb sudo apt-get install -y fakeroot checkinstall
Téléchargement des sources
mkdir ~/src cd ~/src wget https://github.com/opencv/opencv/archive/3.3.0.zip unzip 3.3.0.zip
Pas nécessaire si -DWITH_IPP=OFF on option de compilation
mkdir -p ~/src/opencv-3.3.0/3rdparty/ippicv/downloads/linux-8b449a536a2157bcad08a2b9f266828b/ cd !$ export https_proxy=http://192.168.56.1:3128 wget https://sourceforge.net/projects/opencvlibrary/files/3rdparty/ippicv/ippicv_linux_20141027.tgz
Compilation
cd ~/src/opencv-3.3.0/cmake #cmake -DWITH_CUDA=OFF -DWITH_QT=OFF -DWITH_OPENGL=OFF -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON -DENABLE_PRECOMPILED_HEADERS=OFF .. #cmake -DCMAKE_INSTALL_PREFIX=/usr/lib/opencv3.0 -DWITH_FFMPEG=OFF -DWITH_IPP=OFF -DWITH_CUDA=OFF -DWITH_QT=OFF -DWITH_OPENGL=OFF -DFORCE_VTK=ON -DWITH_TBB=ON -DWITH_GDAL=ON -DWITH_XINE=ON -DBUILD_EXAMPLES=ON -DENABLE_PRECOMPILED_HEADERS=OFF .. cmake -DBUILD_TIFF=ON \ -DBUILD_opencv_java=OFF \ -DBUILD_SHARED_LIBS=ON \ -DBUILD_EXAMPLES=OFF \ -DBUILD_TESTS=OFF \ -DBUILD_PERF_TESTS=OFF \ -DWITH_CUDA=ON \ -DCUDA_TOOLKIT_ROOT_DIR=/usr/local/cuda-8.0 \ -DCUDA_ARCH_BIN='3.0 3.5 5.0 6.0 6.2' \ -DCUDA_ARCH_PTX="" \ -DCPU_DISPATCH=AVX,AVX2 \ -DENABLE_PRECOMPILED_HEADERS=OFF \ -DWITH_OPENGL=OFF \ -DWITH_OPENCL=OFF \ -DWITH_QT=OFF \ -DWITH_IPP=ON \ -DWITH_TBB=ON \ -DFORCE_VTK=ON \ -DWITH_EIGEN=ON \ -DWITH_V4L=ON \ -DWITH_XINE=ON \ -DWITH_GDAL=ON \ -DWITH_1394=OFF \ -DWITH_FFMPEG=OFF \ -DBUILD_PROTOBUF=OFF \ -DCMAKE_BUILD_TYPE=RELEASE \ -DCMAKE_INSTALL_PREFIX=/usr/lib/opencv3.3 \ .. make -j $(nproc)
Installation
sudo make install
Création d'un paquet Debian avec checkinstall
cat >description-pak <<EOF libopencv This package contains the header files and static library needed to compile applications that use OpenCV (Open Computer Vision) core. . The Open Computer Vision Library is a collection of algorithms and sample code for various computer vision problems. The library is compatible with IPL (Intel's Image Processing Library) and, if available, can use IPP (Intel's Integrated Performance Primitives) for better performance. . OpenCV provides low level portable data types and operators, and a set of high level functionalities for video acquisition, image processing and analysis, structural analysis, motion analysis and object tracking, object recognition, camera calibration and 3D reconstruction. EOF echo | fakeroot checkinstall --install=no \ --strip \ --stripso \ --addso \ --exclude '/home' \ --gzman \ --reset-uids \ --maintainer 'ACME SAS \<[mailto:root@acme.fr\>]root@acme.fr\>' \ --pkglicense 'Copyright' \ --pkgname opencv-all3.3 \ --pkgrelease 1 \ --pkgversion 3.3.0 \ --pkgsource 'https://github.com/opencv/opencv/archive/3.3.0.zip'
TODO : ldconfig
Exemple DEBIAN/shlibs
libcudnn 7 libcudnn7
Voir http://man7.org/linux/man-pages/man5/deb-shlibs.5.html
DEBIAN/triggers
# Triggers added by dh_makeshlibs/11.1.6ubuntu2 activate-noawait ldconfig
Voir : https://manpages.debian.org/unstable/dpkg-dev/deb-triggers.5.fr.html
Compilation du module Python PySVN sous RedHat
Compilation
sudo yum groupinstall "Development Tools" sudo yum install python2-devel subversion-devel mkdir ~/compile cd !$ export http_proxy=http://127.0.0.1:3128 export https_proxy=http://127.0.0.1:3128 wget https://downloads.sourceforge.net/project/pysvn/pysvn/V1.9.11/pysvn-1.9.11.tar.gz tar xf pysvn-1.9.11.tar.gz cd ~/compile/pysvn-1.9.11/Import/pycxx-7.1.3 #./build-all.sh ./build-unlimited-api.sh python2.7 #python setup.py install cd ~/compile/pysvn-1.9.11/Source ln -s ~/compile/pysvn-1.9.11/Import/pycxx-7.1.3/Src Src #./build.sh python2 setup.py configure --enable-debug --verbose --pycxx-dir=$HOME/compile/pysvn-1.9.11/Import/pycxx-7.1.3 make -j $(nproc)
Test
env PYTHONPATH=$PWD python2 <<< "import pysvn"
Installation
sudo cp -r ~/compile/pysvn-1.9.11/Source/pysvn /usr/lib64/python2.7/
Commande mail - SMTP client MUA Mail User Agent
Voir aussi :
- ssmtp / msmtp / /usr/sbin/sendmail
- LMTP
- curl smtp / smtps
echo -e "Chers collègues je vous offre les croissants et du chocolat pour mardi de Pâques\n\nCordialement,\nPierre Dupont" | mail -r 'pierre.dupont@acme.fr (Pierre Dupont)' -s "Croissants !" toutelequipe@acme.fr touslescopains@acme.fr pierre.dupont@acme.fr
Voir : https://www.croissantage.fr/
echo "plop" | mail -s "Sujet" contact@acme.fr -aFrom:root@acme.fr echo "plop" | mutt -e 'my_hdr From:root@acme.fr' -s "Sujet" contact@acme.fr
cat << EOM | sendmail -it -f test@acme.fr From:test@acme.fr To: <contact@plop.com> Subject: Sujet Message EOM
En encore avec curl
curl --mail-from phil@mydmn.org --mail-rcpt bob@mydmn.org smtp://srv-smtp.mydmn.org
Autre
echo Test 1 | mail -v -s "Test 1" testmail@acme.fr Resolving host fed-smtp.acme.fr . . . done. Connecting to 192.168.1.12:smtp . . . connected. 220 smtp1.localdomain ESMTP Postfix >>> HELO srv1.acme.fr 250 smtp1.localdomain >>> MAIL FROM:<root@srv1.acme.fr> 250 2.1.0 Ok >>> RCPT TO:<testmail@acme.fr> 250 2.1.5 Ok >>> DATA 354 End data with <CR><LF>.<CR><LF> >>> . 250 2.0.0 Ok: queued as 4RTx2c31XTz2Q >>> QUIT 221 2.0.0 Bye
/etc/postfix/main.cf
relayhost = fed-smtp.acme.fr
Coloration des pages man grâce à Most
article-5-installation-dun-serveur-lamp-debian-zend-server
Nous allons installer Most, un utilitaire qui ajoute la coloration aux pages de manuel:
apt-get install most
Puis indiquons à man qu'il doit utiliser most
update-alternatives --config pager
Coloration des logs
Voir aussi :
- lwatch
- dircolors
dmesg --color=always | less -R
ccze
apt-get update && apt-get install -y ccze
Exemples :
dmesg | ccze | less -r tail /var/log/syslog | ccze -A ccze -A < /var/log/syslog
blog.txt · Dernière modification : de 127.0.0.1
