MCPcopy Create free account
hub / github.com/DennisLiu1993/Fastest_Image_Pattern_Matching / RefreshDstView

Method RefreshDstView

MatchTool/MatchToolDlg.cpp:396–420  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

394
395}
396void CMatchToolDlg::RefreshDstView ()
397{
398 HWND hWnd = (HWND)cvGetWindowHandle ("DstView");
399 if (!hWnd || m_matDst.empty ())
400 return;
401 CWnd* pWnd = CWnd::FromHandle (hWnd);
402 CDC* dc = pWnd->GetDC ();
403 CRect rect;
404 //將背景繪製上白色網格
405 CBrush brush (HS_DIAGCROSS, RGB (200, 200, 200));
406 ::GetWindowRect (GetDlgItem (IDC_STATIC_DST_VIEW)->m_hWnd, rect);
407 ScreenToClient (rect);
408 dc->FillRect (CRect (0, 0, rect.Width (), rect.Height ()), &brush);
409
410
411 Mat matResize;
412 Size size (int (m_dDstScale * m_matDst.cols), int (m_dDstScale * m_matDst.rows));
413 resize (m_matDst, matResize, size);
414 imshow ("DstView", matResize);
415 resizeWindow ("DstView", size.width, size.height);
416
417 ::ShowWindow (hWnd, SW_SHOW);
418 LearnPattern ();
419 pWnd->ReleaseDC (dc);
420}
421void CMatchToolDlg::DrawDashLine (Mat& matDraw, Point ptStart, Point ptEnd, Scalar color1, Scalar color2)
422{
423 LineIterator itLine (matDraw, ptStart, ptEnd, 8, 0);

Callers

nothing calls this directly

Calls 2

WidthMethod · 0.80
HeightMethod · 0.80

Tested by

no test coverage detected