本文整理汇总了C#中CvPoint2D32f.Select方法的典型用法代码示例。如果您正苦于以下问题:C# CvPoint2D32f.Select方法的具体用法?C# CvPoint2D32f.Select怎么用?C# CvPoint2D32f.Select使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CvPoint2D32f
的用法示例。
在下文中一共展示了CvPoint2D32f.Select方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: DrawChessboardCornerFrame
/// <summary>
/// チェスボードコーナーの過度の四点を結ぶ四角形を描画します
/// </summary>
/// <param name="mat"></param>
/// <param name="pattern_size"></param>
/// <param name="corner"></param>
/// <param name="color"></param>
public static void DrawChessboardCornerFrame(CvMat mat, CvSize pattern_size, CvPoint2D32f[] corner, CvScalar color)
{
CvPoint2D32f[] points = new CvPoint2D32f[] { corner[0], corner[pattern_size.Width - 1], corner[pattern_size.Width * pattern_size.Height - 1], corner[(pattern_size.Height - 1) * pattern_size.Width] };
mat.DrawPolyLine(new CvPoint[][] { points.Select(p => new CvPoint((int)Math.Round(p.X), (int)Math.Round(p.Y))).ToArray() }, true, color, 1, LineType.AntiAlias);
}
示例2: drawUndistortedCornerFrame
void drawUndistortedCornerFrame(CvMat displayMat, CvPoint2D32f[] corners, CvSize boardSize)
{
CvMat cornerMat = new CvMat(1, corners.Length, MatrixType.F32C2);
CvEx.FillCvMat(cornerMat, corners.Select(x => new CvScalar(x.X, x.Y)).ToList());
CvMat undistMat = CvEx.InitCvMat(cornerMat);
Cv.UndistortPoints(cornerMat, undistMat, this.UndistortionData.CameraStruct.CreateCvMat(), this.UndistortionData.DistortStruct.CreateCvMat(true), null, this.UndistortionData.CameraStruct.CreateCvMat());
CvEx.DrawChessboardCornerFrame(displayMat, boardSize, undistMat.Select(x => new CvPoint2D32f(x.Val0, x.Val1)).ToArray(), new CvScalar(216, 216, 216));
}