当前位置:文档之家› Interest Points in Static Images

Interest Points in Static Images

UIUC汽车检测图像数据库(UIUC Image Database for Car Detection)

UIUC汽车检测图像数据库(UIUC Image Database for Car Detection) 数据介绍: This database contains images of side views of cars for use in evaluating object detection algorithms. 关键词: 汽车,探测,目标检测算法,目标,算法, cars,car,detection,object detection algorithms,object,algorithms,algorithm, 数据格式: TEXT 数据详细介绍: UIUC Image Database for Car Detection ●Description This database contains images of side views of cars for use in evaluating object detection algorithms. The images were collected at UIUC by Shivani Agarwal, Aatif Awan and Dan Roth, and were used in the experiments reported in [1], [2]. ●Data information The download package contains the following: 1050 training images (550 car and 500 non-car images) 170 single-scale test images, containing 200 cars at roughly the same scale as in the training images 108 multi-scale test images, containing 139 cars at various scales

C语言特殊符号意义

C语言中像%D &%f符号的作用说一下 最佳答案 C语言中的符号 运算符的种类C语言的运算符可分为以下几类: 1.算术运算符 用于各类数值运算。包括加(+)、减(-)、乘(*)、除(/)、求余(或称模运算,%)、自增(++)、自减(–)共七种。 2.关系运算符 用于比较运算。包括大于(>)、小于(<)、等于(==)、大于等于(>=)、小于等于(<=)和不等于(!=)六种。 3.逻辑运算符 用于逻辑运算。包括与(&&)、或(||)、非(!)三种。 4.位操作运算符 参与运算的量,按二进制位进行运算。包括位与(&)、位或(|)、位非(~)、位异或(^)、左移(<<)、右移(>>)六种。 5.赋值运算符 用于赋值运算,分为简单赋值(=)、复合算术赋值(+=,-=,*=,/=,%=)和复合位运算赋值(&=,|=,^=,>>=,<<=)三类共十一种。 6.条件运算符 这是一个三目运算符,用于条件求值(?:)。 7.逗号运算符 用于把若干表达式组合成一个表达式(,)。 8.指针运算符 用于取内容(*)和取地址(&)二种运算。 9.求字节数运算符 用于计算数据类型所占的字节数(sizeof)。 10.特殊运算符 有括号(),下标[],成员(→,.)等几种。 1.C的数据类型 基本类型,构造类型,指针类型,空类型 2.基本类型的分类及特点 类型说明符字节数值范围 字符型char 1 C字符集 基本整型int 2 -32768~32767 短整型short int 2 -32768~32767 长整型 long int 4 -214783648~214783647 无符号型 unsigned 2 0~65535

运筹学课程设计指导书

