文档库 最新最全的文档下载
当前位置:文档库 › 运动员最佳配对问题(习题514)

运动员最佳配对问题(习题514)

运动员最佳配对问题(习题514)
运动员最佳配对问题(习题514)

运动员最佳配对问题(习题5—14)

羽毛球队有男女运动员各n人.给定两个n×n得矩阵P和Q.

P[i][j]是男运动员i和女运动员j配对组成混合双打的运动员竞赛优势.

Q[i][j]是女运动员i和男运动员j配合的女运动员竞赛优势.

由于技术配合和心理状态等各种因素影响,P[i][j]不一定等于Q[i][j].

男运动员i女运动员j配合组成混合双打的男女双方竞赛优势为P[i][j]×Q[j][i].

设计一个算法,计算男女运动员最佳配对法,使各组男女双方竞赛优势的总和达到最大. 此题目的解空间显然是一棵排列树,可以套用搜索排列树的回溯法框架:

void backtrack(int t)

{

if(t>n)compute();

else

for(int j=i;j<=n;j++)

{

swap(r,t,j);

backtrack(i+1);

swap(r,t,j);

}

}

void compute()

{

int temp=0;

for(int i=1;i<=n;i++)

temp+=p[i][r[i]]*q[r[i]][i];

if(temp>best)

{

best=temp;

for(int i=1;i<=n;i++)

bestr[i]=r[i];

}

}

无和集问题(习题5—16)

设S是正整数集合。S 是一个无和集当且仅当x,y属于S, 蕴含x+y不属于S 。

对于任意正整数k ,如果可将{1,2... k} 划分为n个无和子集S1,S2...Sn,称正整

数k是n可分的。记F(n) =max{ k | k 是n可分的}。

试设计一个算法,对任意给定的n,计算F(n) 的值。

该题是子集选取问题,解空间显然是一棵子集树,同样可以套用搜索子集树的回溯法框架. 但是由于搜索的空间很大,用搜索时间控制搜索深度:

Bool search(int dep)

{

t1=clock();

elapsed+=(t1-t2)/()double)clock_per_sec);

t0=t1;

If(elapsed>15.0)return false;

If(dep>k){out();return true;}

