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


C# Emgu.Resize方法代码示例

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


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

示例1: _grabber_OnFrame

 void _grabber_OnFrame(Parsley.Core.BuildingBlocks.FrameGrabber fg, Emgu.CV.Image<Emgu.CV.Structure.Bgr, byte> img) {
   // Note: This method is called from the frame-grabber's thread loop. 
   // The framegrabber holds a Breath on the camera to ensure that the camera object remains
   // alive during this callback. The camera object is a SharedResource, meaning that any
   // invocation to Dispose will block until all Breaths on the camera are released. Suppose
   // The thread that owns the picture box has called dispose and blocks. The callback here is called
   // and invoke is used. Invoke executes the delegate on thread that owns this control, which is the one
   // that is already blocked. This leads to a deadlock. That is why we use BeginInvoke, which executes
   // the delegate on the GUI thread associated with this control.
   if (_can_invoke) {
     Rectangle client = this.ClientRectangle;
     Emgu.CV.Image<Emgu.CV.Structure.Bgr, byte> img_copy = img.Resize(client.Width, client.Height, _interpolation);
     this.BeginInvoke(new MethodInvoker(delegate {
       // Update image
       Emgu.CV.IImage prev = _picture_box.Image;
       _picture_box.Image = img_copy;
       if (prev != null) {
         prev.Dispose();
       }
     }));
   }
 }
开发者ID:guozanhua,项目名称:parsley,代码行数:22,代码来源:EmbeddableStream.cs


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