Exemplo n.º 1
0
void  CvvImage::CopyOf( CvvImage& image, int desired_color )
{
   IplImage* img = image.GetImage();
   if( img )
   {
      CopyOf( img, desired_color );
   }
}
Exemplo n.º 2
0
void TestCV2()
{
		const char *pszImg = "E:\\02C-2C\\64965输出\\64965_2.tif";
		const char *pszImg2 = "C:\\Documents and Settings\\Administrator\\My Documents\\My Pictures\\桌面背景\\PrimulaRed.jpg";
		const char *pszImg3 = "D:\\data717\\原始影像\\ZY02C_HRC_E116.7_N40.0_20120201_L1C0000161390.tiff";
		CvvImage cvimg;
		CvRect rect = cvRect(100,100,500,500);
		cvimg.LoadRect(pszImg2,1,rect);
		//cvNamedWindow("TestOpenCVandGdalWnd",CV_WINDOW_AUTOSIZE);
		//cvimg.Show("TestOpenCVandGdalWnd");
		
		IplImage * img =cvimg.GetImage();
		if (img ==NULL)
		{
			printf("构建图像失败!");
			return;
		}
	
		cvNamedWindow("TestOpenCVandGdalWnd",CV_WINDOW_AUTOSIZE);
		cvShowImage("TestOpenCVandGdalWnd",img);
		cvWaitKey();
}