@SuppressWarnings("unchecked")
	public List<String>[] visual(String imageFolderLocation) throws IOException {
		codebook cb = new codebook();
		List<Double[]> sift = cb.getSIFT(imageFolderLocation);
	    System.out.println("sift is done!");
	    List<Double[]> dict = cb.kmeans(sift);
	    System.out.println("kmeans is done!");
	    imageWordsimp iw = new imageWordsimp();
		List<Integer[]> words = iw.matchWords(imageFolderLocation, dict, cb.getFeature());
	    System.out.println("match words is done!");
		List<String> filename = iw.getNames(imageFolderLocation, dict, cb.getFeature());
		List<String>[] images = new ArrayList [dict.size()];
		for(int i = 0; i < dict.size(); i++) {
			images[i] = new ArrayList<String> ();
			for(int j = 0; j < words.size(); j++) {
				for(int k = 0; k < words.get(j).length; k++) {
					if(words.get(j)[k] == i) {
						images[i].add(filename.get(j));
						break;
					}
				}
			}
			JButton button = new JButton(String.valueOf(i));
			buttons.add(button);
		}
		return images;
	}