03 2014 档案

摘要:#include "book3_6.h"//#define CloseTime 600EventList ev; //事件表Event en; //事件LinkQueue q[5]; //4个客户队列QElemType customer; //客户记录int TotalTime,CustomerNum; //累积客户逗留时间,客户数int Minimum(LinkQueue q[]){ int l[5]; for (int i=1; il[2]?2:1; int b = l[3]>l[4]?4:3; return l[a]>l[b]?b:a;}void Ope. 阅读全文
posted @ 2014-03-27 19:07 匡子语 阅读(1954) 评论(0) 推荐(0) 编辑
摘要:#includevoid hanoi(int n,char x,char y,char z){ static int c = 0; if(n==1) printf("%d. Move disk %d form %c to %c\n", ++c,n,x,z); else { hanoi(n-1,x,z,y); printf("%d. Move disk %d form %c to %c\n", ++c,n,x,z); hanoi(n-1,y,x,z); }}void main(){ hanoi(8,'A'... 阅读全文
posted @ 2014-03-25 21:21 匡子语 阅读(289) 评论(0) 推荐(0) 编辑
摘要:#include#include using namespace std;typedef int Status;const int TRUE=1;const int FALSE=0;const int OK=1;const int ERROR=0;const int INFEASIBLE=-1;const int overflow=-2;const int STACK_INIT_SIZE=100;const int STACKINCREMENT=10;typedef struct{ char *base; char *top; int stacksize;}SqStack;/... 阅读全文
posted @ 2014-03-25 14:50 匡子语 阅读(318) 评论(0) 推荐(0) 编辑
摘要:括号配对题 判断(){}[]的出现是否匹配 用Stack实现#include#include using namespace std;typedef int Status;const int TRUE=1;const int FALSE=0;const int OK=1;const int ERROR=0;const int INFEASIBLE=-1;const int overflow=-2;const int STACK_INIT_SIZE=100;const int STACKINCREMENT=10;typedef struct{ char orinal; char ma... 阅读全文
posted @ 2014-03-24 13:00 匡子语 阅读(266) 评论(0) 推荐(0) 编辑
摘要:http://blog.csdn.net/lichengyu/article/details/8457425 阅读全文
posted @ 2014-03-12 22:40 匡子语 阅读(227) 评论(0) 推荐(0) 编辑
摘要:IplImage* contours_rect;IplImage* contours;CvMemStorage* countours_storage=NULL; if(contours_rect==NULL) { contours_rect=cvCreateImage(cvSize(video_width,video_height),IPL_DEPTH_8U,1); } if(contours==NULL) { contours=cvCreateImage(cvSize(video_width,video_height),IPL_DEP... 阅读全文
posted @ 2014-03-03 22:34 匡子语 阅读(391) 评论(0) 推荐(0) 编辑
摘要:边缘连接以下连接间断点的算法:1.“非最大”抑制。在沿边缘方向追踪边缘点时,不被看作边缘点要进行抑制(设为0),这样最后输出的图像边缘比较细,具体操作时可使用形态学算法进行细化处理。2.“滞后”处理。若使用单阈值 ,假定轮廓的平均灰度等于T ,由于噪声影响,轮廓上的有些点的灰度会小于T ,同样,有些点的灰度会高于T ,必然会造成轮廓的中断。为了避免这种情况出现,“滞后”处理使用一高一低两个阈值。图像中任意一点,只要其梯度大于T1 ,都被假定为边缘点,并立即标记,和该点相连的任意点只要其梯度大于T2 ,也被作为边缘点进行标记。因此,跟踪一个边缘,首先应该以梯度大于T1 的点开始,在遇到梯度小于T 阅读全文
posted @ 2014-03-01 20:21 匡子语 阅读(1795) 评论(0) 推荐(0) 编辑