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

Method DrawDashLine

MatchTool/MatchToolDlg.cpp:421–444  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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);
424 int iCount = itLine.count;
425 bool bOdd = false;
426 for (int i = 0; i < iCount; i+=1, itLine++)
427 {
428 if (i % 3 == 0)
429 {
430 //白色BGR
431 (*itLine)[0] = (uchar)color2.val[0];
432 (*itLine)[1] = (uchar)color2.val[1];
433 (*itLine)[2] = (uchar)color2.val[2];
434 }
435 else
436 {
437 //紅色BGR
438 (*itLine)[0] = (uchar)color1.val[0];
439 (*itLine)[1] = (uchar)color1.val[1];
440 (*itLine)[2] = (uchar)color1.val[2];
441 }
442
443 }
444}
445void CMatchToolDlg::DrawMarkCross (Mat& matDraw, int iX, int iY, int iLength, Scalar color, int iThickness)
446{
447 if (matDraw.empty ())

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected