自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(48)
  • 资源 (5)
  • 收藏
  • 关注

原创 std::vector<>的{}用法与stl中的共享指针

vector的{}用法,适用于shared_ptr中,不适用于make_shared中。

2024-06-24 09:02:59 163

原创 pcl::PointXYZRGBA造成点云无法显示

pcl::PointXYZRGBA,如果没有rgba信息,显示出来的点云是黑色。

2024-06-23 20:49:35 306

原创 使用正则表达式分割提取出数字串和非数字串

【代码】使用正则表达式分割提取出数字串和非数字串。

2023-06-18 19:20:40 624

原创 Unity3D方向键控制人物移动的代码

Unity3D方向键控制人物移动时,出现人物斜着走的问题。

2022-06-21 18:44:28 5236 1

原创 cmake脚本中的list

代码cmake_minimum_required(VERSION 2.8)set(mylist a)list(APPEND mylist b c)MESSAGE("${mylist}")MESSAGE(${mylist})foreach(component ${mylist}) MESSAGE(${component})endforeach(component)结果a;b;cabcabc结论list是用;隔开的字符串组,也可以以空格隔开,显示整个list时加上“”号会显示分

2021-08-06 15:24:22 614

原创 find_eigen代码分析

原版(在PCLConfig.cmake中)#remove this as soon as eigen is shipped with FindEigen.cmakemacro(find_eigen) if(PCL_ALL_IN_ONE_INSTALLER) set(EIGEN_ROOT "${PCL_ROOT}/3rdParty/Eigen") elseif(NOT EIGEN_ROOT) get_filename_component(EIGEN_ROOT "C:/Program

2021-08-05 16:07:58 383

原创 关于pcl::ISSKeypoint3D<PointInT, PointOutT>使用中的错误LNK2001

LNK2001 无法解析的外部符号 “private: virtual bool __cdecl pcl::IntegralImageNormalEstimation<struct pcl::PointNormal,struct pcl::Normal>::initCompute(void)” (?initCompute@?$IntegralImageNormalEstimation@UPointNormal@pcl@@UNormal@2@@pcl@@EEAA_NXZ)虽然相关函数放在.hpp

2021-06-02 18:29:47 403

原创 JavaScript网页绘图(一)

/**通过 rect() 方法来创建三个矩形**/var c=document.createElement("canvas");document.body.appendChild(c);var ctx=c.getContext("2d");// 红色矩形ctx.beginPath();ctx.lineWidth="6";ctx.strokeStyle="red";ctx.rect(5,5,140,140); ctx.stroke();// 绿色矩形ctx.beginPath(

2021-06-01 10:09:33 452

原创 ISS得到的关键点和源点云不重合

问题描述如图,pcl中ISS算法得到的关键点(红色)和源点云(绿色)不重合

2021-05-26 15:59:28 322

原创 pcl中iss关键点代码分析1

先上代码 Eigen::Matrix3d cov_m = Eigen::Matrix3d::Zero (); getScatterMatrix (static_cast<int> (index), cov_m); Eigen::SelfAdjointEigenSolver<Eigen::Matrix3d> solver (cov_m);pcl::ISSKeypoint3D<PointInT, PointOutT, NormalT>

2021-05-24 20:04:49 498 1

原创 error: ‘Vector‘ is not a member of ‘Eigen‘

错误提示error: ‘Vector’ is not a member of ‘Eigen’解决方法在matrix.h 中加上Vector的定义template <typename Type, int Size>using Vector = Matrix<Type, Size, 1>;这样有可能会出现后续错误。换一个版本Eigen3库,最好是在github库中third_party文件夹中指定的版本。...

2021-05-05 18:58:22 1458

原创 关于cmake中CMP0074变量设置以及<PackageName>_ROOT

使用cmake时出现CMP0074警告。CMake Warning (dev) at CMakeLists.txt:5 (find_package): Policy CMP0074 is not set: find_package uses <PackageName>_ROOT variables. Run "cmake --help-policy CMP0074" for policy details. Use the cmake_policy command to set t

2021-05-05 18:36:59 6779 8

原创 reinterpret_cast和static_cast的区别

class A { public: long m_a;}; class B { public: long m_b;}; class C : public A, public B {};int main() { C c; printf("%p, %p, %p", &c, reinterpret_cast<B*>(&c), static_cast <B*>(&c)); }前两个的输出值是相

2021-05-02 08:11:49 213

原创 Texmaker中使用.bib文件生成参考文献

参考https://blog.csdn.net/JSJWR/article/details/79373900以 PDFLaTeX运行.tex文件,生成.aux文件;以 BibTeX运行.tex文件,此处需要上一步生成的.aux文件,生成.bbl文件;再次以 PDFLaTeX运行.tex文件,生成.pdf文件;...

2021-03-14 20:05:28 1405

原创 numpy.newaxis的用法

