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

    SurfFeatureHistogramBuilder sh =
        new SurfFeatureHistogramBuilder(
            DirectoryReader.open(FSDirectory.open(new File("surf-idx"))), 500, 1000);
    sh.index();
    //        testFindimages();
  }
Ejemplo 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("*******************************************");
 }