运筹学课程设计指导书 一、课程设计目的 1、初步掌握运筹学知识在管理问题中应用的基本方法与步骤; 2、巩固和加深对所学运筹学理论知识及方法的理解与掌握; 3、锻炼从管理实践中发掘、提炼问题,分析问题,选择建立运筹学模型,利用模型求解问题,并对问题的解进行分析与评价的综合应用能力; 4、通过利用运筹学计算机软件求解模型的操作,掌握运筹学计算软件的基本操作方法,并了解计算机在运筹学中的应用; 二、课程设计内容与步骤 第一部分是基本实验,为必做部分;需要每位同学单独完成,并写出相应的实验报告。第二部分是提高部分,题目自选或自拟,锻炼综合应用运筹学知识及软件解决实际问题的能力;可以单独完成,也可以合作完成(最多3人一组),写出相应的报告。 1、基本实验在完成基本实验后,每位同学要按照实验要求完成实验报告,实验报告应包括问题描述、建模、上机求解、结果分析及答辩几方面。实验报告必须是打印稿(word文档等),手写稿无效。请大家按照要求认真完成实验报告,如果两份实验报告雷同,或相差很少,则两份实验报告均为0分,其它抄袭情况,将根据抄袭多少扣分。(约占总分的70%) 2、提高部分根据自己的兴趣或所查找的资料,从实际情况出发,自拟题目;在实验报告中,陈述问题,建立模型,求解,结果分析,此部分应着重突出自己的观点和想法。(此部分按照排名先后给分,约占总分的30%) 三、课程设计要求 1、实验目的 学会建立相应的运筹学模型 学会Excel、Lindo和WinQSB,QM for windows软件的基本使用方法 学会用Excel、Lindo和WinQSB,QM for windows软件得到问题的最优解 2、实验要求 分析问题、建立模型,并阐明建立模型的过程; 说明并显示软件使用和计算的详细过程与结果; 结果分析,将结果返回到实际问题进行分析、评价。 四、题目内容 (一)Excel规划求解基本实验 1、雅致家具厂生产4种小型家具,由于该四种家具具有不同的大小、形状、重量和风格,所以它们所需要的主要原料(木材和玻璃)、制作时间、最大销售量与利润均不相同。该厂每天可提供的木材、玻璃和工人劳动时间分别为600单位、1000单位与400小时,详细的数据资料见下表。问: (1)应如何安排这四种家具的日产量,使得该厂的日利润最大? (2)家具厂是否愿意出10元的加班费,让某工人加班1小时? (3)如果可提供的工人劳动时间变为398小时,该厂的日利润有何变化? (4)该厂应优先考虑购买何种资源?

c语言关键字的用法详解

1. Static用法 1.1 static声明的变量在C语言中有两方面的特征: 1)、变量会被放在程序的全局存储区中,这样可以在下一次调用的时候还可以保持原来的赋值。这一点是它与堆栈变量和堆变量的区别。 2)、变量用static告知编译器,自己仅仅在变量的作用范围内可见。这一点是它与全局变量的区别。 1.2 特点 A.若全局变量仅在单个C文件中访问,则可以将这个变量修改为静态全局变量,以降低模块间的耦合度; B.若全局变量仅由单个函数访问,则可以将这个变量改为该函数的静态局部变量,以降低模块间的耦合度; C.设计和使用访问动态全局变量、静态全局变量、静态局部变量的函数时,需要考虑重入问题; D.如果我们需要一个可重入的函数,那么,我们一定要避免函数中使用static变量(这样的函数被称为:带“内部存储器”功能的的函数) E.函数中必须要使用static变量情况:比如当某函数的返回值为指针类型时,则必须是static 的局部变量的地址作为返回值,若为auto类型,则返回为错指针。 函数前加static使得函数成为静态函数。但此处“static”的含义不是指存储方式,而是指对函数的作用域仅局限于本文件(所以又称内部函数)。使用内部函数的好处是:不同的人编写不同的函数时,不用担心自己定义的函数,是否会与其它文件中的函数同名。 扩展分析:术语static有着不寻常的历史.起初,在C中引入关键字static是为了表示退出一个块后仍然存在的局部变量。随后,static在C中有了第二种含义:用来表示不能被其它文件访问的全局变量和函数。为了避免引入新的关键字,所以仍使用static关键字来表示这第二种含义。最后,C++重用了这个关键字,并赋予它与前面不同的第三种含义:表示属于一个类而不是属于此类的任何特定对象的变量和函数(与Java中此关键字的含义相同)。 1.3 关键字static的作用是什么? 这个简单的问题很少有人能回答完全。在C语言中,关键字static有三个明显的作用:

C语言中auto,register,static,const,volatile的区别

