// TestSaveMat.cpp : Defines the entry point for the console application.
//
#include "stdafx.h"
#include <cv.h>
#include <cvcam.h>
#include <cxcore.h>
#include <highgui.h>
#pragma comment(lib,"cv.lib")
#pragma comment(lib,"cvcam.lib")
#pragma comment(lib,"cxcore.lib")
#pragma comment(lib,"highgui.lib")
int main(int argc, char* argv[])
{
//创建矩阵
CvMat *pMat = cvCreateMat(500,500,CV_32F);
cvSetIdentity(pMat);
//显示矩阵
cvNamedWindow("Show");
cvShowImage("Show",pMat);
//保存矩阵
cvSave("pMat.xml",pMat);
cvWaitKey();
//释放资源
cvReleaseMat(&pMat);
cvDestroyWindow("Show");
return 0;
}