www.pudn.com > ImageRe.rar > Character.java


package com.image.Image; 
 
import com.image.method.*; 
import com.image.file.*; 
 
import java.io.File; 
 
 
public class Character { 
 
	private static final int QUANTIFY_HSB_SIZE = 72; 
	 
	public float[] getcharacter(File f) throws Exception{ 
		float[] ft=new float[QUANTIFY_HSB_SIZE]; 
		ImageFile iFile=new ImageFile(); 
		int[][] rgb=iFile.getRgb(f); 
		int len=rgb.length; 
		float[][] hsb=new float[len][3]; 
		 
		JColor.RGB2HSB(rgb, hsb); 
		 
		HsbQuantify hq=new HsbQuantify(); 
    	int[] g=hq.convert(hsb); 
    	ft=hq.histo(g); 
    	return ft; 
	} 
	 
	public static void main(String[] args) { 
		// TODO Auto-generated method stub 
 
	} 
 
}