// Draw a rectangle
# Include "stdafx. h "# include" highgui. h "# include" cv. h "int _ tmain (int argc, _ TCHAR * argv []) {cvNamedWindow (" ShowImage ", CV_WINDOW_AUTOSIZE); // create a 100*100 matrix, reset zero IplImage * image = cvCreateImage (cvSize (100,100), IPL_DEPTH_8U, 3); cvZero (image); cvRectangle (image, cvPoint (10, 10), cvPoint (60, 60), cvScalar (0,255, 0), 1); cvShowImage ("ShowImage", image); cvWaitKey (0); cvReleaseImage (& image); cvDestroyWindow ("ShowImage "); return 0 ;}# include "stdafx. h "# include" highgui. h "# include" cv. h "int _ tmain (int argc, _ TCHAR * argv []) {cvNamedWindow (" ShowImage ", CV_WINDOW_AUTOSIZE); // create a 100*100 matrix, reset zero IplImage * image = cvCreateImage (cvSize (100,100), IPL_DEPTH_8U, 3); cvZero (image); cvRectangle (image, cvPoint (10, 10), cvPoint (60, 60), cvScalar (0,255, 0), 1); cvShowImage ("ShowImage", image); cvWaitKey (0); cvReleaseImage (& image); cvDestroyWindow ("ShowImage "); return 0 ;}