基于二维元胞自动机的交通流模拟分析
二维元胞自动机 基于二维元胞自动机的交通流模拟分析44http://xbbjb.swu.cn38St(i,j)=F[S(i,j),S,(i-1,j),S,(i+1,j),S,(i,j-1),S,(i,j+1)](1)BMI(1)BMIT=4t=341843.2/(N×N)NXN(AJAVAT=232×32,64×64,128128,256×256,512×512,T=4128×128MATLAB01100002000∷;酸(a)暂念的渐近状态(b)暂心的阻塞状态3128×128128×128C1994-2013CHinaAcademicJOurnalElectronicPublishingHouse.Allrightsreservedhttp://www.cnki.net643平均速度与密度关系图1.0平均速度曲线L32×320L=64x=128×1280808=256×2560.7512x512060.6053.330H040.30.20.2w0.10152253035404500.2040.6081.012141.61820密度/时间步10T=25128×1280.34.3BMLT0.80.60.4502eBMI02515密度/6128×128BMI(T-2T-4)BMIBMI[1 NAGEL K, SCHRECKENBERG M. A Cellular Automaton Model for Freeway Traffic [J]. Journal of Physique, 19922:221-2292 HAM O, MIDDLETON AA, LEVINE D. Self-Organization and a Dynamical Transition in Traffic Flow Models [J]Physical Review E, 1992(10):6124-6127L3 FUKUI M. ISHIBASHI Y. Traffic Flow in 1D Cellular Automaton Model Including Cars Moving with High Speed LJJ996,65(6):1868-1872005,54(10):4621-4626,2010,10(2):122-128C1994-2013cHinaAcademicJournalElectronicPublishingHouse.Allrightsreservedhttp://www.cnki.net46http://xbbjb.swu.cn38On Simulation and analysis on Traffic Flow Based onTwo-Dimensional Cellular automationMEI Hong, CHENG WeiZHANG Yun-sheng, YU Peng-cheng1. Faculty of Continuing Education, Kunming University of Science and Technology, Kunming 650051, China;2. Faculty of Transportation Engineering, Kunming University of Science and Technology, Kunming 65005 1, ChinaFaculty of Information Engineering and Automation, Kunming University cf Science and Technology, Kunming 650051. China4. Computer Center, Kunming University of Science and Technology, Kunming 650051. ChinaAbstract: BML model is a two-dimensional cellular automata model, which is especially used to simulateand analy ze the traffic system. We use Java language to implement this model. With this model, the re-ationship between the average velocity and the average density has been found by computer simulationThe phase transition and self organization have also been faund. And at last, the bml model improved intraffic light cycle changes for exploring more valuable to the research and applicationKey words: two-dimensional cellular automation; traffic flow; BML modelC1994-2013CHinaAcademicJOurnalElectronicPublishingHouse.Allrightsreservedhttp://www.cnki.net
- 2020-12-11下载
- 积分:1
OpenCV中文参考手册
OpenCV中文参考文件,应用程序接口(API)中文参考资料al OpenCV参考手册·ΩpencⅤ编程简介(矩阵/图像/姒频的基本·Ω中文参考手册读写操作)入门必读· OpenCV概述1.图像处理2.结构分析CXCore中文参考手册3.运动分析与对象跟踪4.模式识别1.基础结构5.照相机定标和三维重建2.数组操作3.动态结构HgGU中文参考手册4.绘图函数5.数椐保存和运行时类型信息1. HighGUI概述6,其它混合函数2.简单图形界面7.錯误处理和系统函数3.读取与保存图傯4.视频读写数机器学习中文参考手册5.实用涵数与系统函数OpencⅤ编码样式指南(阅读 Opencv代码前必CIMage类参考手册读CiMage中的陷阱和BUGOpenCV的Phon接口Opengν编程简介(矩阵/图像/视频的基本读写操作)Wikipedia,自由的百科全书Introduction to programming with OpenCVOpencv编程简介作者: Gady AgamDepartment of Computer ScienceJanuary 27, 2006Illinois Institute of TechnologyUrl:http://www.cs.it.edu/ragam/cs512/lect-notes/opency-intro/opency-intro. html#SECTION00040000000000000000翻译: chenyusiyuanJanuary 26, 2010.http:/blog.csdn.net/chenyusiyuan/archive/2010/01126/5259060.aspx摘要:本文旨在帮助读者快速入门 Openc,而无需阅读冗长的参考手册。掌握了 Opencv的以下基础知识后,有需要的话再查阅相关的参考手册。目录[原]1二、简介o1.11、 Openc的特点1.1.1(1)总体描述(2)功能113(3) OpenCv模块122、有用的学习资源2.1(1)参考手册;122(2)网络资源1.23(3)书籍124(4)视瓶处理例程(在< openly-root>/ samples/c/)125(5)图像处理例程(在< openly-root>/ samples/c/0133、 openc命名规则2(2)矩阵数据类型:■1.33(3)图像数据类型134(4)头文件:o144、编译建议.14.1(lInux;1.4.2(2) Windowso155、C例程2二、GUI指令2.11、窗口管理2.1.1(1)创建和定位一个新窗口∶2.12(2)载入图像2.13(3)显示图後2.14(4)关团窗口2.15(5)改变窗o222、输入处理2.2.1(1)处理鼠标事件222(2)处理键盘事件■2.23(3)处理滑动条事件·3三、 OpenCV的基本数据结构o3.11、图像数据结构3.1.1322、知阵与向量3.2,1(1)矩阵3232).元批333、其它结构类型33.1(1)点332(2)矩框大小(以像素为精度)∵■333(3)矩形框的偏置和大4四、图像处理4,11、图像的内存分配与释放411(1)分配内存给一幅新图像4.1.2(2)释放图像■4.13(3)复制图像414(4)设置/获取感兴趣区域ROI415〈5)设置/获取感兴趣通道COI422、图像读写4.2,1(1)从文件中读入图像4.2.2(2)保存图o433、访回图像像素4.3.1(1)假设你要访间第k通道、翦列的像素43,2(2)间接访间;(通用,但效可访间任意格式的图像)433(3)直接访间:(效率高,但容易岀错)434(4)基于指针的直接访闻:(简单高效435(5)基于c++ wrapper的直接访间(更简单高效a444、图像转换441(1)字节型图像的灰度-彩色转换442(2)彩色图像->灰度图像44不同彩色空间之间的转換a455、绘图指令4.5,1(1)绘制矩形452(2)绘制圆形45.3(3)绘制线段454(4)绘制一组线段455(5)绘制组填充颜色的多边形:456(6)文本标注5五、矩阵处理o5,11、矩阵的内存分配与释放32(3)为新矩阵分配达存释放矩阵内存514(4)复制矩阵5,15(5)初始化矩阵5.1.6(6)初始化矩阵为单位矩阵522、访回矩阵元焘52.1(1)假设需要访间一个2D浮点型矩阵的第(i,j个单元,5.2.2(2)间接访间5.23(3)直接访间(假设矩阵数据按4宰节行对齐)524(4)直接访间(当数据的行对齐可能存在间隙时 possible alignment gaps)5,25(5)对于初始化后的矩阵进行直接i°533、矩阵/向量运算5.3,1(1)矩阵之间的运算532(2)矩阵之间的元素级运算:53,3(3)向量乘积534(4)单一矩阵的运535(5)非齐次线性方程求解■536(6)特征債与特征向量(矩阵为方阵)6六、视频处理611、从视频流中捕捉一帧画面61.2(2)Y支从摄像头或视频文件(AM格式)中捕捉帧画面6,11(1)open个摄像头捕捉器6,1,3(3)初始化一个祕频文件捕捉器614(4)捕捉一帧画面61.5(5)释放视频流捕捉o622、获取/设置视频流信息6,2.1(1)获取视频流设备信息6,2,2(2)获取帧图信息6,23(3)设置丛视频文件抓取的第一帧画而的位置∵633、保存视频文件6.3,1(1)初始化视频编写器6.3,2(2)保持视频文件63)释放视频编写器[编辑]简介[编辑]1、 OpenCV的特点[编辑](1)总体描述· Opencv是一个基于CC++语言的开源图像处理函数库其代码都经过优化,可用于实时处理图像具有良好的可移植性可以进行图像/视频载入、保存和采集的常规操作具有低级和高级的应用程序接口(API·提供了面向 Intel IPP高效多媒体函数库的接口,可针对你使用的 Intel CPU优化代码,提高程序性能(译注: OpenC2.0版的代码已显著优化,无需IPP来提升性能,故2.0版不再提供IPP接口)[编辑(2)功能图像数据操作(内存分配与释放,图像复制、设定和转换)Image data manipulation (allocation, release, copying, setting, conversion·图像/视频的输入输出(支持文件或摄像头的输入,图像/视频文件的输出)Image and video I/o (file and camera based input, image/video file output).矩阵/向量数据操作炇线性代数运算(矩阵乘积、矩阵方程求解、特征值、奇异值分解)Matrix and vector manipulation and linear algebra routines(products, solvers, eigenvalues, SVD)支持多种动态数据结构(链表、队列、数据集、树、图)Various dynamic data structures(lists, queues, sets, trees, graphs)·基本图像处理(去噪、边缘检测、角点检测、采样与插值、色彩变換、形态学处理、直方图、图像金字塔结构)Basic image processing(filtering, edge detection, corner detection, sampling and interpolation, colorconversion, morphological operations, histograms, image pyramids)·结构分析(连通域/分支、轮廓处理、距离转换、图像矩、模板匹配、霍夫变换、多项式逼近、曲线拟合、椭圆拟合、狄劳尼三角化)Structural analysis(connected components, contour processing distance transform, various momentstemplate matching, Hough transform, polygonal approximation, line fitting, ellipse fitting, Delaunaytriangulation).·摄像头定标(寻找和跟踪定标模式、参数定标、基本矩阵估计、单应矩阵估计、立体视觉匹配)Camera calibration(finding and tracking calibration patterns, calibration, fundamental matrixestimation, homography estimation, stereo correspondence).·运动分析(光流、动作分割、目标跟踪)Motion analysis(optical flow, motion segmentation, tracking)目标识别(特征方法、HMM模型Object recognition(eigen-methods HMM)基本的GUI(显示图像/视频、键盘/鼠标操作、滑动条)Basic Gui (display image/ video keyboard and mouse handling, scroll-bars)图像标注(直线、曲线、多边形、文本标注)Image labeling(line, conic, polygon, text drawing[编辑](3) Opencvi模块cv-核心函数库Vaux-辅助函数库:e0机数线性代数作m|-机器学习函数库[编辑]2、有用的学习资源[编辑](1)参考手册:< opencv-root>/ docs/index. htm(译注:在你的 OpenCV安装目录< opencv-root>内)[编辑](2)网络资源:Etkmi:http:/www.intel.com/technology/computing/opencvl[编辑](3)书籍:Open Source Computer Vision Libraryby Gary R Bradski, Vadim Pisarevsky, and Jean-Yves Bouguet, Springer, 1st ed. (June, 2006)chenyusiyuan:补充以下书籍Learning OpenCV -Computer Vision with the OpenCV Libraryby Gary Bradski Adrian Kaehler, O Reilly Media, 1 st ed(September, 2008)OpenCv教程——一基础篇作者:刘瑞祯于仕琪,北京航空航天大学出版社,出版日期:200706(4)视频处理例程(在< opencv-root>/ samples/c/):·颜色跟踪: camshiftdemo点跟踪:| kemo动作分割: motel边缘检测: laplace[编辑](5)图像处理例程(在< opencv-root>/ samples/c/)边缘检测:edge图像分割: pyramid_ segmentation形态学: morphology直方图: demist距离变换: distrains椭圆拟合: fitellipse[编辑]3、 OpenCv命名规则[编辑](1)函数名CvActionTargetMod(.)Act⊥cn=核e functionality)(e.g. set, create)Targettarget image area) (e, g. contour, polygon)Modih (optional modifiers) (e.g. argument type)[编辑](2)矩阵数据类型:CV_(SIUIF)Cs=符号整型UE,q.:Cv_8UC1是指_个8位无符号整型单通道矩阵CV 32FC2是指一个32位浮点型双道道矩阵[编辑](3)图像数据类型:IPL_DEPTH_⊥nc1ude< VAux.h>include inc⊥ ude sinclude /一般不需要,cv,h内已包含该头文件[编辑]4、编译建议[编辑](1)Linux:g++ helloworld. cpp-o hello-worldI /usr/local/include/opencv -L /usr/local/liblm-Icv-highqui-Icvaux[编辑](2)Windows在Ⅵ visual studio的选项和项目牛设置好 OpenCv相关文件的路径。[编]5、C例程hello-worid. cpp/该程序从文件中读入一幅图像,将之反色,然后显示出来⊥nc1udeinclude ⊥nc1ude#include #include highgui.h>int main (int argc, char argv[IplImage* img=0int height, width, step, channelsuchar *datai. i,i,kif(argcheight iwidthimg->widthStepimg->widthstep ichannelsimg->channelsdata(uchar *)img->imageData iprint f("Processing a dx%d image with d channels", height, width, channels)create a windowcvNamedwindow("mainwin CV WINDOW AUTOSIZEcvMoveWindow ("mainwin", 100, 100)t the image相当于 caNot(img);for(i-o; isheighti 1++) for(j=; j
- 2020-12-10下载
- 积分:1