- 博客(31)
- 收藏
- 关注
原创 IEEE英文论文章节标题中同样是大写字母,同样是10号,看起来大小却不一样,怎么设置
首先设置标题字体效果为“小型大写字母”,注意字体为“MS MIincho”,然后首字母用键盘的大写字母打,非首字母用键盘的小写字母打,出来就是这样的效果。...
2019-06-19 14:49:51
8261
5
原创 python,在路径中引用变量的方法
fr = open('E:\\pyCharm\\LogisticRegression\\1\\'+变量+'.txt')
2019-06-04 11:02:09
15177
6
转载 RuntimeWarning: overflow encountered in exp
将def sigmoid(inX): from numpy import exp return 1.0/(1+exp(-inX))改为def sigmoid(inX): from numpy import exp #return 1.0/(1+exp(-inX)) #优化 if inX>=0: return 1.0/(...
2019-05-08 19:21:17
7774
3
原创 ValueError: could not convert string to float:
将读入的txt文件中的矩阵由-0.017612,14.053064,-1.395634,4.662541, -0.752157,6.538620,-1.322371,7.152853,形式改为-0.017612 14.053064-1.395634 4.662541 -0.752157 6.538620-1.322371 7.152853...
2019-05-08 10:49:47
2642
1
原创 AttributeError: 'list' object has no attribute 'shape'
将 n1=dataMat1.shape[0]换成 n1=len(dataMat1)
2019-05-07 20:16:14
4013
1
转载 AttributeError: 'numpy.ndarray' object has no attribute 'getA'
解决方法:直接删除.getA()
2019-05-07 14:32:34
5298
2
转载 TypeError: 'numpy.float64' object cannot be in
weights=weights+alpha*error*dataMatrix[randIndex] 改为for k in range(n): weights[k] += alpha*error*dataMatrix[randIndex][k]
2019-05-07 14:29:39
507
转载 TypeError: 'range' object doesn't support item deletion
del(dataIndex[randIndex])python3.x , 出现错误 'range' object doesn't support item deletion原因:python3.x range返回的是range对象,不返回数组对象解决方法:把dataIndex=range(m)改为dataIndex=list(range(m))...
2019-05-07 14:27:18
785
转载 机器学习、神经网络、深度学习的关系
在人工智能领域,机器学习属于其中的一种方法,而神经网络是机器学习里的一种算法。神经网络一般有输入层->隐藏层->输出层,一般来说隐藏层大于2的神经网络就叫做深度神经网络,深度学习就是采用像深度神经网络这种深层架构的一种机器学习方法。...
2019-02-28 17:23:07
2584
转载 三维点云配准是什么意思
对同一个物体进行多次扫描后,会有多个点云数据,然后将两个数据中同一点的点云进行匹配,也就是将两幅点云中相同点的点云放在一起即点云配准
2019-02-27 17:01:23
4208
原创 if(dot[k]>1){输出dot[k]的值;}输出的结果却是dot[k]=1
double dot[k];if(dot[k]>1) {cout<<“dot[k]=”<<dot[k]<<endl;}输出的结果却是dot[k]=1是因为之前有一大堆计算得出dot[k],而我设置的dot[k]是double类型16位的,所以就算它输出的是1,其实可能是1.000000000000001,而输出只显示小数点后6位,所...
2019-01-21 16:45:34
170
转载 error C2589: “(”: “::”右边的非法标记 error C2059: 语法错误 : “::
错误代码举例:size.Width = std::max(size.Width, elementSize.Width);错误原因: 函数模板max与Visual C++中的全局的宏max冲突。解决方法: 第一种办法:设置项目属性,在预定义处理器中添加定义NOMINMAX来禁止使用Vsual C++的min/max宏定义。 ...
2019-01-09 15:33:56
582
转载 使用Opencv2出现logger.h(66): error C4996:fopen
今天使用vs2013配置opencv编译出现问题:1>f:\softs\opencv245\opencv\build\include\opencv2\flann\logger.h(66): error C4996: ‘fopen': This function or variable may be unsafe. Consider using fopen_s instead. To di...
2019-01-09 15:28:07
215
原创 vs2013+opencv2.4.9 Debuge x64模式换Release x64模式
1:vs菜单栏—生成—配置管理器—活动解决方案配置 由Debuge换成Release,项目上下文中的配置也由Debuge换成Release,同时检查vs项目中右键“属性”下配置换过来没2:在vs项目中右键“属性”—“配置属性”—“链接器”—“输入”—“附加依赖项”—将Debuge模式下所有249d.lib项改成249.lib项3:在vs项目中右键“属性”—“配置属性”—“VC++目录”—...
2019-01-09 14:53:46
634
原创 img.jpg open error!
原:Mat img = imread("E:\\testpictures\\0\\5(55).jpg");改:Mat img1= imread("E:\\testpictures\\0\\5\\55.jpg"); \\读入图像时括号会出错
2019-01-08 20:04:00
471
原创 sift(c++)自写程序读入两张图像提特征,第二张提到的极值点、关键点、稳定点和第一张都一模一样
我之前把extern vector<Mat> gauss_pyr; //声明全局变量gauss_pyr extern vector<Mat> dog_pyr; //声明全局变量dog_pyrextern struct K...
2018-12-28 15:49:56
202
原创 使用vector出现的错误 subscript out of range(给vector<struct>赋值)
#include <iostream> #include <fstream> #include "opencv2/highgui/highgui.hpp" #include "opencv2/stitching/stitcher.hpp" #include "opencv2/opencv.hpp"using namespace std;using nam...
2018-12-25 19:03:25
1405
原创 c++函数调用过程中,形参的值发生了改变,实参的值却没变
出错代码:int desideK(int K){K=3;return K;} void main() { int K=0; desideK(K); cout << "K=" << K << endl;}修改一:int desideK(int K){K=3;return K;} void m...
2018-12-25 16:36:43
2463
1
转载 vs2013 error C2589: “(”:“::”右边的非法标记
reason:头文件加入#include <Windows.h>后出现的错误,因为系统函数与pcl中的max函数冲突导致的。solution:设置项目属性,在预定义处理器中添加定义NOMINMAX来禁止使用Vsual C++的min/max宏定义 即:项目属性 ——> C/C++ ——> 预处理器 ——> 预处理器定义 (此处添加预定义编译开关 NOMINMA...
2018-12-25 14:01:36
735
原创 直线连接一幅图像中的两个坐标点,显示并保存
#include <iostream> #include <fstream> #include "opencv2/highgui/highgui.hpp" #include "opencv2/stitching/stitcher.hpp" #include "opencv2/opencv.hpp"using namespace std;using nam...
2018-12-20 17:48:48
781
原创 c++(opencv)拼接两幅尺寸不同的图像
#include <iostream> #include <fstream> #include "opencv2/highgui/highgui.hpp" #include "opencv2/stitching/stitcher.hpp" #include "opencv2/opencv.hpp"using namespace std;using n...
2018-12-20 15:48:57
1948
2
原创 c++一维数组升序排序后返回原索引值
#include<stdio.h>#include<malloc.h>#include <stdlib.h>int *sortIndex(int b[], int n){ int *m; int temp; m = (int*)malloc(sizeof(int)*n); for (int i = 0; i < n;...
2018-12-19 19:11:18
2553
原创 c++一维数组的创建和排序
bool FeatureCmp(Keypoint& f1, Keypoint& f2){ return f1.scale > f2.scale;}int main(){//创建一维数组 size_t m=3; //假定数组长度为mdouble *matched;matched = new double[m]; //动态分配空间//一...
2018-12-19 17:41:26
1060
原创 c++:struct变量中的某一项赋值给一个多维数组的例子
#include <stdlib.h>#include <iostream>#include <fstream>#include <stdio.h>#include <math.h>#include <cv.h>#include <highgui.h>#include<cstdlib&a
2018-12-17 16:48:42
456
转载 c++:多维数组的新建(new)和释放(delete)
一维:int *array1D;//假定数组长度为m//动态分配空间array1D = new int [m];//释放delete [] array1D;二维:int **array2D;//假定数组第一维长度为m, 第二维长度为n//动态分配空间array2D = new int *[m];for( int i=0; i<m; i++ ){ a...
2018-12-17 15:53:25
552
转载 使用vector出现的错误 subscript out of range
两种解决办法,见注释:#include<iostream>#include<string>#include<vector>using namespace std;void main(){ vector<string> a; //a.resize(2); // 1. 加这一行 ...
2018-12-14 15:35:00
5568
原创 (vs+opencv)x64平台debuge配置下imread不到图像问题
1:首先检查图像的路径是否有误,最好使用绝对路径(如:"E:\\testpictures\\12.jpg")2:检查附加依赖项,在 Debug|x64 模式下,只允许链接后缀为d的lib(如:opencv_calib3d249d.lib),在配置链接库时 Release|x64 模式下,只允许链接后缀无d的lib(如:opencv_calib3d249.lib)。...
2018-12-13 15:38:01
291
原创 多个cpp文件间的函数调用
以这个match函数为例(假设match函数定义在match.cpp文件中),主函数main.cpp文件调用它的时候include它的头文件match.h,而match.h中要include能识别match.cpp及match.h文件中所有用到的东西,如:Mat(至少要include cv.h 和using namespace cv),match.cpp就只用include match.h就可...
2018-12-12 16:22:19
2319
原创 c++简单矩阵赋值方法:
int main(){ int i = 8; //i是个变量 Mat C = cv::Mat::zeros(cv::Size(i, 2), CV_8UC1); C.data[0] = 1; C.data[1] = 3; C.data[14] = 6; cout << C << endl; system("pa...
2018-12-12 16:19:14
10123
原创 c++ link error:无法打开xx.lib问题(vs2013+opencv2.4.9)
1:首先检查“附加依赖项”(项目属性—配置属性—链接器—输入—附加依赖项):其中的lib和你所配置的opencv 中(如:E:\opencv2.4.9\opencv\build\x64\vc12\lib)的lib是否一致,此处要注意你的opencv版本与你链接的lib后缀(如:249):的一致性(如:你配置的是opencv2.4.9,则对应opencv_calib3d249d.lib 等)2...
2018-12-12 15:45:24
570
原创 vs2013(+opencv2.4.9)配置平台由x86换x64
1:修改“我的电脑”—右键“属性”—“高级系统设置”—“环境变量”—“用户变量”里的PATH,将原来的x86的路径换为x64的路径,如:E:\opencv2.4.9\opencv\build\x64\vc12\bin2:vs项目中右键“属性”—“配置属性”—“链接器”—“高级”—“目标计算机”内容改为:MachineX64 (/MACHINE:X64)3:以debuge模式为例:平台由wi...
2018-12-12 15:26:23
1134
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人