C语言中auto,register,static,const,volatile的区别 (1)auto 这个关键字用于声明变量的生存期为自动,即将不在任何类、结构、枚举、联合和函数中定义的变量视为全局变量,而在函数中定义的变量视为局部变量。这个关键字不怎么多写,因为所有的变量默认就是auto的。 (2)register 这个关键字命令编译器尽可能的将变量存在CPU内部寄存器中而不是通过内存寻址访问以提高效率。 (3)static 常见的两种用途: 1>统计函数被调用的次数; 2>减少局部数组建立和赋值的开销.变量的建立和赋值是需要一定的处理器开销的,特别是数组等含有较多元素的存储类型。在一些含有较多的变量并且被经常调用的函数中,可以将一些数组声明为static类型,以减少建立或者初始化这些变量的开销. 详细说明: 1>、变量会被放在程序的全局存储区中,这样可以在下一次调用的时候还可以保持原来的赋值。这一点是它与栈变量和堆变量的区别。 2>、变量用static告知编译器,自己仅仅在变量的作用范围内可见。这一点是它与全局变量的区别。 3>当static用来修饰全局变量时,它就改变了全局变量的作用域,使其不能被别的程序extern,限制在了当前文件里,但是没有改变其存放位置,还是在全局静态储存区。 使用注意: 1>若全局变量仅在单个C文件中访问,则可以将这个变量修改为静态全局变量,以降低模块间的耦合度; 2>若全局变量仅由单个函数访问,则可以将这个变量改为该函数的静态局部变量,以降低模块间的耦合度; 3>设计和使用访问动态全局变量、静态全局变量、静态局部变量的函数时,需要考虑重入问题(只要输入数据相同就应产生相同的输出)。 (4)const 被const修饰的东西都受到强制保护,可以预防意外的变动,能提高程序的健壮性。它可以修饰函数的参数、返回值,甚至函数的定义体。 作用: 1>修饰输入参数 a.对于非内部数据类型的输入参数,应该将“值传递”的方式改为“const引用传递”,目的是提高效率。例如将void Func(A a) 改为void Func(const A &a)。 b.对于内部数据类型的输入参数,不要将“值传递”的方式改为“const引用传递”。否则既达不到提高效率的目的,又降低了函数的可理解性。例如void Func(int x) 不应该改为void Func(const int &x)。 2>用const修饰函数的返回值 a.如果给以“指针传递”方式的函数返回值加const修饰,那么函数返回值(即指针)的内容不能被修改,该返回值只能被赋给加const修饰的同类型指针。 如对于:const char * GetString(void); 如下语句将出现编译错误: char *str = GetString();//cannot convert from 'const char *' to 'char *'; 正确的用法是:

Hybrid images

