摘要
目前高校计算机视觉实验面临台套数不够和灵活性不足的问题,且多侧重于利用计算机对图像进行处理,而忽略了计算机视觉中的“视觉”二字。针对该问题,开发了一个基于OpenCV和OpenGL的计算机视觉虚拟实验室。具体实现过程如下:首先,采用OpenGL进行虚拟相机标定和虚拟场景构建;在确定实验内容后,采用OpenCV建立对虚拟环境中的图像进行处理的模块并采用Qt开发一个便于用户操作的图形用户界面;为了完成上述3个模块的联立,利用Python将OpenGL、OpenCV和Qt组成一个工作流;最后,将程序打包成.exe文件,并进行测试。该软件在64 bit Windows操作系统中运行流畅,图像处理速度为ms量级。该实验室打破了以教师为主导的教学模式,有利于培养学生的探究能力和创新精神,对实验教学改革具有较好的促进作用。
At present,computer vision experiments in colleges and universities are faced with the problems of insufficient number of sets and lack of flexibility,and mostly focus on how to use computers to process images,while ignoring the word“vision”in computer vision.To solve these problems,a computer vision virtual laboratory based on OpenCV and OpenGL is developed in this paper.The implementation process is as follows:firstly,OpenGL is used to calibrate the virtual camera and construct the virtual scene;after determining the content of the experiment,OpenCV is used to establish a module to process the images in the virtual environment and Qt is used to develop a graphical user interface that is convenient for users to operate.In order to complete the synchronization of the above three modules,Python is used to form a workflow of OpenGL,OpenCV and Qt.Finally,the program is packed into an.exe file and tested.The software runs smoothly in 64-bit Windows operating system,and the image processing speed is in the order of milliseconds.The laboratory breaks the teacher-led teaching mode,is conducive to the cultivation of students’inquiry ability and innovative spirit,and is of great practical significance to experimental teaching.
作者
陶镛泽
郭天太
胡佳成
吴晓康
王雅婷
TAO Yongze;GUO Tiantai;HU Jiacheng;WU Xiaokang;WANG Yating(College of Measurement and Test Engineering,China Jiliang University,Hangzhou 310018,China)
出处
《实验室研究与探索》
CAS
北大核心
2021年第4期108-114,共7页
Research and Exploration In Laboratory
基金
浙江省研究生教育学会重点课题:(2018-004)
浙江省高等教育“十三五”教学改革项目(jg20190195)。