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
{
///
/// ConfidenceImage stores the raw confidence data read from the Camera as an .
///
public class ConfidenceImage
{
///
/// the size of the confidence image
///
public ImageSize Size { get; private set; }
///
/// 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; }
///
/// 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();
}
}
}