对比不使用newaxis#import numpy as npa = np.array([1, 2, 3, 4, 5])a[0]结果1对单个元素使用newaxis#import numpy as npa = np.array([1, 2, 3, 4, 5])a[0, np.newaxis]结果array([1])对所有元素使用newaxis#import numpy as npa = np.array([1, 2, 3, 4, 5])a[:, np.newaxis]

2021-02-26 11:15:14 122

原创 探究Python中NumPy数组索引的规律

从第一个数组和第二个数组分别取出对应的数作为索引的第一维和第二维,这个有点复杂,但很有用,特别是在深度学习中。b中每个元素对应a中一行,如果需要对应a单个元素,需要b的元素本身二维列表、数组或者元组。相当于在上一种情况中把b变成了三个数组,所以一共得到了三个矩阵。b=([1,1,0], [0,0,0]),情况如何?等同于使用两个数组(不是一个矩阵),相当于。这里b可以换成列表或元组,a不能换。

2021-02-26 10:56:55 4832 2

原创 Python提示TypeError: only size-1 arrays can be converted to Python scalars

我在调用 math.isnan()的时候,碰到这个提示,改成numpy.isnan()就好了,用于scalar类型的计算不能用于 ndarray。

2021-02-24 16:29:52 1605

原创 在pybind11中python调用c++程序出现RuntimeWarning: invalid value encountered in

RuntimeWarning: invalid value encountered in less这个警告出现在python中可能是出现了NAN值,在在pybind11中python调用c++程序时出现了0除之类的现象。正常c++程序中出现0除现象,会出现0除中断提示,但在pybind11中python调用c++程序时不会有提示,可能会提示RuntimeWarning: invalid value encountered in less。...

2021-02-24 16:25:28 1299

原创 关于stl vector的emplace_back函数参数

元素为内置对象,直接定义元素值int main(int argc, char* argv[]){ vector<int> ps; ps.emplace_back(1); ps.emplace_back(2);}元素为自定义对象,可以先定义对象压入struct P{ P(int x,int y,int z){a[0]=x;a[1]=y;a[2]=z;}; vector<int> a=vector<int>(3);};i

2021-02-11 17:18:24 2346

原创 vscode运行,提示undefined reference to main

vscode中使用c++runner插件运行 g++ demo.cundefined reference to maindemo.c中没有main()函数demo.c没有保存使用vscode作为IDE,c++runner插件没有勾选运行前保存全部文件

2021-01-26 21:20:28 1510

原创 git add .后还提示Changes not staged for commit

git add .后还提示Changes not staged for commit,原因很可能是当前文件夹处在另一个仓库的子目录下,检查一下。

2021-01-16 19:33:34 655

原创 PCLConfig.cmake的关键代码解读(部分)

file(TO_CMAKE_PATH "${PCL_DIR}" PCL_DIR)if(WIN32 AND NOT MINGW)# PCLConfig.cmake is installed to PCL_ROOT/cmake# 如果在WIN32系统中 PCLConfig.cmake 在 PCL_ROOT/cmake 目录下 get_filename_component(PCL_ROOT "${PCL_DIR}" PATH)else(WIN32 AND NOT MINGW)# PCLConfig.

2021-01-15 19:07:20 1297

原创 PCL项目构建时提示Could not find a package configuration file

提示Could not find a package configuration file…Add the installation prefix of “PCL” to CMAKE_PREFIX_PATH or set “PCL_DIR” to a directory containing one of the above files分析出现这个提示,原因一般是库没有安装在默认位置,所以要指定cmake文件的正确位置解决cmake … -DCMAKE_PREFIX_PATH= cmake文件

2021-01-15 16:56:53 1131

原创 不使用new调用构造函数

代码#include <vector>#include <array>using namespace std;struct Point{ double x,y,z; Point(){ cout << "no param" << endl; } Point(double x_, double y_,double z_){ x=x_;y=y_;z=z_; cout <&l

2021-01-11 17:12:05 642 2

原创 g++ -std=c++11 类成员变量的默认值和初始化顺序的实验

代码使用 g++ -std=c++11编译以下程序#include<vector>#include<iostream>using namespace std;class MyHashSet { int a = 32; vector<unsigned> buckets; vector<unsigned> masks;public: MyHashSet():buckets(8, false), masks(a){co

2021-01-10 16:27:44 1742 2

原创 c++ STL中vector扩展底层机制的实验

代码#include<vector>int main() { for(int i=0; i<100000; i++){ vector<int> a(100);// cout << a.size()<<endl;// cout << a.capacity()<<endl; a.push_back(18);// cout << a.

2021-01-10 09:15:41 145

原创 cannot create std::vector larger than max_size()

class MyHashSet { vector<unsigned> buckets; vector<unsigned> masks; int a = 32;public: MyHashSet():buckets(8, false), masks(a){} };void main(){ MyHashSet* obj = new MyHashSet();}编译通过,运行时提示错误:cannot create std::vector

2021-01-09 20:31:02 5356

