本文整理匯總了C#中OpenCvSharp.IplImage.DrawMarker方法的典型用法代碼示例。如果您正苦於以下問題:C# IplImage.DrawMarker方法的具體用法?C# IplImage.DrawMarker怎麽用?C# IplImage.DrawMarker使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類OpenCvSharp.IplImage
的用法示例。
在下文中一共展示了IplImage.DrawMarker方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: CStyleStarDetector
/// <summary>
/// Extracts keypoints by C-style code (cvGetStarKeypoints)
/// </summary>
/// <param name="img"></param>
/// <param name="cimg"></param>
private void CStyleStarDetector(IplImage img, IplImage cimg)
{
using (CvMemStorage storage = new CvMemStorage(0))
{
CvStarDetectorParams param = new CvStarDetectorParams(45);
CvSeq<CvStarKeypoint> keypoints = Cv.GetStarKeypoints(img, storage, param);
if (keypoints != null)
{
for (int i = 0; i < keypoints.Total; i++)
{
CvStarKeypoint kpt = keypoints[i].Value;
int r = kpt.Size / 2;
//Cv.Circle(cimg, kpt.Pt, r, new CvColor(0, 255, 0));
//Cv.Line(cimg, new CvPoint(kpt.Pt.X + r, kpt.Pt.Y + r), new CvPoint(kpt.Pt.X - r, kpt.Pt.Y - r), new CvColor(0, 255, 0));
//Cv.Line(cimg, new CvPoint(kpt.Pt.X - r, kpt.Pt.Y + r), new CvPoint(kpt.Pt.X + r, kpt.Pt.Y - r), new CvColor(0, 255, 0));
cimg.DrawMarker(kpt.Pt.X, kpt.Pt.Y, CvColor.Green, MarkerStyle.CircleAndTiltedCross, kpt.Size);
}
}
}
}