Copyright ? 2006 by the Association for Computing Machinery, Inc. Permission to make digital or hard c opies of part or all of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for c ommercial advantage and that c opies bear this notic e and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, to republish, to post on servers, or to redistribute to lists, requires prior spec ific permission and/or a fee. Request permissions from Permissions Dept, ACM Inc., fax +1 (212) 869-0481 or e-mail permissions@https://www.doczj.com/doc/f12796291.html, . ? 2006 ACM 0730-0301/06/0700- $5.00 0527Hybrid images Aude Oliva ?MIT-BCS Antonio Torralba ?MIT-CSAIL Philippe.G.Schyns ?University of Glasgow Figure 1:A hybrid image is a picture that combines the low-spatial frequencies of one picture with the high spatial frequencies of another picture producing an image with an interpretation that changes with viewing distance.In this ?gure,the people may appear sad,up close,but step back a few meters and look at the expressions again. Abstract We present hybrid images ,a technique that produces static images with two interpretations,which change as a function of viewing distance.Hybrid images are based on the multiscale processing of images by the human visual system and are motivated by masking studies in visual perception.These images can be used to create compelling displays in which the image appears to change as the viewing distance changes.We show that by taking into account perceptual grouping mechanisms it is possible to build compelling hybrid images with stable percepts at each distance.We show ex-amples in which hybrid images are used to create textures that be-come visible only when seen up-close,to generate facial expres-sions whose interpretation changes with viewing distance,and to visualize changes over time within a single picture.Keywords:Hybrid images,human perception,scale space 1Introduction Here we exploit the multiscale perceptual mechanisms of human vi-sion to create visual illusions (hybrid images )where two different interpretations of a picture can be perceived by changing the view-ing distance or the presentation time.We use and extend the method originally proposed by Schyns and Oliva [1994;1997;1999].Fig.1shows an example of a hybrid image assembled from two images ?e-mail:oliva@https://www.doczj.com/doc/f12796291.html, ?e-mail:torralba@https://www.doczj.com/doc/f12796291.html, ?e-mail: p.schyns@https://www.doczj.com/doc/f12796291.html, in which the faces displayed different emotions.High spatial fre-quencies correspond to faces with ”sad”expressions.Low spatial frequencies correspond to the same faces with ”happy”and ”sur-prise”emotions (i.e.,the emotions are,from left to right:happy,surprise,happy and happy).To switch from one interpretation to the other one can step away a few meters from the picture.Artists have effectively employed low spatial frequency manipu-lation to elicit a percept that changes when relying on peripheral vision (e.g.,[Livingstone 2000;Dali 1996]).Inspired by this work,Setlur and Gooch [2004]propose a technique that creates facial im-ages with con?icting emotional states at different spatial frequen-cies.The images produce subtle expression variations with gaze changes.In this paper,we demonstrate the effectiveness of hybrid images in creating images with two very different possible interpre-tations. Hybrid images are generated by superimposing two images at two different spatial scales:the low-spatial scale is obtained by ?ltering one image with a low-pass ?lter;the high spatial scale is obtained by ?ltering a second image with a high-pass ?lter.The ?nal im-age is composed by adding these two ?ltered images.Note that hybrid images are a different technique than picture mosaics [Sil-vers 1997].Picture mosaics have two interpretations:a local one (which is given by the content of each of the pictures that compose the mosaic)and a global one (which is best seen at some prede?ned distance).Hybrid images,however,contain two coherent global image interpretations,one of which is of the low spatial frequen-cies,the other of high spatial frequencies. We illustrate this technique with several proof-of-concept exam-ples.We show how this technique can be applied to create face pictures that change expression with viewing distance,to display two con?gurations of a scene in a single picture,and to present tex-tures that disappear when viewed at a distance. 2The design of hybrid images A hybrid image (H )is obtained by combining two images (I 1and I 2),one ?ltered with a low-pass ?lter (G 1)and the second one ?l-

MATLAB与在运筹学中的应用

MATLAB与在运筹学中的应用 摘要:论文通过MATLAB在运筹学中的应用实例,探讨了MATLAB在运筹学中的应用方法和技巧,初步了解matlab中优化工具箱的使用。 关键字:MATLAB应用运筹学优化计算 引言 运筹学是近代应用数学的一个分支,主要是研究如何将生产、管理等事件中出现的运筹问题加以提炼,然后利用数学方法进行解决的学科。运筹学是应用数学和形式科学的跨领域研究,利用像是统计学、数学模型和算法等方法,去寻找复杂问题中的最佳或近似最佳的解答。运筹学经常用于解决现实生活中的复杂问题,特别是改善或优化现有系统的效率。运筹学中常用的运算工具有Matlab、Mathematica、Maple、SAS 、SPSS、Lindo/Lingo、GAMS、WinQSB、Excel、其他,如SQP、DPS、ORS、Visual Decision、Decision Explore、AIMMS、Crystal等。 Matlab是矩阵实验室(Matrix Laboratory)的简称,是美国MathWorks公司出品的商业数学软件,和Mathematica、Maple并称为三大数学软件。 用于算法开发、数据可视化、数据分析以及数值计算的高级技术计算语言和交互式环境,主要包括Matlab和Simulink两大部分。 主要应用于工程计算、控制设计、信号处理与通讯、图像处理、信号检测、金融建模设计与分析等领域。 将matlab用于运筹学的最优化运算可以很好的解决优化问题,而且matlab 还专门有优化工具箱,是处理优化问题更加方便。 一、例:0-1规划(《运筹学》80页例3-9) 求minZ=x1-3*x2+6*x3+2*x4-4*x5 6*x1+2*x2-x3+7*x4+x5<=12 约束条件 x1+4*x2+5*x3-x4+3*x5>=10 Xj=0或1,j=1,2,3,4