原创 C++ 类中类的初始化如何调用构造函数?

如果class B中有类型为class A的成员变量,class A的初始化如何调用构造函数?

2021-01-09 10:53:02 1739

原创 ubuntu下执行程序提示Permission denied

鼠标右击检查程序文件属性,发现Permission选项卡下面的allow executing files as program复选框没有被勾选。激活该复选框以后,可以正常执行该程序文件了。

2020-12-28 06:38:05 1047

原创 There are no operators in the program to be executed 可能的原因

使用paddle框架import paddle.fluid as fluidimport numpy as np# Creates a variable with fixed size [3, 2, 1]# User can only feed data of the same shape to xx = fluid.data(name='x', shape=[3, 2, 1], dtype='float32')# Creates a variable with changable batc

2020-07-14 10:57:12 2098 4

原创 csdn博客中使用纯markdown语句指定插入图片尺寸与图片特效

上传一幅图:图片下面的链接:在链接最后面括号之前加上 =100x100,注意=之前有空格,如下图:效果如图:

2020-01-20 11:32:18 224

原创 fsurf画图

rf3 = @(x,y)reshape(([x(:).^2/10+y(:).^2/10]),size(y));fsurf(rf3,[-30 30],'ShowContours','on')

2020-01-11 18:02:29 1937

原创 heaviside()

定义单位阶跃函数,又称赫维赛德阶跃( Heaviside step function ) 函数,连续时间形式定义如下:它和符号函数的关系:它是个不连续函数,其“微分”是狄拉克 δ 函数。事实上,x=0 的值在函数应用上并不重要,可以任意取。matlab中的函数在Matlab中使用heaviside()生成此函数。syms xfplot(heaviside(x), [-2, 2])...

2020-01-11 16:22:15 32169

原创 ubuntu下使用vsc的gitGUI进行pull和push提示sign_and_send_pubkey: signing failed: agent refused operation

ubuntu下使用vsc的git GUI进行pull和push提示sign_and_send_pubkey: signing failed: agent refused operation,但是,在vsc的terminal下运行pull和push正常。解决办法:从Ubuntu的terminal下启动vsc,使用vsc的git GUI就一切正常了。...

2020-01-08 23:08:23 219

原创 报错sign_and_send_pubkey: signing failed: agent refused operation

sign_and_send_pubkey: signing failed: agent refused operationPermission denied (publickey).执行以下命令就可以了。eval "$(ssh-agent -s)"ssh-add

2020-01-08 02:56:49 311

原创 git pull操作的时候提示fatal: Could not read from remote repository.的解决方法

fatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.有时加上 -f 可以解决问题,不行再来一次,原因暂时不太理解。...

2019-12-30 19:04:30 617

原创 git pull时出现了 ! [rejected] master -> master (non-fast-forward)

有人是在push时出现 ! [rejected] ,我在pull时也碰到了,尝试pull --rebase也没有解决。解决方案:换一个没有.git信息的目录。

2019-12-30 17:32:37 3509

原创 error: failed to push some refs to 'git@github.com:

git push的时候出现如下提示:error: failed to push some refs to 'git@github.com:解读后面的提示。hint: Updates were rejected because the remote contains work that you dohint: not have locally. This is usually caused...

2019-12-28 22:26:08 137

原创 关于提示:You asked to pull from the remote 'xxx', but did not specify a branch.

借实验楼的github用一下!$git remote add xxx git@github.com:shiyanlou-001/shiyanlou-001.git$git pull xxx提示如下:You asked to pull from the remote 'xxx', but did not specifya branch. Because this is not the d...

2019-12-28 21:04:47 14042 2

原创 fork与pull的区别

fork是在GitHub仓库网站进行的操作,复制某人Github仓库内容到自己在GitHub上的仓库中,带有提交历史。另外将自己的修改(pull request)发给作者,由作者决定是否接受。这个修改可以由自己fork的Github仓库pull到本地电脑上来完成。pull是由Github仓库网站复制到本地电脑,带有提交历史。修改后不能向原作者出pull request。

2019-12-28 19:53:31 926

PCL项目属性表.zip

在属性管理器中导入,debug结尾导入到debug中,release结尾的导入到release中

2021-10-15

matlab_codes.zip

蝗虫算法( Grasshopper Optimization Algorithm,GOA ) 是一种元启发式仿生优化算法,具有较高的搜索效率和较快的收敛速度,且算法本身特殊的自适应机制能够很好地平衡全局和局部搜索过程,具有较好的寻优精度。

2021-07-08

PLC仿真软件

plcsim1.0.1.rar PLC仿真软件,老了点,但很不错

2012-05-05

The Essential Guide to 3D in Flash.pdf+ 源代码

away3d是一种常用的flash3d引擎,用于开发flash3d程序,这里是away3d3.6官方教材, 有源代码 2010出版的.

2012-01-19

空空如也

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

TA关注的人

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