Beispiel #1
0
        //Click Intensity method radio button
        private void intensityMethod_click(object sender, RoutedEventArgs e)
        {
            string intensity = "intensity";

            this.RelevantImage.IsEnabled = false;
            this.setPageIndex(0);
            //pageIndexIntensity = 0;
            //pageIndexColorCode = 0;
            intensityResultFiles.Clear();
            ManhattanDistance distance = new ManhattanDistance();

            if (selecteImageFilePath == null)
            {
                MessageBox.Show("Please select one Image before we proceed");
                return;
            }
            List <ResultCBIR> sortedDistance = distance.computeManhattanDistance(selecteImageFilePath,
                                                                                 allimageDetailIntensityMethod, intensity);

            foreach (ResultCBIR fieldid in sortedDistance)
            {
                intensityResultFiles.Add(fieldid.imageid);
            }
            renderImage(intensityResultFiles);
        }
        //Click color code method button
        private void colorCodeMethod_click(object sender, RoutedEventArgs e)
        {
            string colorcode = "colorcode";

            setPageIndex(0);
            colorCodeResultFiles.Clear();
            ManhattanDistance distance = new ManhattanDistance();

            if (selecteImageFilePath == null)
            {
                MessageBox.Show("Please select one Image before we proceed");
                return;
            }
            List <ResultCBIR> sortedDistance = distance.computeManhattanDistance(selecteImageFilePath,
                                                                                 allimageDetailIntensityMethod, colorcode);

            foreach (ResultCBIR fieldid in sortedDistance)
            {
                colorCodeResultFiles.Add(fieldid.imageid);
            }
            renderImage(colorCodeResultFiles);
        }