private static ArrayList<Color> getPoints(byte[] pixels, double[] new_center, double h,
		   NaiveBin<Integer> bins, int binSize) {
	   //System.out.println("Searching for points..");
	   //System.out.println("[0]=" + new_center[0] + ", [1]=" + new_center[1] + ", [2]=" + new_center[2]);
	   ArrayList<Color> points = new ArrayList<Color>();
	   int min_r = (int) (new_center[0] - h >= 0 ? new_center[0] - h : 0);
	   int max_r = (int) (new_center[0] + h <= 255 ? new_center[0] + h : 255);	
	   int min_g = (int) (new_center[1] - h >= 0 ? new_center[1] - h : 0);
	   int max_g = (int) (new_center[1] + h <= 255 ? new_center[1] + h : 255);	
	   int min_b = (int) (new_center[2] - h >= 0 ? new_center[2] - h : 0);
	   int max_b = (int) (new_center[2] + h <= 255 ? new_center[2] + h : 255);
	   //System.out.println("min(r,g,b)=" + min_r + ", " + min_g + ", " + min_b);
	   //System.out.println("max(r,g,b)=" + max_r + ", " + max_g + ", " + max_b);
	   int max = (max_r + max_g * 256 + max_b * 256 * 256) / binSize;
	   int min = (min_r + min_g * 256 + min_b * 256 * 256) / binSize;
	   ArrayList<Integer> list = bins.get(min, max);
	   //min = (int)((new_center[0] + new_center[1] * 256 + new_center[2] * 256 * 256) / binSize);
	   //System.out.println("min=" + min + ", max=" + max);
	   //ArrayList<Integer> list = bins.get(min,min+1);
	   for (Integer j : list) {
	       points.add(new Color(pixels[j*3],pixels[j*3+1],pixels[j*3+2]));
	   }
	   //System.out.println(points.size() + " points found!");
	   return points;
   }