static变量三个作用

static的作用 在C语言中,static的字面意思很容易把我们导入歧途,其实它的作用有三条。 (1)先来介绍它的第一条也是最重要的一条:隐藏。 当我们同时编译多个文件时,所有未加static前缀的全局变量和函数都具有全局可见性。为理解这句话,我举例来说明。我们要同时编译两个源文件,一个是a.c,另一个是main.c。 下面是a.c的内容 char a = 'A'; // global variable void msg() { printf("Hello\n"); } 下面是main.c的内容 int main(void) { extern char a; // extern variable must be declared before use printf("%c ", a); (void)msg(); return 0; } 程序的运行结果是: A Hello 你可能会问:为什么在a.c中定义的全局变量a和函数msg能在main.c中使用?前面说过,所有未加static前缀的全局变量和函数都具有全局可见性,其它的源文件也能访问。此例中,a

是全局变量,msg是函数,并且都没有加static前缀,因此对于另外的源文件main.c是可见的。 如果加了static,就会对其它源文件隐藏。例如在a和msg的定义前加上static,main.c就看不到它们了。利用这一特性可以在不同的文件中定义同名函数和同名变量,而不必担心命名冲突。Static可以用作函数和变量的前缀,对于函数来讲,static的作用仅限于隐藏,而对于变量,static还有下面两个作用。 (2)static的第二个作用是保持变量内容的持久。存储在静态数据区的变量会在程序刚开始运行时就完成初始化,也是唯一的一次初始化。共有两种变量存储在静态存储区:全局变量和static变量,只不过和全局变量比起来,static可以控制变量的可见范围,说到底static还是用来隐藏的。虽然这种用法不常见,但我还是举一个例子。 #include int fun(void){ static int count = 10; // 事实上此赋值语句从来没有执行过 return count--; } int count = 1; int main(void) { printf("global\t\tlocal static\n"); for(; count <= 10; ++count) printf("%d\t\t%d\n", count, fun()); return 0; }

C语言关键字static

C语言关键字-static 用法1:在一个函数体内使用static定义一个变量,保证该变量只进行一次初始化 例:#include "stdio.h" int test(void) { static int i=0; //对应 int i=0 结果为i=1 i=1 i=1 i=1 i=1 i++; return i; } int main( ) { for(int j=0;j<5;j++) printf("test=%d\n",test()); return 0; } 输出结果:i=1 i=2 i=3 i=4 i=5 用法2:在模块内,函数体外声明的static变量,只能 被模块内函数调用,而模块是无效的(其中模块即:一个.c文件和一个.h文件的结合,其中在STM32单片机

C设计中经常使用)。同样的一个在模块内被声明为static的函数也只能在模块内被其它函数调用,而模块外是无权调用的。一句话总结就是保护一些不能被其它文件访问的全局变量和函数;防止了不同人定义的文件变量名和函数名的重复引起的错误 例://file1.cpp int VarA=0; static int VarB=0; extern void FunB(void) //其中函数前面加extern表示定义为外部函数,其实可以省略,因为C语言默认省略为外部可 //调用 { ; } static int FunA (void) //加了static为静态函数,只能在本模块使用 { int i=0; i++; return i; } //file2.cpp

extern int VarA; //可以 extern int VarB;//错误,为静态变量 extern int FunB;//可以 extern int FunA;//错误,为静态函数 总结:众所周知局部变量在存储方式上可以分为auto (默认的,可省略) static register这3种其中auto 是分配在栈上,占用动态存储空间,在函数调用结束后自动释放;static 分配在静态存储空间,两者的作用域相同,但是生存周期不同,static在所处模块初期初始化一次,其后不再进行初始化,同时如果没有初始化则默认是0或者空字符,但是auto的无初始化的值是随机的数;其中针对C++系统不管是否有static修饰都会调用默认构造函数进行初始化。

运用线性规划对运输问题研究

