private void ConstructFeature()
 {
     if (isDivideToFragments)
     {
         var list = GetSubfeatures();
         feature = GLCMFeature.BuildStandart(list);
     }
     else
     {
         feature = GetGLCMFeature(new Fragment(0, 0, width, height));
     }
 }
Beispiel #2
0
        public GLCMFeature PrepareGLCM(out double average, out double variance)
        {
            var gStandart  = GLCMFeature.BuildStandart(glcmFeatures);
            var gDistances = new double[glcmFeatures.Count];

            for (int i = 0; i < glcmFeatures.Count; ++i)
            {
                gDistances[i] = gStandart.GetDistance(glcmFeatures[i]);
            }

            average  = MathHelpers.GetAverage(gDistances, 0, glcmFeatures.Count);
            variance = MathHelpers.GetVariance(gDistances, average, 0, glcmFeatures.Count);

            return(gStandart);
        }