using BBIWARG.Utility; using Emgu.CV; using Emgu.CV.Structure; using System; namespace BBIWARG.Images { /// /// ConfidenceImage stores the raw confidence data read from the Camera as an . /// public class ConfidenceImage { /// /// the confidence image /// public Image Image { get; private set; } /// /// a mask image, which is 1 iff the the confidence value is greater than /// public Image Mask { get; private set; } /// /// the size of the confidence image /// public ImageSize Size { get; private set; } /// /// Constructs a new ConfidenceImage using the specified data and size. /// /// pointer to raw confidence data /// size of the confidence image public ConfidenceImage(IntPtr rawConfidenceData, ImageSize size) { Size = size; Image = new Image(Size.Width, Size.Height, size.Width * 2, rawConfidenceData); Mask = Image.ThresholdBinary(new Gray(Parameters.ConfidenceImageMinThreshold), new Gray(1)).Convert(); } } }