private void UpdateBinaryThreshold2() { using (Image <Gray, Byte> grayImage = CurrentImage.Convert <Gray, Byte>()) using (Image <Gray, Byte> binaryImage = grayImage.ThresholdBinary(new Gray(BinaryThreshold2), new Gray(255))) { DisplayImage = ImageService.ToBitmapSource(binaryImage); } }
private void UpdateBinaryThreshold2() { if (CurrentResult != null) { CurrentResult.ThresholdValue2 = BinaryThreshold2; } using (Image <Gray, Byte> grayImage = CurrentImage.Convert <Gray, Byte>()) using (Image <Gray, Byte> binaryImage = grayImage.ThresholdBinary(new Gray(BinaryThreshold2), new Gray(255))) { DisplayImage = ImageService.ToBitmapSource(binaryImage); } }