public void testCreateLocalFeatureHistogram() throws IOException {
    //        testSiftIndexing();

    SiftFeatureHistogramBuilder sh =
        new SiftFeatureHistogramBuilder(
            DirectoryReader.open(FSDirectory.open(new File("sift-idx"))), 2000);
    sh.index();
    testFindimages();
  }
Exemplo n.º 2
0
 public void doParams(int numDocs, int numClusters) throws IOException {
   SiftFeatureHistogramBuilder sh1 =
       new SiftFeatureHistogramBuilder(
           IndexReader.open(FSDirectory.open(new File(indexPath))), numDocs, numClusters);
   sh1.index();
   SurfFeatureHistogramBuilder sh =
       new SurfFeatureHistogramBuilder(
           IndexReader.open(FSDirectory.open(new File(indexPath))), numDocs, numClusters);
   sh.index();
   System.out.println("*******************************************");
   System.out.println(
       "SiftFeatureHistogramBuilder sh1 = new SiftFeatureHistogramBuilder(IndexReader.open(FSDirectory.open(new File(indexPath))), "
           + numDocs
           + ", "
           + numClusters
           + ");");
   //        computeMAP(new SurfVisualWordsImageSearcher(1000), "Surf BoVW");
   //        computeMAP(new SiftVisualWordsImageSearcher(1000), "Sift BoVW");
   System.out.println("*******************************************");
 }