Beispiel #1
0
        static unsafe ImageWarehouse imageWarehouseFactory(string sourceDir)
        {
            var iw = new ImageWarehouse(sourceDir, DbConn);

            iw.Preprocessors.Add(new GridPrep <ColorLab>(24, 10));
            iw.Preprocessors.Add(new ThumbnailPrep <ColorLab>(24));
            iw.Preprocessors.Add(new VoidPrep <ColorLab>());
            iw.Preprocessors.Add(new GridDifferentNeighborPrep <ColorLab>(24, 10));

            iw.RankingModels.Add(new L23dRankingModel <ColorLab>(new TargetFinderL23d(3, 0)));
            iw.RankingModels.Add(new L24dRankingModel <ColorLab>(new TargetFinderL24d(3, 0)));

            return(iw);
        }
Beispiel #2
0
        static void Main()
        {
            var folders = new[] { "dataset", "../dataset", "../../dataset", "../../../dataset" };
            //var folders = new[] { "dataset-min", "../dataset-min", "../../dataset-min", "../../../dataset-min" };

            string sourceDir = folders.FirstOrDefault(f => Directory.Exists(f));

            if (sourceDir != null)
            {
                imageWarehouse = imageWarehouseFactory(sourceDir);

                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                Application.Run(new FormHistogramsRM());
            }
            else
            {
                MessageBox.Show("Dataset folder not found");
            }
        }