自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(32)
  • 资源 (3)
  • 收藏
  • 关注

原创 sizeof ptr

struct LocalParam { LocalParam(size_t s) : size_(s) {} size_t size_;};template <class T>size_t size(const T&) { return sizeof(T);}template <>size_t size(const LocalParam& l) { return l.size_;}template <class T>.

2020-09-23 19:23:11 327

原创 宏定义 do while(false)

#define _STL_VERIFY(cond, mesg) \ do \ { \ if (cond) ...

2020-09-22 09:43:28 421

原创 LU分解 Ax=b, A=LU

LU分解详细算法:https://zhuanlan.zhihu.com/p/84210687示例:https://www.geeksforgeeks.org/l-u-decomposition-system-linear-equations/LU分解的实现可用用SVD分解。问题描述: 解方程Ax=b, A可以分解成 LU,L是下三角矩阵,U是上三角矩阵。LU分解的意义:减少计算量,便于程序化。Ax=LUx=b,令y=Ux,则Ly=b,先求出y,再根据y=Ux求出x.通过高斯消元.

2020-05-18 22:32:59 2999

原创 vcpkg VS2017的全局集成

vcpkg是微软的开源工具包,可以很方便的下载第三方库并集成到Visual Studio环境。步骤1.下载vcpkg git clone https://github.com/microsoft/vcpkg2.编译 运行bootstrap-vcpkg.bat 生成vcpkg.exe3.查看Vcpkg支持的开源库列表 vcpkg.exe search4.安装第三方库 vcpkg.exe install gtest:x64-windows .\vc...

2020-05-10 18:43:12 3031 1

原创 C++17 - The Best Features

youtube: C++17 - The Best Features - Nicolai Josuttis [ACCU 2018]笔记:在头文件中定义静态变量 inline staticclass TrackNew{private: inline static int numMalloc=0;}C++17 compile-TIme iftemplate<ty...

2020-04-18 18:28:26 226

原创 异构计算笔记

异构计算视频:Heterogeneous Programming in C++ today - Michael Wong [ACCU 2018]笔记:异构计算技术OpenCL,CUDA, C++ AMP, OpenMP, OpenACC , SYCL,Directive vs Explicit Parallelism 指示性并行:OpenMP,OpenACC...

2020-04-18 18:09:36 208

原创 变换矩阵推导 v=M1*v1=M1*(T21*v2)=M2*v2=>M2=M1*T21

世界坐标系中的点v在 view1中的坐标为v1,在view2中的坐标为v2,view1变换矩阵为M1(相对于单位坐标系I), view2的变换矩阵M2view2相对view1的变换矩阵T21.v=M1*v1=M2*v2v1=T21*v2v=M1*v1=M1*T21*v2=M2*v2M2=M1*T21理解:view2先做T21变换,点坐标系回到M1,再乘以M1,回到标准坐...

2020-04-18 14:18:57 389

原创 VS2017 C++ filesystem

VS2017 C++ 还没有正式支持filesystem,命名空间是std::experimental::filesystem。一些常用的方法:#include <iostream>#include <filesystem>#include <fstream>#include <string>using namespace std;...

2020-04-11 23:25:53 1567

原创 c++ unique_ptr

#define _CRT_SECURE_NO_WARNINGS#include <iostream>#include <memory>#include <functional>#include <cstdio>using namespace std;class A { public: A(int a, int b) { cou...

2020-04-11 18:42:13 209

原创 C++ 如何正确高效地定义字符串常量

阅读gtest.cc 代码发现 字符串常量都定义成数组的形式,为什么不定义成指针呢?// A test filter that matches everything.static const char kUniversalFilter[] = "*";// The default output file for XML output.static const char kDefaul...

2020-04-10 16:23:35 7111

原创 C++ initializer_list 高性能的stl 局部常量数组。

C++11引入了一个新的类模板initializer_list。它本质就是C 的局部常量数组的封装,避免了使用因为动态数组或vector而产生的在堆上分配、释放内存的额外开销,同时提供begin(),end(),size()的接口可以配合STL的容器和算法,这样可以减少代码量,如:方便地设计出支持变长数组的函数。initializer_list的成员都是const的,语法上不支持修改,减...

