extern

自己的Qt GUI 项目+vs2013+opencv+caffe环境配置

冷暖自知 提交于 2020-01-04 16:39:57
  由于深度学习的种种优势,使我们对于深度学习的使用越来越频繁。很多时候,我们都需要在自己的项目中配置caffe环境,来调用caffe网络模型完成自己的任务。今天我主要讲的关于"在自己的项目中配置caffe环境所遇到问题的相关说明和解答",因为项目的需要,需要在项目中配置caffe来完成VGG网络的分类任务。大概花费了一周的时间,总算成功了。期间,也是辗转反侧,遇到了诸多问题,查阅了诸多资料,但是有些问题并没有讲的非常清楚。这里,我就这些遇到的问题,根据自己的情况以及解决的办法跟大家分享一下。    首先 ,需要准备好安装环境: (1) 已编译 好的caffe https://github.com/Microsoft/caffe,必须是已经编译好的caffe工程,因为我们需要用到caffe第三方库,以及编译生成的libcaffe.lib (2)vs2013 因为caffe需要vs2013的编译器,所以最好是vs2013 (3)GPU环境的还要安装CUDA,Cudnn。可以去官网根据自己的电脑配置下载安装 (4)如果需要做UI的话,也可以在vs中配置相关界面工具,比如QT    然后 ,环境已经准备好了,接下来就是新建vs工程了,这里可以根据自己的情况新建自己的项目,比如win32控制台程序等。由于,我选择用QT来做c++应用的界面,所有我新建的是QT GUI Application

caffe项目工程化封装FRCNN

≡放荡痞女 提交于 2020-01-04 16:39:40
各种坑!!想要做好,一定要自己一步步试,下载别人的总会出现各种问题. 步骤如下:(可以把这些文件打包在一个文件加下,分两个文件libs,include,一定要是自己的文件) 1 首先是配置caffe的VC++目录中的include和库文件。配置include lib dll都是坑,而且还分debug和release两个版本。添加输入项目需要注意,而且需要把编译好的caffe.lib等等一系列东西拷贝到当前项目下。也就是caffe bulid文件夹下面的东西,包括caffe.lib 、libcaffe.lib、还有很多dll. 这个是debug_include配置图 这个是debug_lib配置图 这个是release_include配置图 这个是release_lib配置图 同时也需要在,项目属性页的链接器输入中,填写相应的lib,其中debug和release是不同的。以下是需要填写的相应lib //debug opencv_calib3d2413d.lib opencv_contrib2413d.lib opencv_core2413d.lib opencv_features2d2413d.lib opencv_flann2413d.lib opencv_gpu2413d.lib opencv_highgui2413d.lib opencv_imgproc2413d.lib

C语言指针与数组

亡梦爱人 提交于 2020-01-04 05:49:02
C语言指针与数组 数组的下标应该从0还是1开始? 我提议的妥协方案是0.5,可惜他们未予认真考虑便一口回绝 -- Stan Kelly-Bootle 1. 数组并非指针 为什么很多人会认为指针和数组始终应该可以互换的呢? 因为对数组的引用总是可以写成对指针的引用,而且确实存在一种指针和数组的定义完全相同的上下文环境, 不幸的是,这只是数组的一种极为普通的用法,并非所用情况下都是如此。 2. 什么是声明,什么是定义 C语言中对象必须有且只有一个定义,但它可以有多个extern声明. 定义:只能出现在一个地方, 确定对象的类型并分配内存 ,用于创建新的对象,例如 int a[100] 声明:可以多次出现,描述对象的类型,用于指代其他地方定义的对象(例如在其他文件里) 例如 extern int a[100] extern对象声明告诉编译器对象的类型和名字,对象的内存分配则在别处进行 3. 数组与指针的区别 出现在赋值左边的符号被称为 左值, 出现在赋值右边的符号被称为 右值。 编译器为每个变量分配一个地址(左值),这个地址在编译时可知,并且该变量在运行时一直保存于这个地址中。 存储于变量中的值(右值)只有在运行时才可知,如果需要用到变量中存储的值,编译器就发出指令从指定地址读入变量并将它存于寄存器中。 例如: char a[9] = "abcdefgh"; c = a[i]

stc12c5a60s DHT11温湿度传感器

