ParasKumar / lire

Automatically exported from code.google.com/p/lire
Other
0 stars 0 forks source link

0.9.3_alphaissue #1

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
hi,I find that this project support lucene4.0 and the svn commit logs says 
that: sift test successfully.
so,I have a try.

I copy the src/test/java/...../lire/indexing/IndexVisualWordsTest.java  and run 
it.
but i found when the number of  images which will be indexed  are very small 
(for example , only 5 images should be indexed), then when run the code:
 -----------------
System.out.println("-< Creating SURF based histograms >--------------");
SurfFeatureHistogramBuilder surfFeatureHistogramBuilder = new 
SurfFeatureHistogramBuilder(IndexReader.open(FSDirectory.open(new 
File(index))), numSamples, clusters);
surfFeatureHistogramBuilder.index();  
---------------------
 there will be a bug:  when run k-means algorithm.
the console print:  k.getFeatureCount() = 0
 then there will be a NullPoint at:KMeans.init():
------------------------------
Set<Integer> medians = selectInitialMedians(numClusters);
Iterator<Integer> mediansIterator = medians.iterator();
------------------------------
if I debug this code, I can find that medians=null.

But when I add images to be indexed, for example 20 images, the issue will 
disappear.

Does this means surf need many images ?  and sift need more?(even though I use 
20 images to test sift algorithm, the NullPoint exception appears . )  

Original issue reported on code.google.com by saint...@gmail.com on 10 Dec 2012 at 6:20

GoogleCodeExporter commented 9 years ago
I got this problem too!

Original comment by antoniod...@gmail.com on 8 Feb 2013 at 2:27

GoogleCodeExporter commented 9 years ago
That is mainly a documentation issue :) If you have small & few images there 
are only a few or none local features. The whole approach was built and tested 
with 10,000+ images and is meant to be used with millions of images. I'll put a 
more consistent error message in the code. 

Original comment by mathias....@gmail.com on 19 Jun 2013 at 8:10