2020-03-26 22:39:24 421

原创 优秀资料网站

机器学习,最大熵模型学习https://shuwoom.com/?p=1168

2020-02-29 22:00:42 82

转载 PCL点云滤波去噪

为什么要对点云滤波?一般下面这几种情况需要进行点云滤波处理:(1)  点云数据密度不规则需要平滑(2) 因为遮挡等问题造成离群点需要去除(3) 大量数据需要下采样(4) 噪...

2020-02-29 17:46:46 1740

转载 有序点云

有序点云是什么一帧扫描数据是一副深度图,属于灰度图。像素的灰度值代表的是深度信息,可以通过相机参数把每个像素点变换到世界坐标系,这样每个像素就对应一个三维点,有些点是无效的,一般用(0, 0, 0)来代替。下图是一个典型的深度点云。假设深度图的分辨率是ResX * ResY...

2020-02-29 17:28:05 1141

转载 SIFT算法原理

SIFT算法SIFT即尺度不变特征变换,是用于图像处理领域的一种描述。这种描述具有尺度不变性,可在图像中检测出关键点,是一种局部特征...

2020-02-24 21:58:51 928

转载 三维重建技术综述

     三维重建技术通过深度数据获取、预处理、点云配准与融合、生成表面等过程,把真实场景刻画成符合计算机逻辑表达的数学模型。这种模型可以...

2020-02-24 21:51:15 3123

转载 ICP算法的原理与实现

一、背景与意义  点云数据能够以较小的存储成本获得物体准确的拓扑结构和几何结构,因而获得越来越广泛的关注。在实际的采集过程中,因为被测物体尺寸过大,...

2020-02-24 21:25:29 4478

原创 stl vector push_back解析

查看 Visual Studio 2013的stl vector代码,发现push_back要先判断元素是否本来就在vector里面,再分情况push_back.粗看不解,以为多此一举,其实里面暗藏玄机。所以就搜索一下,发现了这个问题“Is it safe to push_back an element from the same vector?”的讨论,https://stackove...

2020-02-22 13:50:53 396

原创 括号运算符函数,类型转换函数: int operator()() vs operator int ()

#include <iostream>using namespace std;class A {public: A(int v = 0): n(v) {} int operator()(int m) { n = m; return n; } operator int () { return n; } int n;};int ...

2019-12-30 16:45:46 288

原创 用boost filesytem清空(删除)文件夹下所有文件

#include <boost\filesystem\path.hpp>#include <boost\filesystem\operations.hpp>用boost filesytem清空(删除)文件夹下所有文件{ boost::filesystem::path tmpPath(R"(C:\temp\test1)"); boost::file...

2019-12-23 09:16:39 3848

原创 C++全局变量的初始化过程

全局变量在main()前完成初始化(调用构造函数)在调用构造函数前,全局变量已分配空间,内存全0多个全局变量的初始化,按照代码编译的顺序注意:全局变量被访问前可能它还没有调用构造函数初始化。如果一个项目中,多个dll都用到一个全局变量在共同的lib中,则每个dll都有一个独立的全局变量(地址不同),每个全局变量会初始化。如下代码,A里面访问了全局变量g_b, 改变全局变量g_a...

2019-09-29 09:51:53 2125

转载 RANSAC算法学习(数学原理)

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 ...

2019-09-16 10:17:07 479 1

转载 Ransac算法学习python版

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 ...

2019-09-07 16:51:25 902

转载 RANSAC算法学习

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 ...

2019-09-07 12:56:52 159

转载 CSDN如何转载别人的文章

版权声明:本文为博主原创文章,遵循 CC 4.0 BY-SA 版权协议,转载请附上原文出处链接和本声明。 ...

2019-09-07 12:46:23 49

转载 点云配准各种方法总结

点云配准各种方法总结https://blog.csdn.net/Ha_ku/article/details/79755623

2019-09-07 12:06:08 1340