运用线性规划对运输问题研究 班级:金融103班姓名:王纬福学号:5400210132摘要:由于企业选择运输路线或运输工具不合理而导致物流运输成本不能最小化的问题普遍存在而管理运筹学却能很好的解决此问题。通过科学的方法对问题进行具体化再建立数学模型并求解,就能找到运输成本最小的运输组合。 关键词:物流运输成本、输成本、管理运筹学、WinQSB2.0、线性规划 一、引言 日常生活中,人们经常需要将某些物品由一个空间位置移动到另一个空间位置,这就产生了运输。如何判定科学的运输方案,使运输所需的总费用最少,就是管理运筹学在运输问题上的运用需要解决的问题。 运输问题是一类应用广泛的特殊的线性规划问题,在线性规划的一般理论和单纯形法出现以前,康托洛维奇(L.V.Kant)和希奇柯克(F.L.Hitchcock)已经研究了运输问题。所以,运输问题又有“康-希问题”之称。对于运输问题(Transportation Problem TP)当然可用前面所讲的单纯形法求解,但由于该问题本身的特殊性,我们可以找到比标准单纯形法更简单有效的专门方法,从而节约计算时间和费用。主要是因为它们的约束方程组的系数矩阵具有特殊结构,使得这类问题的求解方法比常规的单纯形法要更为简便。 一、研究现状 运输问题的研究较多,并且几乎所有的线性规划书中都有论述。遗憾的是一些书中所建立的数学模型都不够全面和系统的。但是也有一些模型是严谨的没有漏洞和缺陷,并且很容易在此基础上修改或添加一些其他约束条件便于在实际工程中进行应用。管理运筹学在运输问题上的研究较为深入、全面、系统。对于计算机软件的引用也很前言,winQSB2.0对于普通甚至深入研究运输问题就已经是简单而又使用、耐用、好用的了。现在相关的杂志、期刊都越来越多关于管理运筹学,关于运输问题的文章论文初版,越来越得到重视。 二、文献回顾 随着物流行业和企业对物流运输要求的不断提高,企业的面临着更大的市场竞争,其运输活动在企业不断发展过程中,面临着越来越大难度的运输组合的选择决策问题。如何正确解决这个问题,是企业能够持续经营和发展不可忽视和必须面对的。这个问题同时也引起了企业界、学术界等社会各界的广泛关注。运输问题的实质是企业与运输组合的经济性问题,成功的企业通常都会面临如何选取最佳运输组合或运输路线这样一个重要问题,即以企业运输成本最小化作为确定最佳运输组合或运输路线的原落脚点。 四、案例分析 例:某公司下设生产同类产品的加工厂A1、A2、A3,生产的产品由4个销售点B1、B2、B3、B4出售。各工厂的生产量、各销售点的销量以及各工厂到各销售点的单位运价如下表:

C语言中全局变量,局部变量,静态全局变量,静态局部变量的区别

C语言中全局变量、局部变量、静态全局变量、静态局部变量的区别 1.C++变量根据定义的位置的不同的生命周期,具有不同的作用域,作用域可分为6种: 全局作用域,局部作用域,语句作用域,类作用域,命名空间作用域和文件作用域。 从作用域看: 1>全局变量具有全局作用域。全局变量只需在一个源文件中定义,就可以作用于所有的源文件。当然,其他不包含全局变量定义的源文件需要用extern 关键字再次声明这个全局变量。 2>静态局部变量具有局部作用域,它只被初始化一次,自从第一次被初始化直到程序运行结束都一直存在,它和全局变量的区别在于全局变量对所有的函数都是可见的,而静态局部变量只对定义自己的函数体始终可见。 3>局部变量也只有局部作用域,它是自动对象(auto),它在程序运行期间不是一直存在,而是只在函数执行期间存在,函数的一次调用执行结束后,变量被撤销,其所占用的内存也被收回。 4>静态全局变量也具有全局作用域,它与全局变量的区别在于如果程序包含多个文件的话,它作用于定义它的文件里,不能作用到其它文件里,即被static 关键字修饰过的变量具有文件作用域。这样即使两个不同的源文件都定义了相同名字的静态全局变量,它们也是不同的变量。 2.从分配内存空间看: 1>全局变量,静态局部变量,静态全局变量都在静态存储区分配空间,而局部变量在栈里分配空间 2>全局变量本身就是静态存储方式,静态全局变量当然也是静态存储方式。这两者在存储方式上并无不同。这两者的区别虽在于非静态全局变量的作用域是整个源程序,当一个源程序由多个源文件组成时,非静态的全局变量在各个源文件中都是有效的。而静态全局变量则限制了其作用域,即只在定义该变量的源文件内有效,在同一源程序的其它源文件中不能使用它。由于静态全局变量的作用域局限于一个源文件内,只能为该源文件内的函数公用,因此可以避免在其它源文件中引起错误。 1)静态变量会被放在程序的静态数据存储区(全局可见)中,这样可以在下一次调用的时候还可以保持原来的赋值。这一点是它与堆栈变量和堆变量的区别。2)变量用static告知编译器,自己仅仅在变量的作用范围内可见。这一点是它与全局变量的区别。

