private static Vector<Color> getKeyColors(Vector<Color> src, int cnt, int threshold) {
		Vector<Color> groups = new Vector<Color>();
		groups.add(src.get(0));
		
		boolean add;
		
		for (int i = 0; i < src.size(); i++) {
				Color c = src.get(i);
				add = true;
				
				for (Color col: groups) {
					if (getDist(c, col) < threshold) {
						add = false;
						break;
					}
				}
				
				if (add) {
					groups.add(c);
				}
		}
		
		while (groups.size() > cnt) {
			groups = getKeyColors(src, cnt, threshold + (int)(200 * ((groups.size()-cnt) * (groups.size()-cnt) * 0.04)));
		}
		
		while (groups.size() < cnt) {
			groups = getKeyColors(src, cnt, threshold - (int)(200 * ((groups.size()-cnt) * (groups.size()-cnt) * 0.04)));
		}
		
		return groups;
	}