/// <summary> /// 开始取图 /// </summary> /// <returns></returns> public bool startAcquire() { bool ok = false; try { // Get payload size UInt32 lPayloadSize = lPayloadSize = MDevice.PayloadSize; // Propagate to pipeline to make sure buffers are big enough MPipeline.BufferSize = lPayloadSize; // Reset pipeline MPipeline.Reset(); // Reset stream statistics PvGenCommand lResetStats = MStream.Parameters.GetCommand("Reset"); lResetStats.Execute(); // Reset display thread stats (mostly frames displayed per seconds) MDisplayThread.ResetStatistics(); // Use acquisition manager to send the acquisition start command to the device MAcquisitionManager.Start(); // Single source application, for simplicity we start all configured camera bridges //for (int i = 0; i < MCameraBridgeManager.BridgeCount; i++) //{ // PvCameraBridge lBridge = mCameraBridgeManager.GetBridge(i); // if ((lBridge != null) && // (lBridge.IsConnected)) // { // lBridge.StartAcquisition(); // } //} ok = true; } catch (Exception ex) { MessageBox.Show("相机打开取图出错"); } return(ok); }
public CustomPipeline() { this.gpipe = new GPipeline(this); this.mpipe = new MPipeline(); }