随笔分类 - c++
摘要:六种默认函数 class Base { public: Base() = default; // 无参构造函数 Base(const Base& obj) = default; // 拷贝构造 Base(Base&& obj) = default; // 移动构造 Base& operator= (
阅读全文
摘要:鱼眼成像模型 等距投影模型 等距投影模型代码 // https://zhuanlan.zhihu.com/p/511284263 // https://github.com/WordZzzz/fisheye_calibration void distortFishEye3dTo2d(Point3d&
阅读全文
摘要:静态类的功能: 一次构造,共享一个内存空间,且在多个其他类调用不用重复构造 头文件 calculateBufferSize.h #ifndef CALCULATE_BUFFER_SIZE #define CALCULATE_BUFFER_SIZE #include <mutex> #include
阅读全文
摘要:共享内存保存读取图片 OpenShare.cpp #include "OpenShare.h" //共享内存1,, C++发 --python 传递位姿与图像存储路径 int key_id = 1111; int shmid; void *pBuffer; //共享内存2, C++发 --pytho
阅读全文
摘要:1.非受限联合体 2.字节对齐 字节对齐原则: 字节对齐的细节和编译器实现相关,但一般而言,满足三个准则: 1) 结构体变量的首地址能够被其最宽基本类型成员的大小所整除; 2) 结构体每个成员相对于结构体首地址的偏移量(offset)都是成员大小的整数倍,如有需要编译器会在成员之间加上填充字节(in
阅读全文
摘要:cudaGraphicsGLRegisterImage | cudaGraphicsMapResources | cudaGraphicsSubResourceGetMappedArray | cudaMemcpy2DToArray | cudaGraphicsUnmapResources Open
阅读全文
摘要:查看openmp版本 echo |cpp -fopenmp -dM |grep -i open #define _OPENMP 201511 日期和版本对应关系 1.cmake 调用库 find_package(OpenMP REQUIRED) if(OPENMP_FOUND) message("O
阅读全文
摘要:配置方法 ~$ qmake -query QT_SYSROOT: QT_INSTALL_PREFIX:/home/***/Qt5.9.8/5.9.8/gcc_64 QT_INSTALL_ARCHDATA:/home/***/Qt5.9.8/5.9.8/gcc_64 QT_INSTALL_DATA:/
阅读全文
摘要:数据库可视化软件 sudo apt-get install sqlitebrowser 打开数据库 sqlitebrowser test.db SQLITE3 STMT 机制操作 sqlite3: sqlite3_step 函数 选中表 #include "sqlite3.h" void FixdC
阅读全文
摘要:int main() { int cam_num = 1; //读取所有图像 vector<string> imgLs; vector<string> imgRs; char imgLName[255] = "/home/Gradute/3dReconstruction/datasets/0602/
阅读全文
摘要:template <typename T1, typename T2> inline double setDoublePrecicious(const T1 &number, const T2 &n){ stringstream str_number; str_number<<std::setpre
阅读全文
摘要:Point cv::circle 官方文档地址 void cv::circle (InputOutputArray img, Point center, int radius, const Scalar & color, int thickness = 1, int lineType = LINE_
阅读全文
摘要:```c++ #include #include #include #include #include // opencv Aruco官方示例 // https://github.com/opencv/opencv_contrib/tree/4.x/modules/aruco/samples usi
阅读全文
摘要:已知图像内参和畸变系数 // undistort // OpenCV camera model. // CamParam: fx, fy, cx, cy, k1, k2, p1, p2 void distort_image(const string & img_path, vector<double
阅读全文
摘要:gedit ~/.bashrc export QTDIR=/home/lhw/Qt5.9.8/5.9.8/gcc_64 export PATH=$QTDIR/bin:$PATH export LD_PLUGINS_PATH=$QTDIR/plugins:$LD_PLUGINS_PATH export
阅读全文
摘要:三点顺序给三个点A,B,C的坐标,判断能否组成一个三角形;若能,判断A,B,C是顺时针给出的还是逆时针给出的? 利用矢量叉积判断是逆时针还是顺时针。三角形两边的矢量分别是:AB=(x2-x1,y2-y1), AC=(x3-x1,y3-y1) 则AB * AC=(x2-x1) * (y3-y1) -
阅读全文
摘要:Qt 设置QTableWidget表格不可被选中、不可编辑 参考 一、设置表格不可被选中 tableWidget->setSelectionMode(QAbstractItemView::NoSelection); 其它枚举值: QAbstractItemView::ExtendedSelectio
阅读全文
摘要:std::vector<std::string> img_file_paths_temp; std::sort(img_file_paths_temp.begin(), img_file_paths_temp.end(), [&](std::string& img1, std::string& im
阅读全文
摘要:鱼眼畸变 python opencv文档 void cv::fisheye::undistortPoints(InputArray distorted, OutputArray undistorted, InputArray K, InputArray D, InputArray R = noArr
阅读全文
浙公网安备 33010602011771号