private void RFRelevantImage_click(object sender, RoutedEventArgs e) { setPageIndex(0); rfMethodResultFiles.Clear(); if (relevantImage.Count == 0) { MessageBox.Show("Please select few relevant images before we proceed"); return; } else { RfMethod Rf = new RfMethod(); Rf.setMethodName("RF"); Rf.setQueryImage(selecteImageFilePath); List <ResultCBIR> sortedDistance = Rf.computeNewFeatureMatrix(relevantImage, colorCodeIntensityGaussianValue); foreach (ResultCBIR fieldid in sortedDistance) { rfMethodResultFiles.Add(fieldid.imageid); } renderImage(rfMethodResultFiles); } }
//RF method click private void RFMethod_click(object sender, RoutedEventArgs e) { setPageIndex(0); this.RelevantImage.IsEnabled = true; //Compute the rf method standard deviation, average value and minchowsky distance and return the result //call compute RF method rfMethodResultFiles.Clear(); relevantImage.Clear(); if (selecteImageFilePath == null) { MessageBox.Show("Please select one Image before we proceed"); return; } RelevantImage queryImage = new RelevantImage(); queryImage.imageID = selecteImageFilePath; relevantImage.Add(queryImage); RfMethod computeDistanceRfMethod = new RfMethod(); computeDistanceRfMethod.setQueryImage(selecteImageFilePath); computeDistanceRfMethod.setMethodName("colorCodeIntensity"); computeDistanceRfMethod.setallImageHistogramRfMethod(rfMethodHistogram); List <ResultCBIR> sortedDistance = computeDistanceRfMethod.computeResultRFMethod(0);//rfMethodIterationCount colorCodeIntensityGaussianValue = computeDistanceRfMethod.getGaussianValueImageDetails(); //computeDistanceRfMethod.createFeatureMatrix(); rfMethodIterationCount++; ////Add sorted imageid in a list foreach (ResultCBIR fieldid in sortedDistance) { rfMethodResultFiles.Add(fieldid.imageid); } renderImage(rfMethodResultFiles); }