/*-----------------------------------------------------------------------------
*
* 版权声明:
* 可以任意转载,转载时请务必以超链接形式标明文章原始出处和作者信息及本声明
* http://www.cnblogs.com/yuliyang/
* 联系方式:
* Mail:yuliyang@qq.com
*
*-----------------------------------------------------------------------------*
上测试代码:
/* * ===================================================================================== * * Filename: testclass.cpp * Environment: * Description: CV_SR4K类的简单测试 * * * Version: 1.0 * Created: 2013/11/9 10:01:01 * Author: 余礼杨 * * Mail: wzyuliyang911@gmail.com * Blog: http://www.cnblogs.com/yuliyang * * ===================================================================================== */ #include "CV_SR4K.hpp" int main(){ int c; IplImage * image1=cvCreateImage(cvSize(176,144),IPL_DEPTH_8U,3); IplImage * image2=cvCreateImage(cvSize(176,144),IPL_DEPTH_8U,1); CV_SR4K sr4; while (1) { sr4.GetDistanceImageandAmplitudeImage(); image1=sr4.Cv_image[0]; image2=sr4.Cv_image[1]; cvShowImage("1",image1); cvShowImage("2",image2); c=cvWaitKey(10); if ((char) c == 27) { break; } } sr4.CloseSR(); return 0; }