for(int i=1;i<=n;i++){

If(sum[i][dep]==0){

t[dep]=I;s[i][dep]=true;

for(int j=1;j

If(search(dep+1) return true;

s[i][dep]=false;t[dep]=0;

for(j=1;j

}

}

Return false;

}

整数变换问题(习题5—18)

关于整数i的变换f和g。f=3i,g=(i/2)向下取整。

对于给定的两个整数m,n.要求从n变换为m。

如15,4 4=ggfg(15)

首先分析:永远可以。g操作就是对一个数字的二进制表示向右移动一位。

首先,任何数字都可以通过若干次连续的g操作成为1.

然后通过若干次f操作成为3^k,

如果存在k,使得3^k的前面若干位2进制数正好是n的二进制表示,那么我们就通过若干次右移(g操作)将3^k变成n.

所以我们只要能够证明得出:

对于任何一个w进制表示的数字n (s位数),我们能够找到一个整数k,使得3^k的w进制表示的前面s位正好是n。

就可以了。

为了找最短路径,用逐步加深的回溯法搜索:

具体算法:

Void compute()

{

K=1;

While(! Search(1,n){

K++;

If(k>maxdep)break;

Init();

}

If(found)output();

Else cout<<”No solution!”<

}

Bool search(int dep, int n)

{

if(dep>k) return false;

For(int i=0;i<2;i++){

Int n1=f(n,i);t[dep]=I;

If (n1==n)||search(dep+1,n1){found=true;out();return true;}

}

Return false;

}

无优先级运算(习题5—27)

#include

#include "stdio.h"

int n; //给定数字的个数

int a[999];//给定的数字

int m;//利用给定的数字运算求出的数字m int num[999];

int oper[999];

int flag[999];

int k;

found()

{

int x=num[0];

for(int i=0;i

{

switch(oper[i])

{

case 0: x+=num[i+1];break;

case 1: x-=num[i+1];break;

case 2: x*=num[i+1];break;

case 3: x/=num[i+1];break;

}

}

return(x==m);

}

search(int dep)

{

if(dep>k)

{

if(found())

return true;

else

return false;

}

for(int i=0;i

if(flag[i]==0)

{

num[dep]=a[i];

flag[i]=1;

for(int j=0;j<4;j++)

{

oper[dep]=j;

if(search(dep+1))

return true;

}

flag[i]=0;

}

return false;

}

main()

{

cout<<"输入给定的数字个数\n";

cin>>n;

for (int p=0;p

{

cout<<"输入第"<>a[p];

flag[p]=0;

}

cout<<"输入要求的数字\n";

cin>>m;

for(k=0;k

if(search(0))

{

cout<

//out();

return;

}

cout<<"No Solution! \n";

}

运行:

0-1背包问题(及时删除不用的结点)

对物品的选取与否构成一棵解树,左子树表示不装入,右表示装入,通过检索问题的解树得出最优解,并用结点上界杀死不符合要求的结点。

具体源程序:

#include

struct good

{

int weight;

int benefit;

int flag;//是否可以装入标记

};

int number=5;//物品数量

int upbound=0;

int curp=0, curw=0;//当前效益值与重量

int maxweight=12;

good *bag=NULL;

void Init_good()

{

bag=new good [number];

for(int i=0; i

{

cout<<"请输入第"<

cin>>bag[i].weight;

cout<<"请输入第件"<

cin>>bag[i].benefit;

bag[i].flag=0;//初始标志为不装入背包

cout<

}

}

int getbound(int num, int *bound_u)//返回本结点的c限界和u限界

{

for(int w=curw, p=curp; num

{

w=w+bag[num].weight;

p=w+bag[num].benefit;

}

*bound_u=p+bag[num].benefit;

return ( p+bag[num].benefit*((maxweight-w)/bag[num].weight) );

}

void LCbag()

{

int bound_u=0, bound_c=0;//当前结点的c限界和u限界

for(int i=0; i

{

if( ( bound_c=getbound(i+1, &bound_u) )>upbound )//遍历左子树upbound=bound_u;//更改已有u限界,不更改标志

if( getbound(i, &bound_u)>bound_c )//遍历右子树

//若装入,判断右子树的c限界是否大于左子树根的c限界,是则装入

{

upbound=bound_u;//更改已有u限界

curp=curp+bag[i].benefit;

curw=curw+bag[i].weight;//从已有重量和效益加上新物品

bag[i].flag=1;//标记为装入

}

}

}

void Display()

{

cout<<"可以放入背包的物品的编号为:";

for(int i=0; i

if(bag[i].flag>0)

cout<

cout<

delete []bag;

}

int main()

{

Init_good();

int getbound(int a, int *b);

LCbag();

Display();

return 0;

}

运行结果:

三年级奥数:配对求和精编版

配对求和 引入:被人誉为“数学王子”的高斯在年仅10岁时就以一种非常巧妙的方法很快求出1+2+3+4+5+、、、+99+100的结果。高斯是怎样求出这个和的呢?这就是我们要研究的这种求和的方法。 我们利用高斯的巧算方法得出这样的公式: 总和=(首项+末项)×项数÷2 项数=(末项-首项)÷公差+1 末项=首项+(项数-1)×公差 第一类题型 例题1: 计算:1+2+3+4+5+、、、+98+99+100. 思路点拨: 此数列是一个等差数列,公差是1,我们可以利用“总和=(首项+末项)×项数÷2”的求和公式来解。 解:1+2+3+4+5+、、、+98+99+100 =(1+100)+(2+99)+(3+98)+、、、+(50+51) =(100+1)×(100÷2) = 101×50 = 5050 同步精炼: 1、1+2+3+4+5+6+7+8+9+10 2、2+4+6+8+、、、+30 第二类题型 例题1: 计算:2+5+8+11+14+17+20 思路导航: 本题是一个等差数列,公差是3. 2、5、8、11、14、17、20,一共有7个数,如果我们仍像例1那样每两个数组成一个组,就多出一个数,那怎么办呢?我们不妨这样想: 2 5 8 11 14 17 20 +20 17 14 11 8 5 2 22 22 22 22 22 22 22 7个22是154,而154是两组2到20的和,一组2到20的和一组2到20的和就是154÷2=77,由此我们得出这样的规律,当加数是单数时,就可用第一个数即前项与最后一个数(末项)相加,乘以这组数的个数(项数),再除以2,就能求出正确结果了。其实这种方法也适用于加数的个数成双的求和:

算法设计题目

第2章 1、大整数乘法的O(nm log(3/2))算法 给定2个大整数u和v,它们分别有m位和n位数字,且mn。用通常的乘法求uv的值需要O(mn)时间。可以u和v均看作是有n 位数字的大整数,用教材第2章介绍的分治法,在O(n l og3)时间内计算uv的值。当m比n小得多时,用这种方法就显得效率不够高。试设计一个算法,在上述情况下用O(nm l og(3/2))时间求出uv的值。 2、O(1)空间子数组换位算法 设a[0:n-1]是一个有n个元素的数组,k(1kn-1)是一个非负整数。试设计一个算法将子数组a[0:k-1]与a[k+1:n-1]换位。要求算法在最坏情况下耗时O(n),且只用到O(1)的辅助空间。 3、段合并排序算法 如果在合并排序算法的分割步骤中,将数组a[0:n-1]划分为个子数组,每个子数组中有O()个元素。然后递归地对分割后的子数组进行排序,最后将所得到的个排好序的子数组合并成所要的排好序的数组a[0:n-1]。设计一个实现上述策略的合并排序算法,并分析算法的计算复杂性。 4、合并排序算法 对拨给元素存储于数组和存储于链表中的2种情形,写出合并排序算法。 5、非增序快速排序算法 如何修改QuickSort才能使其将输入元素按非增序排序?

第三章 1、整数线性规划问题 考虑下面的整数线性规划问题 试设计一个解此问题的动态规划算法,并分析算法的计算复杂性。2、Ackermann函数 Ackermann函数A(m,n)可递归地定义如下: A(m,n)= 试设计一个计算A(m,n)的动态规划算法,该算法只占用O(m)空间。 3、独立任务最优调试问题 问题描述:用2台机A和B处理n个作业。设第i个作业交给机器A 处理时需要时间a i,若由机器B来处理,则需要时间b i。由于各作业的选战和机器的性能关系,很可能对于某些i,有ai≥bi,而对于某些j,j≠i,有a i

英语四级长篇阅读段落信息匹配题练习及答案解析(2)

英语四级长篇阅读段落信息匹配题练习及答案解析(2) Section B Directions:In this section,you are going to read a passage with ten statements attached to it.Each smtement contains information given in one of the paragraphs.1ndentify the paragraph from which the information is derived.You may choose a paragraph more than once.Each paragraph is marked with a letter.Answer the questions by marking the corresponding letter on Answer Sheet 2. Creative Book Report Ideas A.Are you at a loss for creative book report ideas for your students?If yes.then this article will help you make reading and reviewing books more creative for your class.In an age of PSPs,Xbox,anime and gaming arcades,reading has lost its foothold in the list of hobbies that children tend to cite. Most of the reading that kids do today,comes in the form of compulsory books that they need to read for school and maybe that is the reason they find reading to be an insurmountable and boring task.If you want to inculcate the love for languages and literary masterpieces in your students and want them to devour books everyone should read,then a good way of going about the same would be to get them to start working on creative book report ideas.While working on creative ideas for book reports,your students will have to understand the book in a way that allows them to come up with new ways to present to the class,the essence of the book. B.As a teachel while egging your students to activate their creative gray cells.you will have to help them out with basic ideas that they can work on.Depending on the age bracket that your students belong to,the creative book report ideas will vary.This is so,not just because of the varying attention spans that children of various age groups posses but also because of the amount of work that kids can put into the report.While a middle school student wiIl be comfortable handling a handy cam,a student from elementary school will be more fascinated if he is working with paints and puppets.So do you want to know how to write a book report creatively?In this article.we will list out for you,a couple of good creative book report ideas for elementary students and for middle school students. C.A book report sandwich is a good creative idea for book reports.As a teacher you can get drawings of a sandwich on sheets of Paper that are of the color of the ingredients of your sandwich,for example,a cream sheet of paper to resemble mayonnaise,red to represent tomato and likewise.Ob. viously,each ingredient should be cut in a way that when assembled together,it looks like a sandwich.Now,give each of your students one of these book sandwiches to create their book report. It can start with the name of the book and the author’s name on the top slice of the sandwich.The second ingredient can have the summary of the book on it.Each subsequent ingredient can have a description of the main characters,the setting of the book,the plot,and then his or her views about the book.Once they are done with their book reports,they can staple the book sandwich together and then,you can create a class bulletin board with all the book report sandwiches on display. D.One of the good techniques to retell a story,it is also one of the favorite creative book report ideas among students.The job that the student will have is to read the book and then pick a few objects at his/her home which will allow him/her to retell the story in a way that makes it interesting for his/ her audience.Every time he/she picks out an object from the bag to report the book he/she has read,there has to be a valid connection between the book and the object,which the student can first ask the audience to guess and then go ahead and explain it.This idea is spin —off on the normal show and tells and allows for an interactive book report session. E.This is one of the creative ideas for book reports in which.as the teacher, you will have to divideyour class into groups and give them one book each.The students can then read the book

几何精度设计与测试网考试题模板

[题型]单选题 [章节] [类别]练习 [题干]如下图所示标注,其中被测要素是: [选项] A.上表面 B.中心面 C.下表面 D.轴 [答案]B [解析] [难度]易 [分数]3 [子题] [子题型] [题干] [选项] [答案] [解析] [分数] [题型]单选题 [章节] [类别]练习 [题干]如下图所示标注,其中基准要素是:

[选项] A.圆柱面 B.平面 C.轴的轴线 D.孔的轴线 [答案]C [解析] [难度]易 [分数]3 [子题] [子题型] [题干] [选项] [答案] [解析] [分数] [题型]单选题 [章节] [类别]练习 [题干]如图所示标注的基准约束的自由度有几个:

[选项] A. 1个 B. 2个 C. 3个 D. 4个 [答案]C [解析] [难度]难 [分数]3 [子题] [子题型] [题干] [选项] [答案] [解析] [分数] [题型]单选题 [章节] [类别]练习 [题干]如图所示零件标注的直线度综合公差带是: [选项] A. 两平行直线之间的区域 B. 两平行平面之间的区域 C. 圆柱面内的区域 D. 四棱柱内的区域 [答案]D [解析] [难度]中 [分数]3 [子题] [子题型] [题干] [选项] [答案] [解析] [分数] [题型]单选题 [章节] [类别]练习 [题干]当孔的轴线与基准轴线之间的平行度公差为时,其轴线间的尺寸公差为:

C. D.不确定 [答案]D [解析] [难度]中 [分数]3 [子题] [子题型] [题干] [选项] [答案] [解析] [分数] [题型]单选题 [章节] [类别]练习 [题干]若某零件的同轴度要求如图所示,当测得中心线与基准轴线的最大距离x 为+,最小距离 y 为时,该零件的同轴度误差为 [选项] A. B. C. D. [答案]B [解析] [难度]中 [分数]3 [子题] [子题型] [题干] [选项] [答案] [解析] [分数] [题型]单选题 [章节] [类别]练习 [题干]某轴线的同轴度公差为?,那么该轴线的直线度公差一定不大于 [选项]

基于HALCON的模板匹配方法总结.

基于HALCON的模板匹配方法总结 基于HALCON的模板匹配方法总结 HDevelop开发环境中提供的匹配的方法主要有三种,即Component-Based、Gray-Value-Based、Shape-Based,分别是基于组件(或成分、元素)的匹配,基于灰度值的匹配和基于形状的匹配。这三种匹配的方法各具特点,分别适用于不同的图像特征,但都有创建模板和寻找模板的相同过程。这三种方法里面,我主要就第三种-基于形状的匹配,做了许多的实验,因此也做了基于形状匹配的物体识别,基于形状匹配的视频对象分割和基于形状匹配的视频对象跟踪这些研究,从中取得较好的效果。在VC下往往针对不同的图像格式,就会弄的很头疼,更不用说编写图像特征提取、模板建立和搜寻模板的代码呢,我想其中间过程会很复杂,效果也不一定会显著。下面我就具体地谈谈基于HALCON的形状匹配算法的研究和心得总结。 1. Shape-Based matching的基本流程 HALCON提供的基于形状匹配的算法主要是针对感兴趣的小区域来建立模板,对整个图像建立模板也可以,但这样除非是对象在整个图像中所占比例很大,比如像视频会议中人体上半身这样的图像,我在后面的视频对象跟踪实验中就是针对整个图像的,这往往也是要牺牲匹配速度的,这个后面再讲。基本流程是这样的,如下所示: ⑴ 首先确定出ROI的矩形区域,这里只需要确定矩形的左上点和右下点的坐标即可,gen_rectangle1()这个函数就会帮助你生成一个矩形,利用 area_center()找到这个矩形的中心;

⑵ 然后需要从图像中获取这个矩形区域的图像,reduce_domain()会得到这个ROI;这之后就可以对这个矩形建立模板,而在建立模板之前,可以先对这个区域进行一些处理,方便以后的建模,比如阈值分割,数学形态学的一些处理等等; ⑶ 接下来就可以利用create_shape_model()来创建模板了,这个函数有许多参数,其中金字塔的级数由Numlevels指定,值越大则找到物体的时间越少,AngleStart和AngleExtent决定可能的旋转范围,AngleStep指定角度范围搜索的步长;这里需要提醒的是,在任何情况下,模板应适合主内存,搜索时间会缩短。对特别大的模板,用Optimization来减少模板点的数量是很有用的;MinConstrast将模板从图像的噪声中分离出来,如果灰度值的波动范围是10,则MinConstrast应当设为10;Metric参数决定模板识别的条件,如果设为’use_polarity’,则图像中的物体和模板必须有相同的对比度;创建好模板后,这时还需要监视模板,用inspect_shape_model()来完成,它检查参数的适用性,还能帮助找到合适的参数;另外,还需要获得这个模板的轮廓,用于后面的匹配,get_shape_model_contours()则会很容易的帮我们找到模板的轮廓; ⑷ 创建好模板后,就可以打开另一幅图像,来进行模板匹配了。这个过程也就是在新图像中寻找与模板匹配的图像部分,这部分的工作就由函数 find_shape_model()来承担了,它也拥有许多的参数,这些参数都影响着寻找模板的速度和精度。这个的功能就是在一幅图中找出最佳匹配的模板,返回一个模板实例的长、宽和旋转角度。其中参数SubPixel决定是否精确到亚像素级,设为’interpolation’,则会精确到,这个模式不会占用太多时间,若需要更精确,则可设为’least_square’,’lease_square_high’,但这样会增加额外的时间,因此,这需要在时间和精度上作个折中,需要和实际联系起来。比较重要的两个参数是MinSocre和Greediness,前一个用来分析模板的旋转对称和它们之间的相似度,值越大,则越相似,后一个是搜索贪婪度,这个值在很大程度上影响着搜索速度,若为0,则为启发式搜索,很耗时,若为1,则为不安全搜索,但最快。在大多数情况下,在能够匹配的情况下,尽可能的增大其值。 ⑸ 找到之后,还需要对其进行转化,使之能够显示,这两个函数 vector_angle_to_rigid()和affine_trans_contour_xld()在这里就起这个作用。前一个是从一个点和角度计算一个刚体仿射变换,这个函数从匹配函数的

运动员最佳配对问题--实验报告

2011-2012第二学期 《算法设计与分析》期末考核 项目名称:运动员最佳配对问题

1.项目描述(10分) 羽毛球队有男女运动员各n人。 给定2 个n×n矩阵P和Q。P[i][j]是男运动员i和女运动员j配对组成混合双打的男运动员竞赛优势;Q[i][j]是女运动员i和男运动员j配合的女运动员竞赛优势。 由于技术配合和心理状态等各种因素影响,P[i][j]不一定等于Q[j][i]。男运动员i和女运动员j配对组成混合双打的男女双方竞赛优势为P[i][j]*Q[j][i]。 设计一个算法,计算男女运动员最佳配对法,使各组男女双方竞赛优势的总和达到最大。编程任务:设计一个算法,对于给定的男女运动员竞赛优势,计算男女运动员最佳配对法,使各组男女双方竞赛优势的总和达到最大。 2.算法设计(10分) 方法一:优先队列式分支限界法 具体算法: 算法开始时创建一个最大堆,用于表示活结点优先队列 堆中每个结点的val值是优先队列的优先级。 接着算法计算出图中每个顶点的最大val。 如果搜索到所搜索的排列树的叶子节点,算法即告结束。 方法二:回溯法 具体算法: 套用排列树框架,做好初始化后开始回溯,关键在于到达叶子节点时,需要计算当前的总和csum += p[i][w[i]] * q[w[i]][i],若发现csum比之前的最优值大,则更新最优值和配对顺序,回溯完成后则可得到最大总和及其相应的运动员配对方法让男队员按自己编号顺序站定,女运动员和他们搭配的各种组合就是女运动员的各种排列。因此,搜索的解空间树是“排列树”。用回溯法搜索排列树的算法框架: void backtrack (int t) { if (t>n) output(x); else for (int i=f(n,t);i<=g(n,t);i++) { x[t]=h(i); if (constraint(t)&&bound(t)) backtrack(t+1); } } 程序(50分) 方法一:分支限界法程序 # include # include # define HeapSize 60

大学英语四级信息匹配练习题

大学英语四级信息匹配练习题一 Directions: In this section, you are going to read a passage with ten statements attached to it. Each statement contains information given in one of the paragraphs. Identify the paragraph from which the information is derived. You may choose a paragraph more than once. Each paragraph is marked with a letter. 长篇阅读 Preparing for Computer Disasters A) Summary: When home office computers go down, many small businesses grind to a halt. Fortunately, taking steps to recover from disasters and minimize their effects is quite straightforward. B) Fires, power surges, and floods, they're all facts of life. We read about them in the morning paper and see them on the evening news. We sympathize with the victims and commiserate over their bad luck. We also shake our heads at the digital consequences—melted computers, system failures, destroyed data. Yet, somehow, many of us continue to live by that old mantra of denial: "It won't happen to me." Well, the truth is, at some point you'll probably have to deal with at least one disaster. That's just how it goes, and in most aspects of our lives we do something about it. We buy insurance. We stow away provisions. We even make disaster plans and run drills. But for some reason, computer disaster recovery is a blind spot for many of us. It shouldn't be. Home computers contain some of our

模板计算例题

(一) 墙模板计算示例 【例】某工程墙体模板采用组合钢模板组拼,墙高3m ,厚200mm 。钢模板采用P6015(1500mm ×600mm )和P1015(1500mm ×100mm )组拼,分两行竖排拼成。内钢楞采用2根φ48×3.5钢管,间距600mm ,外钢楞采用同一规格钢管,间距700mm ,对拉螺栓采用M16,间距600mm ×700mm 。 混凝土自重为24kN/m 3,强度等级为C30,坍落度为160mm ,采用泵送混凝土浇筑,浇筑速度为1.5m/h ,混凝土温度为20℃,用插入式振捣器振捣。 钢材抗拉强度设计值:Q235钢为215N/mm 2,普通螺栓为170N/mm 2。(对拉螺栓轴向拉力设计值查表5.2.3 P53)钢模板的允许挠度:面板为1.5mm ,钢楞为L/500mm 。(表4.4.2 P22) 试验算:钢模板、钢楞和对拉螺栓是否满足设计要求。 【解】 1. 荷载 (1) 新浇筑的混凝土对模板侧压力标准值G 4k 混凝土侧压力标准值: 71.515 20200 152000=+=+= T t 22 1 2 12101/95.505 .115.12.171.52422.022.0m kN V t F c =?????==ββγ 22/72324m kN H F c =?==γ 取两者中小值,即F 1=50.95kN/m 2。 (2) 振捣混凝土时产生的水平荷载标准值:(Q 2k ) 垂直于模板为4kN/m 2。

(3) 荷载组合 ()()2i i i 0/07.6044.195.502.19.0G m kN Q F k Q k =?+??=+='γγ 使用组合钢模板应乘以折减系数0.95。 2/07.5795.007.60m kN F =?=' 2. 钢模板验算 P6015钢模板(δ=2.5mm )截面特征,I xj =54.30×104mm 4,W xj =11.98×103mm 3。 (1) 计算简图: 化为线均布荷载: mm N F q /24.341000 600 07.571000600'1=?=?= (用于计算承载力) ; mm N F q /57.301000 600 95.5010006.02=?=?= (用于验算挠度) 。

模板匹配

halcon模板匹配 * 在一个图片中获取ROI并在此图片中匹配 dev_close_window () dev_open_window (0, 0, 600, 600, 'black', WindowHandle) * 窗口语句 read_image(Image,'L:/Halcon test/mk2.jpg') *read_image(Image,'L:/Halcon test/mk3.jpg') *read_image(Image,'L:/Halcon test/mk4.jpg') * 这里有4张图片,每一张都说明一个小问题,附图分析。 gen_rectangle1 (ROI1, 57.8333, 49.5, 181.167, 342.833) * 画一个矩形选择ROI,矩形在左上角,覆盖一个完整的,无变形规定尺寸的商标,作为模板。 reduce_domain(Image,ROI1,ImageReduced1) * 大图和这个矩形的ROI相减就会得到一个左上角的商标的图案作为模板,命名ImageReduced。 create_shape_model(ImageReduced1,0,0,rad(360),0,'no_pregeneration','use_polarity',40,10,ModelID1) * 创建一个比例不变(1:1)的匹配的轮廓模型。具体参数下个帖子说明,也可见[Halcon算子学习交流区] Halcon模版匹配算子解析。 find_shape_model(Image,ModelID1,0,rad(360),0.7,13,0.5,'interpolation',0,0.9,Row,Column,Angle,Score) * 寻找与模板的大小尺寸必须是一比一匹配的,只是角度的不同而已,若大小发生变化,则不能匹配 get_shape_model_contours(ModelContours1,ModelID1,1) * 在大图中获取匹配。 for i := 0 to |Row|-1 by 1 vector_angle_to_rigid(0,0,0,Row【i】,Column【i】,Angle【i】,HomMat2D) affine_trans_contour_xld(ModelContours2,ContoursAffinTrans,HomMat2D) endfor * 获取匹配。 disp_message (WindowHandle, '总共匹配了' + |Row| + '个商标', 'window', 12, 12, 'red', 'true') * 输出数量统计。 clear_shape_model(ModelID1) stop()

英语四级段落信息匹配题强化训练

英语四级段落信息匹配题强化训练 段落信息匹配题是四六级改革之后的新题型,很多同学还不是很熟悉,以下是小编为同学们整理的英语四级长篇阅读段落信息匹配题练习,希望对各位有所帮助。 Jaguars Don't Live Here Anymore A)Earlier this month, the United States Fish and Wildlife Service announced it would appoint" critical habitat" for the endangered jaguar. Jaguars--the world's third-largest wild cats, weighing up to 250 pounds, with distinctive black rosettes ( 玫瑰花色) on their fur--are a separate species from the smaller, tawny (黄褐色的) mountain lions, which still roam large areas of the American West in the United States and take the first steps toward mandating (批准) a jaguar recovery plan. This is a policy reversal and, on the surface, it may appear to be a victory for the conservation community and for jaguars, the largest wild cats in the Western Hemisphere. B) But as someone who has studied jaguars for nearly three decades, I can tell you it is nothing less than a slap in the face to good science. What's more, by changing the rules for animal preservation, it stands to weaken the Endangered Species Act. C)The debate on what to do about jaguars started in 1997, when, at the urging of many biologists ( including me), the Fish and Wildlife Service put the jaguar on the United States endangered species list, because there had been occasional sightings of the cats crossing north over the United States-Mexico border. At the same time, however, the agency ruled that it would not be "prudent" (谨慎的) to declare that the jaguar has critical .habitat--a geographic area containing features the species needs to survive--in the United States. Determining an endangered species' critical habitat is a first step toward developing a plan for helping that species recover. D)The 1997 decision not to determine critical habitat for the jaguar was the right one, because even though they cross the border from time to time, jaguars don't occupy any territory in our country--and that probably means the environment here is no longer ideal for them. E)In prehistoric times, these beautiful cats inhabited significant areas of the western United States, but in the past 100 years, there have been few, if any, resident breeding populations here. The last time a female jaguar with a cub ( 幼兽) was sighted in this country was in the early 1900s. F)Two well-intentioned conservation advocacy groups, the Center for Biological Diversity and Defenders of Wildlife, sued the Fish and Wildlife Service to change its ruling. Thus in 2006, the agency reassessed the situation and again determined that no areas in the United States met the definition of critical habitat for the jaguar. Despite occasional sightings, mostly within 40 miles of the Mexican border, there were still no data to indicate jaguars had taken up residence inside the United States. G ) After this second ruling was made, an Arizona rancher ( 牧场主), with support from the state Game and Fish Department, set infrared-camera (红外摄像机) traps togather more data, and essentially confirmed the Fish and Wildlife Service's findings. The cameras did capture transient jaguars, including one male jaguar, nick named Macho, B, who roamed the Arizona borderlands for more than a decade. But Macho B, now dead, might have been the sole resident American jaguar, and his extensive travels indicated he was not having an easy time surviving in this dry, rugged region. H) Despite the continued evidence, the two conservation advocacy groups continued to sue the government. Apparently, they want jaguars to repopulate the United State seven if jaguars don't wan! to. Last March, a federal district judge in Arizona ordered the Fish and Wildlife Service to revisit its 2006 determination on critical habitat. I)The facts haven't changed: there is still no area in the United States essential to the conservation of the jaguar. But, having asserted this twice already, the service, nowunder a new president, has bent to the tiresome litigation (诉讼). On Jan. 12, Fish and Wildlife officials, claimed to have evaluated new scientific information that had become available after the July 2006 ruling. They determined that it is now prudent to appoint critical habitat for the jaguar in the United States. J)This means that Fish and Wildlife must now also formulate a recovery plan for the jaguar. And since jaguars have not been able to reestablish themselves naturally over the past century, the government will likely have to go to significant expense to attempt to bring them back--especially if the cats have to be reintroduced. K)So why not do everything we can, at whatever cost, to bring jaguars back into the United States? To begin with, the American Southwest is, at best, marginal habitat for the animals. More important, there are better ways to help jaguars. South of our border, from Mexico to Argentina, thousands of jaguars live and breed in their true critical habitat. Governments and conservation groups (including the one I head) are already working hard to conserve jaguar populations and connect them to one another through an initiative called the Jaguar Corridor. L).The jaguars that now and then cross into the United States most likely come from the northernmost population of jaguars, in Sonora, Mexico. Rather than demand jaguars return to our country, we should help Mexico and other jaguar-range countries conserve the animals' true habitat it M )The recent move by the Fish and Wildlife Service means that the rare federal funds devoted to protecting wild animals will be wasted on efforts that cannot help save jaguars. It also stands to weaken the Endangered Species Act, because if critical habitat is redefined as any place where a species might ever have existed, and where you or I might want it to exist again, then the door is open for many other sense less efforts to bring back long-lost creatures. N)The Fish and Wildlife officials whose job is to protect the country's wild animals need to grow a stronger backbone--stick with their original, correct decision and save their money for more useful preservation work. Otherwise, when funds are needed to preserve all those small, ugly, non-charismatic endangered species at the back of the line, there may be no money left. 1. It is still a fact that there is no suitable place for jaguars to live safely in the United States. 2. The United States Fish and Wildlife Service should be more determined and saving for the conservation work. 3. Jaguars were regarded as endangered species because of their rare appearance at the United States-Mexico border. 4. Money was not spent effectively in helping save jaguars in the recent move by the Fish and Wildlife Service. 5. It can be inferred that the United States is not the best choice for jaguars to live from the evidence that they don't settle anywhere here.

相关文档
相关文档 最新文档