本文整理汇总了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();
}
}));
}
}