- 博客(17)
- 资源 (7)
- 收藏
- 关注
原创 opencv学习(2)——图像处理的一些常见操作
window7 64位 vs2013+opencv3.0.0 图像腐蚀:#include<opencv2/highgui/highgui.hpp>#include<opencv2/imgproc/imgproc.hpp>using namespace cv;int main(){ Mat ima = imread("D:\\chengxu\\opencv\\Desert.jpg")
2016-06-30 19:51:34 587
原创 opencv学习(1)——读入并显示一幅图片
window7 64位 +vs2013+opencv3.0.0#include<opencv2/opencv.hpp>using namespace cv;int main(int argc,char*argv[]){ Mat ima=imread("D:\\chengxu\\opencv\\Desert.jpg"); imshow("原图像",ima); waitke
2016-06-30 18:47:33 2422
原创 c++动态联编和静态联编
将一个调用函数者联结上正确的被调用函数,这过程叫做函数联编。c++中的联编分两种,分为静态联编和动态联编。 为加virtual时是静态联编;加入virtual是动态联编。只有在使用指针或者引用时,才能实现在运行时的动态联编。#include<iostream>#include<stdlib.h>using namespace std;class poser{public: vir
2016-06-29 20:21:55 1061
原创 c++虚函数
将派生类的对象赋给基类指针,则可以使用该指针访问基类的数据和函数,但不能访问派生类的数据和函数。#include<iostream>#include<stdlib.h>using namespace std;class father{public: father() :age(45){ cout << "调用father类的构造函数并初始化age为:" << age << endl
2016-06-29 20:19:45 309
原创 c++纯虚函数
当一个基类的虚函数什么也不做时,如virtual double area(){ return 0; },可以创建基类自己的对象; 但是当一个基类的虚函数是纯虚函数时,如virtual double area() = 0;,不能创建基类自己的对象。#include<iostream>#include<stdlib.h>using namespace std;class shape//抽象类 不
2016-06-29 20:17:16 555
原创 c++虚基类
#include<iostream>#include<stdlib.h>using namespace std;class human{public: int func(){ return 1; }};class father :virtual public human//有函数func() func1(){public: int func1(){ return 2
2016-06-29 20:15:59 291
原创 c++多重继承
#include<iostream>#include<stdlib.h>using namespace std;class father{public: //father(){ cout << "创建父亲" << endl; } father(int height); //father(){} virtual ~father(){ cout << "析构父亲
2016-06-29 20:14:11 383
原创 c++多态性
#include<iostream>#include<stdlib.h>using namespace std;void func(int);//函数重载void func(long);float func(float);void func(double);int main(){ int a = 1; long b = 100000; float c = 1.5
2016-06-29 20:11:56 303
原创 c++栈和堆
当声明一个变量时,系统会自动在栈中为变量开辟内存空间,栈是系统自动分配的,速度快,但可存放的空间小。 当我们要存放比较大的数据时,选择用堆,堆是程序员申请的,可用空间比较大。#include<iostream>#include<stdlib.h>using namespace std;class A{public: A(){ cout << "构造函数执行完毕" << endl;
2016-06-27 21:51:21 297
原创 c++函数重载
#include<iostream>#include<stdlib.h>using namespace std;void func(int);//函数重载void func(long);float func(float);void func(double);int main(){ int a = 1; long b = 100000; float c = 1.5
2016-06-27 21:45:16 323
原创 c++继承和派生
通常子类不加修饰的延续父类的特征,我们把它叫做继承;而子类在延续父类特征的基础上又添加自己的新特征,叫做派生。 拥有一个基类的继承是单一继承,拥有多个基类的继承是多重继承。 class+派生类名:+派生类型+基类名 { private: 成员列表 public: 成员函数 } 注:括号内是派生类自己的成员和成员函数。 一个类的私有成
2016-06-27 21:29:13 413
原创 c++复制构造函数(浅拷贝、深拷贝)
#include<iostream>#include<stdlib.h>using namespace std;class A{public: A(){ x = new int; *x = 5; } ~A(){ delete x; x = NULL; } //A(const A&a){ cout << "复制构造函数执行" << endl; x = a.x; }//
2016-06-27 14:43:32 671
原创 python-scipy 图像处理
from PIL import Image from numpy import * from scipy.ndimage import filters读入图像并转化成灰度图像im=array(Image.open(‘lena.jpg’).convert(‘L’))高斯滤波im2=filters.gaussian_filter(im,5) img=Image.fromarray(im) img
2016-06-25 17:36:36 2518
原创 python-PIL 图像基本操作
from PIL import Image 打开并显示一幅图像 im=Image.open(‘lena.jpg’) im.show() 转换成灰度图像 img=im.convert(‘L’) img.show() 创建缩略图 im.thumb
2016-06-25 17:11:10 675
原创 python-numpy、scipy
对于window64 ,python2.7 1.在此链接下下载了numpy-1.11.0+mkl-cp27-cp27m-win_amd64.whl及scipy-0.17.1-cp27-cp27m-win_amd64.whl。(http://www.lfd.uci.edu/~gohlke/pythonlibs/#numpy) 2.根据此链接下的说明文档成功的安装了numpy和scipy。(http
2016-06-25 14:04:19 576
原创 python 调用图像处理类库PIL 时遇到的问题
1.原来安装了python3.4.3并下载了Python Imaging Library 1.1.7 Source Kit (http://www.pythonware.com/products/pil/),无法导入Image module,在python中运行 from PIL import Image 时报错。 解决方法:发现是语法错误,python3.x版本和python2.x版本有很多语法
2016-06-21 22:39:34 1831
AXI4_master_slave源码对应分析
2018-06-08
AXI4_Lite_master源码分析
2018-06-08
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人