コード例 #1
0
        private void LiveDisplayGrab()
        {
            while (isRealDisplay)
            {
                try
                {
                    int     ticketCount    = System.Environment.TickCount;
                    HObject ho_OutputImage = null;

                    ho_OutputImage = SafeAsyncGrabImage();
                    HalImage8Grey        image         = new HalImage8Grey(ref ho_OutputImage);
                    int                  triggerNumber = System.Environment.TickCount;
                    HalCompleteEventArgs eventArgs     = new HalCompleteEventArgs(ticketCount, triggerNumber, image);
                    Complete?.Invoke(this, eventArgs);

                    // Console.WriteLine("Grab one Image");
                }
                catch (Exception ex)
                {
                    isRealDisplay = false;

                    Console.WriteLine(ex.ToString());
                    //throw ex;
                }
            }
        }
コード例 #2
0
 /// <summary>
 /// HalImage8Grey的拷贝构造函数
 /// </summary>
 /// <param name="other">其它HalImage8Grey对象</param>
 public HalImage8Grey(HalImage8Grey other)
 {
     HOperatorSet.GenEmptyObj(out sourceImage);
     sourceImage    = other.SourceImage;
     myGraphicTable = other.GraphicContext;
 }