/********************************************************************************************************************************************
创建矩阵,在上面一个圆和一个矩形,然后显示出来
*******************************************************************************************************************************************/
void exam11( )
{
//CvMat* mat = cvCreateMatHeader( 500, 500, CV_32FC1 );
//cvCreateData( mat );
CvMat* mat = cvCreateMat( 500, 500, CV_32FC1 );
cvCircle( mat, cvPoint( 250,250 ), 100, CV_RGB(255,255,255), 5);
cvRectangle(
mat,
cvPoint( 200,200 ),
cvPoint( 300, 300 ),
cvScalar( 0xff, 0xff, 0xff ),//Red//bgr
3
);
cvNamedWindow( "Example1", CV_WINDOW_AUTOSIZE );
cvShowImage( "Example1", mat);
cvSaveImage( "22.jpg", mat );
cvWaitKey( 0 );
cvReleaseMat( &mat );
cvDestroyWindow( "Example11" );
}