static的作用

static像在VB,C,C++,Java中我们可以看到static最为关键字和函数出现,在其他的高级计算机语言如FORTRAN、ALGOL、COBOL、BASIC、LISP、SNOBOL、PL/1、Pascal、PROLOG、Ada等语 言中也是有出现的,只是有着不同的作用,对于其具体作用,读者有需要的时候是可以具体查阅的鉴 于时间问题今天我就不一一罗列了。 目录 简介 分类 static 函数内部函数和外部函数 当一个源程序由多个源文件组成时,C语言根据函数能否被其它源文件中的函数调用,将函数分为内部函数和外部函数。 内部函数 (又称静态函数) 如果在一个源文件中定义的函数,只能被本文件中的函数调用,而不能被同一程序其它文件中的函数调用,这种函数称为内部函数。 定义一个内部函数,只需在函数类型前再加一个“static”关键字即可,如下所示: static 函数类型函数名(函数参数表) {……} 关键字“static”,译成中文就是“静态的”,所以内部函数又称静态函数。但此处“static”的含义不是指存储方式,而是指对函数的作用域仅局限于本文件。

使用内部函数的好处是:不同的人编写不同的函数时,不用担心自己定义的函数,是否会与其它文件中的函数同名,因为同名也没有关系。 外部函数 外部函数的定义:在定义函数时,如果没有加关键字“static”,或冠以关键字“extern”,表示此函数是外部函数: [extern] 函数类型函数名(函数参数表) {……} 调用外部函数时,需要对其进行说明: [extern] 函数类型函数名(参数类型表)[,函数名2(参数类型表2)……]; [案例]外部函数应用。 (1)文件mainf.c main() { extern void input(…),process(…),output(…); input(…); process(…); output(…); } (2)文件subf1.c …… extern void input(……) /*定义外部函数*/ {……} (3)文件subf2.c …… extern void process(……) /*定义外部函数*/ {……} (4)文件subf3.c …… extern void output(……) /*定义外部函数*/ {……} C++的static有两种用法:面向过程程序设计中的static和面向对象程序设计中的static。前者应用于普通变量和函数,不涉及类;后者主要说明static在类中的作用。 面向过程设计中的static 1、静态全局变量 在全局变量前,加上关键字static,该变量就被定义成为一个静态全局变量。我们先举一个静态全局变量的例子,如下: //Example 1 #include void fn(); static int n; //定义静态全局变量

Mosaicing of acoustic camera images

