Exemplo n.º 1
0
        private const float pixelSize = 0.175f; // mm

        public TrainingDataGenerator()
        {
            InitializeComponent();

            dataSamples = new BindingList <DataSample>();

            entriestListBox.DataSource = dataSamples;
            descriptionsData           = DescriptionData.Parse("CLNDAT_EN.txt").ToList();

            OpenFolder(@"D:\System\Seba\Pulpit\ppo\All247images");
        }
Exemplo n.º 2
0
        private void SetCurrentImage(int imageIndex)
        {
            currentImage            = imageIndex;
            nextImageButton.Enabled = currentImage < images.Count - 1;

            var image = RawParser.Open(images[currentImage].FullName).Convert <Bgr, byte>();

            currentDescriptionData = descriptionsData.FirstOrDefault(i => i.ImageName == images[currentImage].Name);

            if (currentDescriptionData != null)
            {
                image.Draw(
                    new CircleF(new PointF(currentDescriptionData.X, currentDescriptionData.Y), currentDescriptionData.NoduleSize / pixelSize),
                    new Bgr(0, 0, 255), 2);

                currentFileNameLabel.Text = $"{images[currentImage].Name} {currentDescriptionData.Class} {currentDescriptionData.Sex} {currentDescriptionData.Years}";
            }
            else
            {
                currentFileNameLabel.Text = images[currentImage].Name;
            }

            currentImagePictureBox.Image = image.Bitmap;
        }