ConfidenceImage.cs 629 B

12345678910111213141516171819202122232425
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6. using bbiwarg.Images;
  7. using bbiwarg.Graphics;
  8. using Emgu.CV;
  9. using Emgu.CV.Structure;
  10. namespace bbiwarg.Images
  11. {
  12. class ConfidenceImage
  13. {
  14. public Image<Gray, Int16> Image { get; private set; }
  15. public Image<Gray, byte> Mask { get; private set; }
  16. public ConfidenceImage(Image<Gray, Int16> image)
  17. {
  18. Image = image;
  19. Mask = (Image.ThresholdBinary(new Gray(Constants.ConfidenceImageMinThreshold), new Gray(1))).Convert<Gray, byte>();
  20. }
  21. }
  22. }