摘要
OpenGL和OpenCV特有开源库函数被用于图像变换,显示了高效、便捷性。文章面向纹理贴图应用,对位图文件结构进行了详尽解析;依据图像颜色点阵数据,用C++结合OpenCV编写了位图镜像变换程序。通过调用OpenCV库函数,所编镜像变换程序代码更简单,功能更完备,不仅可被用于处理*.bmp格式图片,还能被用于处理*.jpg,*.png,*.webp,*.pbm,*.pgm,*.sr,*.ras,*.tiff,*.tif等格式图片。基于OpenCV函数库,易于快速编程实现各种图像变换且效果较好,为进一步应用研究打下了基础。
Efficient and convenient image transformation could be performed by using the unique OpenGL and OpenCV open source functions.For texture mapping applications,the structure of a bitmap-file was analyzed in detail.On the basis of image color dots matrix data,a bitmap image flipping transformation program was written with C++combined with OpenCV.By calling the OpenCV library functions,the codes of the program written became shorter and simpler,and the program had more universal functions.The written program could not only be used to process*.bmp formats pictures,and could also be used to process*.jpg,*.png,*.webp,*.pbm,*.pgm,*.sr,*.ras,*.tiff and*.tif format pictures.Based on the OpenCV function library,it was easy to program efficiently and had good effect,which laid a good foundation for further research.
作者
何杰
王大立
袁红
姜国平
He Jie;Wang Dali;Yuan Hong;Jiang Guoping(College of Chemistry and Chemical Engineering,Beifang Minzu University,Yinchuan 750021,China;Physical Education University,LanZhou City University,Lanzhou 730070,China)
出处
《无线互联科技》
2021年第6期48-50,共3页
Wireless Internet Technology
基金
国家民委重点实验室项目
项目编号:15-150070(69#)
宁夏自然科学基金项目
项目编号:2020A0661
兰州市科技局项目
项目编号:2019-RC-104
校企合作项目
项目编号:2019640001000097。
关键词
图形学编程
镜像
像素读写
位图
OPENCV
化工仿真
虚拟现实
graphics programming
mirror image
pixel data reading and writing
Bitmap
OpenCV
chemical simulation
virtual reality