本文整理汇总了C#中Emgu.CV.Mat.MinMax方法的典型用法代码示例。如果您正苦于以下问题:C# Mat.MinMax方法的具体用法?C# Mat.MinMax怎么用?C# Mat.MinMax使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Emgu.CV.Mat
的用法示例。
在下文中一共展示了Mat.MinMax方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ProcessFrame
// will be simplified
public void ProcessFrame(object sender, EventArgs arg)
{
//get frame from the Camera
Mat frame = new Mat();
Mat grayFrame = new Mat();
double thresh_med;
double thresh_e2;
System.Drawing.Image OrgImage;
System.Drawing.Image OrgImage1;
_capture.Retrieve(frame);
CvInvoke.CvtColor(frame, grayFrame, ColorConversion.Bgr2Gray);
Image<Rgb, Byte> tothermo = grayFrame.ToImage<Rgb, Byte>(); // original
Image<Gray, Byte> tothermo1 = grayFrame.ToImage<Gray, Byte>();
OrgImage = tothermo.ToBitmap();
OrgImage1 = tothermo.ToBitmap();
pictureBox4.Image = OrgImage1;
_imagedata.MakeFalse((Bitmap)OrgImage);
pictureBox1.Image = OrgImage;
pictureBox1.Refresh();
pictureBox4.Refresh();
double[] minVal;
double[] maxVal;
System.Drawing.Point[] minLoc;
System.Drawing.Point[] maxLoc;
grayFrame.MinMax(out minVal, out maxVal, out minLoc, out maxLoc);
_imagedata.sizex = OrgImage.Width;
_imagedata.sizey = OrgImage.Height;
if (hand_mode)
{
_imagedata.centerx = mouse_x;
_imagedata.centery = mouse_y;
}
else
{
_imagedata.centerx = maxLoc[0].X;
_imagedata.centery = maxLoc[0].Y;
}
_imagedata.GraphFill(tothermo1);
// thresh calculate
if (hand_mode)
{
thresh_med = grayFrame.Bitmap.GetPixel(_imagedata.centerx, _imagedata.centery).R / 2;
thresh_e2 = grayFrame.Bitmap.GetPixel(_imagedata.centerx, _imagedata.centery).R / Math.Exp(2);
}
else
{
thresh_med = maxVal[0] / 2;
thresh_e2 = maxVal[0] / Math.Exp(2);
}
_beamparameters.BeamSizeDetect(thresh_med, thresh_e2, _imagedata);
}