∥☆過路亽.° 提交于 2020-01-04 03:25:16
DHT11温湿度传感器 DHT11.h #ifndef __DHT11_H__ #define __DHT11_H__ #ifndef uchar #define uchar unsigned char #endif #ifndef uint #define uint unsigned int #endif #include < reg52 . h > #include < intrins . h > //IO口定义 sbit OUT = P2 ^ 7 ; //函数声明 void RH ( uchar * s ) ; void Delay ( uint x ) ; //声明外部函数 extern void Uart_send_str ( char * str , int len ) ; extern void Uart1Init ( ) ; //extern void Uart_send(char str); #endif DHT11.c /******************************************************************/ /* 平台:Keil U4 + DHT11温湿度模块 */ /* 名称:通过串口显示温湿度 */ /* 编写:WCT */ /* 日期:2019年1月22日16:57:18 */ /* QQ:

External linkage of const in C

最后都变了- 提交于 2020-01-03 05:13:17
问题 I was playing with extern keyword in C when I encountered this strange behaviour. I have two files: file1.c #include<stdio.h> int main() { extern int a; a=10; printf("%d",a); return 0; } file2.c const int a=100; When I compile these files together, there is no error or warning and when I run them, output comes to be 10 . I had expected that the compiler should report an error on line a=10; . Moreover, if I change the contents of file2.c to const int a; that is, if I remove the initialization

Behaviour of extern in C

落花浮王杯 提交于 2020-01-03 02:27:33
问题 If I declare int Array[10]; in file1.c In file2.c if I I have a function like this extern int *Array; fun() { Array[0]=10; } Is there any problem with this or not? 回答1: Yes there is a problem. You are declaring a Array to be a pointer , while instead it's an array . The two are very distinct objects and here you're basically providing false information to the compiler. Note that the C syntax to access an element is Array[0] in both cases, but if Array is a pointer variable the machine code

Are static class variables the same as extern variables, only with class scope?

不问归期 提交于 2020-01-01 10:12:54
问题 It seems to me that a static class variable is identical to an extern variable, because you only declare it in the static int x / extern int x statement, and actually define it elsewhere (usually in a .cpp file) static class variable // .h file class Foo { static int x ; } ; // .cpp file int MyClass::x = 0 ; Extern variables: // .h file extern int y; // .cpp file int y = 1; In both cases the variable is declared once somewhere, and defined in a file that will not be included more than once in

Are static class variables the same as extern variables, only with class scope?

戏子无情 提交于 2020-01-01 10:12:36
问题 It seems to me that a static class variable is identical to an extern variable, because you only declare it in the static int x / extern int x statement, and actually define it elsewhere (usually in a .cpp file) static class variable // .h file class Foo { static int x ; } ; // .cpp file int MyClass::x = 0 ; Extern variables: // .h file extern int y; // .cpp file int y = 1; In both cases the variable is declared once somewhere, and defined in a file that will not be included more than once in

Are static class variables the same as extern variables, only with class scope?

血红的双手。 提交于 2020-01-01 10:12:06
问题 It seems to me that a static class variable is identical to an extern variable, because you only declare it in the static int x / extern int x statement, and actually define it elsewhere (usually in a .cpp file) static class variable // .h file class Foo { static int x ; } ; // .cpp file int MyClass::x = 0 ; Extern variables: // .h file extern int y; // .cpp file int y = 1; In both cases the variable is declared once somewhere, and defined in a file that will not be included more than once in

C#基础概念二十五问(一)

此生再无相见时 提交于 2020-01-01 00:54:05
1.静态成员和非静态成员的区别? 2.const 和 static readonly 区别? 3.extern 是什么意思? 4.abstract 是什么意思? 5.internal 修饰符起什么作用? 6.sealed 修饰符是干什么的? 7.override 和 overload 的区别? 8.什么是索引指示器? 9.new 修饰符是起什么作用? 10.this 关键字的含义? 11.可以使用抽象函数重写基类中的虚函数吗? 12.密封类可以有虚函数吗? 13.什么是属性访问器? 14.abstract 可以和 virtual 一起使用吗?可以和 override 一起使用吗? 15.接口可以包含哪些成员? 16.类和结构的区别? 17.接口的多继承会带来哪些问题? 18.抽象类和接口的区别? 19.别名指示符是什么? 20.如何手工释放资源? 21.P/Invoke是什么? 22.StringBuilder 和 String 的区别? 23.explicit 和 implicit 的含义? 24.params 有什么用? 25.什么是反射? 以下是我做的一份参考答案(C# 语言范畴之内),如果有不准确、不全面的,欢迎各位朋友指正! 1.静态成员和非静态成员的区别? 答: 静态变量使用 static 修饰符进行声明,在类被实例化时创建,通过类进行访问 不带有 static