예제 #1
0
        /// <summary>
        /// Returns the total percentage of images loaded for testing, training and combined.
        /// </summary>
        /// <param name="dfTraining">Returns the total percentage of training images loaded.</param>
        /// <param name="dfTesting">Returns the total percentage of testing images loaded.</param>
        /// <returns>Returns the combined total percentage of images loaded for both testing and training.</returns>
        public double GetPercentageLoaded(out double dfTraining, out double dfTesting)
        {
            int nTrainingTotal  = m_TrainingImages.GetTotalCount();
            int nTrainingLoaded = m_TrainingImages.GetLoadedCount();
            int nTestingTotal   = m_TestingImages.GetTotalCount();
            int nTestingLoaded  = m_TestingImages.GetLoadedCount();

            dfTraining = (double)nTrainingLoaded / (double)nTrainingTotal;
            dfTesting  = (double)nTestingLoaded / (double)nTestingTotal;

            int nTotalLoaded = nTrainingLoaded + nTestingLoaded;
            int nTotalImages = nTrainingTotal + nTestingTotal;

            return((double)nTotalLoaded / (double)nTotalImages);
        }