原创 STL解读-rebind的目的就是再定义一个struct (allocator), 这个allocator能分配 _Other类型的元素。

STL源文件:文件:c:\Program Files (x86)\Microsoft Visual Studio 9.0\VC\include\xmemory行:103-107templatestruct rebind{ // convert an allocator to an allocator typedef allocator other;};

2014-12-01 21:42:19 1403

原创 VS2008 x64 64位编程 环境配置

1.把X64编译器和工具装上。(默认不安装)2.配置管理器选择X64平台3.写一段测试代码#include int main(){int n=sizeof(void*);printf("sizeof(void*)=%d\n",n);}x64下sizeof(void*)=84.debug模式问题解决。x64 Release模式正常,de

2013-10-09 22:32:21 2104

原创 BSTR _bstr_t char* 之间的相互转换

void test2(){ //char * _bstr_t char *s1="123"; _bstr_t bt1=s1; bt1+=" _bstr_t"; char *p=(char*)bt1; printf("%s\n",p); //char * BSTR BSTR b1=(BSTR)p; //BSTR本质 char*或w_char* char *p2=(cha

2013-02-07 23:29:12 2414

原创 VB创建ActiveX dll 的COM服务器,VC调用VB COM方法

1.用VB创建ActiveX类型的工程,重命名工程 和 模块名为 VBPrj、MATHMATH.cls代码Public Sub SayHello() MsgBox "Hello", vbOKOnly, "VB ActiveX"End SubPublic Function Info() As String Info = "info from VB COM"End Fu

2013-02-07 23:28:42 1003

原创 C++ 变参va_list 示例

#include #include #include using namespace std;std::string  varFormatString( const char* fmt, ... ){ const int SIZE=500; char strLog[SIZE+1]; strLog[SIZE] = NULL; va_list list;

2013-02-06 16:12:31 770

原创 VC6.0 利用ADO连接Sqlserver2005数据库方法

VC6.0 利用ADO连接Sqlserver2005数据库方法创建一个基于对话框的工程。1.在stdafx.h中添加ADO的引用//步骤1 添加ado dll的引用#import "C:\Program Files\Common Files\System\ado\msado15.dll" no_namespace rename("EOF","rsEOF")//步骤2

2012-12-04 22:06:27 1945 2

VC 利用ADO连接Sqlserver2005数据库示例

简单介绍VC使用ADO连接Sqlserver2005数据库的方法。参考VC++深入详解.pdf里面的示例(教程上的数据库对sqlserver2005不适用)。

2012-12-04

顶嵌杯-初赛-代码 “顶嵌杯”全国嵌入式系统C语言编程大赛

顶嵌杯”全国嵌入式系统C语言编程大赛 Problem A 位操作.c , Problem B 破译密码.c , Problem C 小孩报数问题.c , Problem D 时间日期格式转换.C , Problem E 字母旋转游戏.c http://www.top-e.org/page/cslc/ http://acm.pku.edu.cn/JudgeOnline/showcontest?contest_id=1345

2010-01-10

Inside C++ Object Model

深入了解c++机制 Inside the C++ Object Model focuses on the underlying mechanisms that support object-oriented programming within C++: constructor semantics, temporary generation, support for encapsulation, inheritance, and "the virtuals"-virtual functions and virtual inheritance. This book shows how your understanding the underlying implementation models can help you code more efficiently and with greater confidence. Lippman dispells the misinformation and myths about the overhead and complexity associated with C++, while pointing out areas in which costs and trade offs, sometimes hidden, do exist. He then explains how the various implementation models arose, points out areas in which they are likely to evolve, and why they are what they are. He covers the semantic implications of the C++ object model and how that model affects your programs. Highlights Explores the program behavior implicit in the C++ Object Model's support of object-oriented programming. Explains the basic implementation of the object-oriented features and the trade offs implicit in those features. Examines the impact on performance in terms of program transformation. Provides abundant program examples, diagrams, and performance measurements to relate object-oriented concepts to the underlying object model. If you are a C++ programmer who desires a fuller understanding of what is going on "under the hood," then Inside the C++ Object Model is for you!

2008-09-28

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除