当前位置: 首页>>代码示例>>C#>>正文


C# Emgu.Copy方法代码示例

本文整理汇总了C#中Emgu.Copy方法的典型用法代码示例。如果您正苦于以下问题:C# Emgu.Copy方法的具体用法?C# Emgu.Copy怎么用?C# Emgu.Copy使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Emgu的用法示例。


在下文中一共展示了Emgu.Copy方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: OnFrame

    protected override void OnFrame(Parsley.Core.BuildingBlocks.FrameGrabber fp, Emgu.CV.Image<Emgu.CV.Structure.Bgr, byte> img) {
      if (_take_texture_image) {
        _take_texture_image = false;
        _texture_image = img.Copy();
        lock (Context.Viewer) {
          UpdateAllColors();
        }
      }

      if (_clear_points) {
        _clear_points = false;
        _pixel_point_ids.Reset();
        Context.Setup.ScanWorkflow.Reset();
        _pointcloud.ClearPoints();
      }

      // Update the transformation between positioner coordinate system and camera coordinate system
      if (_update_positioner_transformation)
      {
        _update_positioner_transformation = false;
        Context.Setup.Positioner.UpdateTransformation(Context.Setup.Camera);
        _pixel_point_ids.Reset();
        Context.Setup.ScanWorkflow.Reset();
      }

      if (Context.Setup.Camera.FrameSize != _pixel_point_ids.Size) {
        _pixel_point_ids.Size = Context.Setup.Camera.FrameSize;
      }

      List<Vector> points;
      List<System.Drawing.Point> pixels;

      if (Context.Setup.ScanWorkflow.Process(Context.Setup, img, out points, out pixels)) {
        lock (Context.Viewer) {
          UpdatePoints(points, pixels);
        }
        foreach (System.Drawing.Point p in pixels) {
          img[p.Y, p.X] = new Bgr(Color.Green);
        }
      }
    }
开发者ID:guozanhua,项目名称:parsley,代码行数:41,代码来源:ScanningSlide.cs

示例2: FindPattern

    /// <summary>
    /// Find checkerboard in image
    /// </summary>
    /// <param name="img">Image to search pattern for</param>
    /// <param name="image_points">Detected checkerboard image points</param>
    /// <returns>True if pattern was found, false otherwise</returns>
    public override bool FindPattern(Emgu.CV.Image<Gray, byte> img, out System.Drawing.PointF[] image_points)
    {
      Emgu.CV.Image<Gray, byte> my_img = img.Copy();
      my_img._EqualizeHist();
      bool found = Emgu.CV.CameraCalibration.FindChessboardCorners(
        my_img,
        _inner_corners,
        Emgu.CV.CvEnum.CALIB_CB_TYPE.ADAPTIVE_THRESH | 
        Emgu.CV.CvEnum.CALIB_CB_TYPE.FILTER_QUADS |
        Emgu.CV.CvEnum.CALIB_CB_TYPE.NORMALIZE_IMAGE,
        out image_points
      );

      if (found) {
        my_img.FindCornerSubPix(
          new System.Drawing.PointF[][] { image_points },
          new System.Drawing.Size(5, 5),
          new System.Drawing.Size(-1, -1),
          new MCvTermCriteria(0.001));
      }
      return found;
    }
开发者ID:sivarajankumar,项目名称:dentalsmile,代码行数:28,代码来源:CheckerBoard.cs


注:本文中的Emgu.Copy方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。