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;

namespace bbiwarg.Images
{
    public class ConfidenceImage
    {
        public Image<Gray, Int16> Image { get; private set; }
        public Image<Gray, byte> Mask { get; private set; }

        public ConfidenceImage(IntPtr rawConfidenceData, int width, int height)
        {
            Image = new Image<Gray, Int16>(width, height, width * 2, rawConfidenceData);

            Mask = (Image.ThresholdBinary(new Gray(Parameters.ConfidenceImageMinThreshold), new Gray(1))).Convert<Gray, byte>();
        }
    }
}
