12345678910111213141516171819202122232425262728 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- using bbiwarg.Images;
- using bbiwarg.Output;
- using Emgu.CV;
- using Emgu.CV.Structure;
- using bbiwarg.Utility;
- namespace bbiwarg.Images
- {
- public class ConfidenceImage
- {
- public ImageSize Size { get; private set; }
- public Image<Gray, Int16> Image { get; private set; }
- public Image<Gray, byte> Mask { get; private set; }
- public ConfidenceImage(IntPtr rawConfidenceData, ImageSize size)
- {
- Size = size;
- Image = new Image<Gray, Int16>(Size.Width, Size.Height, size.Width * 2, rawConfidenceData);
- Mask = (Image.ThresholdBinary(new Gray(Parameters.ConfidenceImageMinThreshold), new Gray(1))).Convert<Gray, byte>();
- }
- }
- }
|