public void RoiFrameUpdateBlackBlank() { var image = RoiFrame.Clone(); image.SetValue(new Bgr(Color.Black).MCvScalar); RoiFrame = image; }
private void RefreshImages(Image <Gray, byte> diffImage) { logger.Debug($"Refreshing images for cam_{camNumber} start"); RoiFrameBackground = RoiFrame.Clone(); RoiLastThrowFrame = diffImage.Clone(); DoCapture(); RefreshImageBoxes(); logger.Debug($"Refreshing images for cam_{camNumber} end"); }
private void DoCapturesInternal(List <double> slidersData) { var roiRectangleTemp = new Rectangle(0, (int)slidersData.ElementAt(2), (int)slidersData.ElementAt(4), (int)slidersData.ElementAt(3)); OriginFrame = videoCapture.QueryFrame().ToImage <Bgr, byte>(); LinedFrame = drawService.DrawSetupLines(OriginFrame.Clone(), slidersData); RoiFrame = OriginFrame.Clone().Convert <Gray, byte>().Not(); RoiFrame.ROI = roiRectangleTemp; RoiFrame._SmoothGaussian(smoothGauss); CvInvoke.Threshold(RoiFrame, RoiFrame, slidersData.ElementAt(5), 255, ThresholdType.Binary); }
public void DoCapture(bool withRoiBackgroundRefresh = false) { logger.Debug($"Doing capture for cam_{camNumber} start. RoiBackgroundRefresh = {withRoiBackgroundRefresh}"); GetSlidersData(); DrawSetupLines(); if (withRoiBackgroundRefresh) { OriginFrame = videoCapture.QueryFrame().ToImage <Bgr, byte>(); RoiFrame = OriginFrame.Clone().Convert <Gray, byte>().Not(); ThresholdRoi(RoiFrame); RoiFrameBackground = RoiFrame.Clone(); RoiLastThrowFrame = RoiFrame.Clone(); RefreshImageBoxes(); } logger.Debug($"Doing capture for cam_{camNumber} end"); }
public void PreviousRoiFrameUpdateFromRoiFrame() { RoiPreviousFrame = RoiFrame.Clone(); }