Exemplo n.º 1
0
        public override Object Attend()
        {
            if (path != null)
            {
                TISCameraDriver driver = TISCameraManager.GetReference().getDriver(camera);

                if (!Double.IsNaN(this.exposure))
                {
                    double expValue = this.exposure;
                    driver.GetProperty(PropertyType.EXPOSURE).Auto  = false;
                    driver.GetProperty(PropertyType.EXPOSURE).Value = expValue;
                }

                if (quality < 0)
                {
                    driver.TakeImage(path, image);
                }
                else
                {
                    driver.TakeImage(path, image, quality);
                }

                return(null);
            }
            else
            {
                throw new Exception("The path is not defined.");
            }
        }