摘要
针对目前利用Visual Studio同时调用OpenCV与MATLAB进行图像处理时,配置复杂、编译繁琐、封装困难等问题,利用执行文件的调用和文本文件的编写,提出一种简单有效的图像处理混合编程的方法.分别使所调用OpenCV的C++文件与MATLAB的M文件编译成EXE可执行文件,参数传递用文本文件的读写来运行;再利用Visual Studio的MFC应用程序框架编写界面,通过编译好的能够运行的文件完成程序的编写.实验结果证明,该方法无需复杂配置,编译封装简单,保证了程序代码的保密性.
To solve the problems of complex configuration, compilation with too many trivial details and encapsulation difficulties in the present use of Visual Studio calling OpenCV and MATLAB in image processing, we propose a simple and effective method of hybrid programming that uses call of the executable file and writing text file.It compiles the C++ file of OpenCV and M file of MATLAB to an EXE one,performs parameter passing by the read-write of text file,then utilizes the MFC application framework written interface of Visual Studio to complete the writing of the program by calling the compiled executable file.Experimental results show that the method can not only simplify the compilation and encapsulation but also ensure the portability of the program code without complex configuration.
出处
《军械工程学院学报》
2015年第5期52-56,共5页
Journal of Ordnance Engineering College
基金
国家自然科学基金项目(51307183)