コード例 #1
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="testSite">Site of the test suite, used to save logs</param>
        /// <param name="width">Width of the base image</param>
        /// <param name="height">Height of the base image</param>
        /// <param name="IQAAlgorithm">IQA algorithm</param>
        /// <param name="assessValueThreshold">Assess Value Threshold</param>
        public SimulatedScreen(ITestSite testSite, int width, int height, IQA_Algorithm IQAAlgorithm, double assessValueThreshold)
        {
            this.site   = testSite;
            this.width  = width;
            this.height = height;

            this.assessValueThreshold = assessValueThreshold;
            if (IQAAlgorithm == IQA_Algorithm.GSSIM)
            {
                iqaIndex = new ImageQualityAccessment.Gssim();
            }
            else if (IQAAlgorithm == IQA_Algorithm.MSSSIM)
            {
                iqaIndex = new ImageQualityAccessment.Msssim();
            }
            else
            {
                iqaIndex = new ImageQualityAccessment.Ssim();
            }

            baseImage = new Bitmap(width, height);
            FillColor(Color.Black);

            remoteFXContext = new RemoteFXContext();

            surfaceDic             = new Dictionary <ushort, Surface>();
            bitmapCache            = new Dictionary <ushort, CacheItem>();
            clearCodecGlyphStorage = new Dictionary <ushort, Image>();

            // Set default values for each component
            // to decide whether access this component in IQA algorithm
            this.IQAAssessY  = true;
            this.IQAAssessCb = true;
            this.IQAAssessCr = true;
        }
コード例 #2
0
        /// <summary>
        /// Constructor
        /// </summary>
        /// <param name="testSite">Site of the test suite, used to save logs</param>
        /// <param name="width">Width of the base image</param>
        /// <param name="height">Height of the base image</param>
        /// <param name="IQAAlgorithm">IQA algorithm</param>
        /// <param name="assessValueThreshold">Assess Value Threshold</param>
        public SimulatedScreen(ITestSite testSite, int width, int height, IQA_Algorithm IQAAlgorithm, double assessValueThreshold)
        {
            this.site = testSite;
            this.width = width;
            this.height = height;

            this.assessValueThreshold = assessValueThreshold;
            if (IQAAlgorithm == IQA_Algorithm.GSSIM)
            {
                iqaIndex = new ImageQualityAccessment.Gssim();
            }
            else if (IQAAlgorithm == IQA_Algorithm.MSSSIM)
            {
                iqaIndex = new ImageQualityAccessment.Msssim();
            }
            else
            {
                iqaIndex = new ImageQualityAccessment.Ssim();
            }

            baseImage = new Bitmap(width, height);
            FillColor(Color.Black);

            remoteFXContext = new RemoteFXContext();

            surfaceDic = new Dictionary<ushort, Surface>();
            bitmapCache = new Dictionary<ushort, CacheItem>();
            clearCodecGlyphStorage = new Dictionary<ushort, Image>();

            // Set default values for each component
            // to decide whether access this component in IQA algorithm
            this.IQAAssessY = true;
            this.IQAAssessCb = true;
            this.IQAAssessCr = true;
        }