Mosaicing of acoustic camera images K.Kim,N.Neretti and N.Intrator Abstract:An algorithm for image registration and mosaicing on underwater sonar image sequences characterised by a high noise level,inhomogeneous illumination and low frame rate is presented.Imaging geometry of acoustic cameras is signi?cantly different from that of pinhole cameras.For a planar surface viewed through a pinhole camera undergoing translational and rotational motion,registration can be obtained via a projective transformation.For an acoustic camera,it is shown that,under the same conditions,an af?ne transformation is a good approximation.A novel image fusion method,which maximises the signal-to-noise ratio of the mosaic image is proposed.The full procedure includes illumination correction,feature based transformation estimation,and image fusion for mosaicing. 1Introduction The acquisition of underwater images is performed in noisy environments with low visibility.For optical images in those environments,often natural light is not available, and even if arti?cial light is applied,the visible range is limited. For this reason,sonar systems are widely used to obtain images of seabed or other underwater objects. An acoustic camera is a novel device that can produce a real time underwater image sequence.Detailed imaging methods of acoustic cameras can be found in[1].Acoustic cameras provide extremely high resolution(for a sonar)and rapid refresh rates[1].Despite those merits of acoustic cameras over other sonar systems,it still has shortcomings compared to normal optical cameras: (i)Limitation of sight range:Unlike optical cameras which have a2-D array of photosensors,acoustic cameras have a 1-D transducer array.2-D representation is obtained from the temporal sequence of the transducer array.For this reason,it can collect information from a limited range. (ii)Low signal-to-noise ratio(SNR):The size of the transducers is comparable to the wavelength of ultrasonic waves,so the intensity of a pixel depends not only on the amplitude,but also on the phase difference of the re?ected signal.This is the reason for the Rician distribution of the ultrasound image noise.In addition,there is often a background ultrasound noise in underwater environments. It follows that the SNR is signi?cantly lower than in optical images. (iii)Low resolution with respect to optical images:owing to the limitation in the transducer size,the number of transducers that can be packed in an array is physically restricted,and so is the number of pixels in the horizontal axis.For example,a mine reacquisition and identi?cation sonar(MIRIS)has64transducers[1].(iv)Inhomogeneous insoni?cation:The unique geometry of an acoustic camera requires the sonar device to be aligned parallel to the surface of interest,so that the whole surface falls within the vertical?eld of view of the acoustic camera [1].This alignment is not always trivial,and the misalign-ment often makes dark areas in acoustic camera images. The above limitations can be addressed by image mosai-cing,which is broadly used to build a wider view image [2–4],or to estimate the motion of a vehicle[5,6].For ordinary images,mosaicing is also used for image enhancement such as denoising,deblurring,or super-resolution[7,8]. There has been extensive research on image mosaicing, and its applications[9–13].However,standard methods for image registration[14,15]are not directly applicable to acoustic camera images,because of the discrepancy of image quality,inhomogeneous insoni?cation pro?le,and different geometry.Marks et al.have described a mosaicing algorithm of the ocean?oor taken with an optical camera [2].Rzhanov et al.have also described a mosaicing algorithm of underwater optical images resulting in high resolution seabed maps[3].Both of them deal with a similar problem of illumination,but use different methods:image matching by edge detection and Fourier based matching, which are not directly related to our work.In addition,since their mosaicing algorithms are not intended for image quality enhancement,we need to come up with a different mosaicing algorithm. In this paper,we describe a mosaicing algorithm for a sequence of acoustic camera images.We show that an af?ne transformation is appropriate for images taken from an acoustic camera undergoing translational and rotational motion.We propose a method to register acoustic camera images from a video sequence using a feature matching algorithm.Based on the parameters of image registration,a mosaic image is built.During the mosaicing,the image quality is enhanced in terms of SNR and resolution. 2Properties of acoustic camera images Sonar image acquisition includes several steps,insoni?ca-tion,scattering,and detection of the returning signal.In this Section,we describe physical aspects of images acquired from acoustic lens sonar systems,or acoustic cameras. q IEE,2005 IEE Proceedings online no.20045015 doi:10.1049/ip-rsn:20045015 The authors are with the Institute for Brain and Neural Systems,Brown University,Box1843Providence RI02912,USA E-mail:kio@https://www.doczj.com/doc/f12796291.html, Paper?rst received21st May2004and in revised form22nd April2005

相关主题
文本预览
相关文档 最新文档