예제 #1
0
파일: EVOpenDlg.cpp 프로젝트: douzsh/douzsh
void EVOpenDlg::CopyImage( HANDLE hBitmap,TW_IMAGEINFO& info )
{//处理扫描仪数据
	if ( info.SamplesPerPixel!=3 )
	{
		MessageBox("请使用彩色扫描");
		return;
	}
	CDIB dib;
	dib.CreateFromHandle(hBitmap,info.BitsPerPixel);
	CString tmpName=_T("tmp.bmp");
	TCHAR    tmpPath[_MAX_PATH+1];
	GetTempPath(_MAX_PATH,tmpPath);
	tmpName.Insert(0,tmpPath);
	dib.SaveDIB(tmpName,CDIB::BMP);
	IplImage* pImage = cvLoadImage(tmpName.GetBuffer());
	UpdateScan(pImage);
	cvReleaseImage(&pImage);//*/
	return;
}
예제 #2
0
 // refactoring for Cactus
 const CircleLSQ * FindBest() {
   UpdateScan();
   return _FindBest();
 }