04 2013 档案
摘要:IplImage* cvGetSubImage(IplImage *image, CvRect roi){IplImage *result;// 设置 ROIcvSetImageROI(image,roi);// 创建子图像result = cvCreateImage( cvSize(roi.width, roi.height), image->depth, image->nChannels );cvCopy(image,result);cvResetImageROI(image);return result;}
阅读全文
摘要:voidBitMatToWnd(CWnd* pWnd, cv::Mat img, CRect *Roi){ if(img.empty()) return; CRect drect; pWnd->GetClientRect(drect); //(drect); (&drect); 两种方式均可,竟然 CClientDC dc(pWnd); HDC hDC =dc.GetSafeHdc(); //内存中的图像数据拷贝到屏幕上 BYTE *bitBuffer = NULL; BITMAPINFO *bitMapinfo =...
阅读全文
摘要:opencv\modules\core\include\opencv2\core\version.hpp修改:#define CV_MAJOR_VERSION 2#define CV_MINOR_VERSION 4#define CV_SUBMINOR_VERSION 0opencv配置:opencv\cmake目录下
阅读全文
摘要:创建:CMFCPropertyGridCtrl m_wndPropList ;CRect rectDummy;rectDummy.SetRectEmpty ();if (!m_wndPropList .Create (WS_VISIBLE | WS_CHILD, rectDummy, this, 1)){ TRACE0("Failed to create Properies Grid \n"); return -1; // fail to create}m_wndPropList.EnableHeaderCtrl (FALSE);//标头m_wndPropList.Enab
阅读全文
摘要:1) 在View中获得Doc指针 CYourSDIDoc *pDoc=GetDocument();一个视只能有一个文档。 2) 在App中获得MainFrame指针 CWinApp 中的 m_pMainWnd变量就是MainFrame的指针 也可以: CMainFrame *pMain =(CMainFrame *)AfxGetMainWnd(); 3) 在View中获得MainFrame指针 CMainFrame *pMain=(CmaimFrame *)AfxGetApp()->m_pMainWnd; 4) 获得View(已建立)指...
阅读全文