public int PageScore(
            int wndStartX,
            int wndStartY,
            out double dissimilarity,
            out double similarity,
            out string log,
            bool logging = true)
        {
            log = "";
            if (_pageDescriptors == null)
            {
                dissimilarity = 2000000000.0f;
                similarity    = 0.0f;
                return(0);
            }

            Bitmap printscreen;

            Utils.CaptureScreen(wndStartX + _fromX, wndStartY + _fromY, _width, _height, out printscreen);

            _currentMat = Utils.BitmapToMat(printscreen);
            MatOfFloat discriptors = null;

            FastMatchSample.FastDescriptor(
                _currentMat, out discriptors, out _currentKeypoints, out _currentGray);

            DMatch[][] matches;
            FastMatchSample.Match(discriptors, _pageDescriptors, 3, out matches);

            int score = FastMatchSample.Scoring(matches, out dissimilarity, out similarity);

            if (logging)
            {
                log += PageName + " score : " + score + "  dissimilarity : " + dissimilarity + " keypoints : " + _currentKeypoints.Length + "\n";
            }

            return(score);
        }
        public int PageScore(
            MatOfFloat currentDescriptors,
            out double dissimilarity,
            out double similarity,
            out string log,
            bool logging = true)
        {
            log = "";

            if (_skipPageScore)
            {
                similarity    = 10000.0f;
                dissimilarity = 0.0f;
                return(50000);
            }

            if (_pageDescriptors == null)
            {
                dissimilarity = 2000000000.0f;
                similarity    = 0.0f;
                return(0);
            }



            DMatch[][] matches;
            FastMatchSample.Match(currentDescriptors, _pageDescriptors, 3, out matches);

            int score = FastMatchSample.Scoring(matches, out dissimilarity, out similarity);

            if (logging)
            {
                log += PageName + " score : " + score + "  dissimilarity : " + dissimilarity + "\n";
            }

            return(score);
        }