www.pudn.com > ImageRe.rar > ImageSearch.java
package com.image.Image;
import java.io.File;
import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.Statement;
import java.util.Map;
import java.util.TreeMap;
import com.image.data.DataConnection;
import com.image.method.QuantifyMethod;
public class ImageSearch {
public static void main(String[] args){
try{
File qFile=new File("F://pic//xrblog//ϦÑô.jpg");
Character c=new Character();
float[] qf=c.getcharacter(qFile);
Connection conn=DataConnection.getConnection();
Statement st = conn.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_READ_ONLY);
String strSql="select * from filecharacter,file where file.filename=filecharacter.filename";
ResultSet rs=st.executeQuery(strSql);
Map m=new TreeMap();
while(rs.next()){
//System.out.println(rs.getString(75));
float[] tf=new float[QUANTIFY_HSB_SIZE];
for(int i=0;i entry:m.entrySet()){
float key=entry.getKey();
String value=entry.getValue();
System.out.println(key+":"+value);
}
}catch(Exception e){
e.printStackTrace();
}
}
private static final int QUANTIFY_HSB_SIZE = 72;
}