Skip to content

Instantly share code, notes, and snippets.

View taogashi's full-sized avatar

taogashi

  • Dreame Technology Ltd.
  • Shanghai
View GitHub Profile
@taogashi
taogashi / opencv2+opencv3.md
Last active January 29, 2021 05:31
elegantly maintain both opencv2 and opencv3 in ubuntu

ubuntu14.04上同时安装了opencv2和opencv3。从前大部分的程序都用opencv2,想要尝试 openvc3里面的一个新的功能。想用cmake,尽可能地把版本切换弄得自动化一些。

opencv2.4.8是装ROS的时候附带安装的 其路径是:

/usr/include
/usr/lib/x86_64-linux-gnu

相关的配置文件:

@taogashi
taogashi / backgroud_subtraction.md
Last active April 8, 2022 12:45
PCL pointcloud static background subtraction

OctreePointCloud类型的setInputCloud方法只是赋值,不会做任何reset。

inline void setInputCloud (const PointCloudConstPtr &cloud_arg,
             const IndicesConstPtr &indices_arg = IndicesConstPtr ())
{
	input_ = cloud_arg;
	indices_ = indices_arg;
}

所以,方法addPointsFromInputCloud可以重复调用。

@taogashi
taogashi / How-to-use-cmake-externalproject.md
Created December 29, 2016 12:44
正确地使用ExternalProject_Add添加外部项目到本地cmake项目

官方文档
其中PREFIX决定了所有缺省的路径

TMP_DIR      = <prefix>/tmp
STAMP_DIR    = <prefix>/src/<name>-stamp
DOWNLOAD_DIR = <prefix>/src
SOURCE_DIR   = <prefix>/src/<name>
BINARY_DIR   = <prefix>/src/<name>-build
INSTALL_DIR  = <prefix>
@taogashi
taogashi / zerotier极简指南.md
Last active April 22, 2021 05:44
内网穿透的一种姿势

ubuntu创建网络并加入

  1. https://www.zerotier.com 上注册账号并创建网络,得到形如d9edf5716d92c74f的网络ID
  2. 在ubuntu设备上安装,curl -s https://install.zerotier.com | sudo bash
  3. 加入网络,sudo zerotier-cli join <网络ID>
  4. https://my.zerotier.com 上同意设备加入网络
  5. 在ubuntu设备上验证已加入网络,ifconfig结果显示ztugawpjjg接口上分配到ip地址,或者sudo zerotier-cli listnetworks显示<网络ID>

加入已有网络,只需要后面4步

进阶操作-自建moon加速连接