ffmpeg rtsp 编译

ffmpeg 3.4.1
make clean
./configure --disable-cuda --disable-cuvid --disable-vaapi --enable-pic --enable-shared --disable-everything  --enable-decoder=h264 --enable-parser=h264 --enable-protocol=rtp --enable-demuxer=rtp --enable-demuxer=rtsp --disable-pthreads --disable-v4l2-m2m

Tensorflow, Spyder, Python3.6, OpenCV3 极速安装

0. 删除Nvidia一切驱动 (cuda,cudnn)

sudo apt-get remove --purge nvidia*
sudo apt-get autoremove
# Remove anything linked to nvidia

 

1,安装Anaconda

下载地址:https://www.continuum.io/downloads/(我安装的是linux-64-python3.6) 
bash安装,一路默认,最后选No,不要改变系统环境,要不然会覆盖系统自带的python冲突,以前的python程序和caffe什么的,就没法跑啦。

2,下载TensorFlow

先下载安装包,下载路径为:https://storage.googleapis.com/tensorflow/linux/gpu/tensorflow_gpu-1.2.1-cp36-cp36m-linux_x86_64.whl
下载之后,将whl文件重命名为tensorflow_gpu-1.2.1-py3-none-linux_x86_64.whl,否则会出现:
tensorflow_gpu-1.0.1-cp36-cp36m-linux_x86_64.whl is not a supported wheel on this platform.

3,安装TensorFlow

网上许多教程,要conda create, source avivate什么的,就三字:“莫须有”。因为对绝大部分人,根本不需要一个anaconda分成多种用途吧?所以咱们直接在anaconda自己的root下进行安装就好了,这样所有的package都能用:#切记,不要用sudo pip,也不要用pip3,然后--ignore-installed --upgrade等参数也不能省略,否则会出错。

~/anaconda3/bin$ ./pip install --ignore-installed --upgrade ~/Downloads/tensorflow_gpu-1.2.1-py3-none-linux_x86_64.whl 

2. 安装tensorflow
./conda install -c anaconda tensorflow-gpu

pip install --ignore-installed --upgrade tfBinaryURL (
 URL of the TensorFlow Python package

3. 重启 

4,测试

记住一定要先进到~/anaconda3/bin下,这就是你的python3.6小环境,独立于系统的python2.7大环境。可以打开./python  也可以 ./spyder,所有的包都在。

$ ./python    或者     $ ./spyder

import tensorflow as tf hello = tf.constant('Hello, TensorFlow!') sess = tf.Session() print(sess.run(hello))


5. OpenCV3
./pip install opencv-python
或者 Anaconda已为python3.6预编译了OpenCV3,直接安装就好了。
./conda install -c menpo opencv3


c++11 python 对比

https://segmentfault.com/a/1190000002499989

3d 重构suan

essential matrix 本质矩阵
https://www.youtube.com/watch?v=Opy8xMGCDrE&list=PL4B3F8D4A5CAD8DA3&index=48


ubuntu 增加删除虚拟内存

交换文件

As an alternative to creating an entire partition, a swap file offers the ability to vary its size on-the-fly, and is more easily removed altogether. This may be especially desirable if disk space is at a premium (e.g. a modestly-sized SSD).
注意: BTRFS 文件系统暂时不支持交换文件。

建立交换文件

As root use fallocate to create a swap file the size of your choosing (M = Megabytes, G = Gigabytes) (dd can also be used but will take longer). For example, creating a 512 MB swap file:
# fallocate -l 512M /swapfile
或
# dd if=/dev/zero of=/swapfile bs=1M count=512
Set the right permissions (a world-readable swap file is a huge local vulnerability)
# chmod 600 /swapfile
After creating the correctly-sized file, format it to swap:
# mkswap /swapfile
Activate the swapfile:
# swapon /swapfile
Edit /etc/fstab and add an entry for the swap file:
/swapfile none swap defaults 0 0

删除交换文件

To remove a swap file, the current swap file must be turned off.
As root:
# swapoff -a
Remove swapfile:
# rm -rf /swapfile

Checks current swap space by running free command (It must be around 10GB.).

Checks the swap partition
sudo fdisk -l /dev/hda8 none swap sw 0 0 Make swap space and enable it.
sudo swapoff -a
sudo /sbin/mkswap /dev/hda8 sudo swapon -a

If your swap disk size is not enough you would like to create swap file and use it. Create swap file.
sudo fallocate -l 10g /mnt/10GB.swap
sudo chmod 600 /mnt/10GB.swap

Mount swap file. sudo mkswap /mnt/10GB.swap
Enable swap file. sudo swapon /mnt/10GB.swap