我目前正在使用http://www.cise.ufl.edu/~fishwick/ac/2011/cbir_webpage/index.htm上的基于内容的图像检索算法 该算法设置为在 JRE 上运行,但我已替换适当地导入,以便它可以在 ADT 上工作。例如 BufferedImage 已替换为位图。我的问题是我不断收到红线错误;
ColorProcessor cp = new ColorProcessor(image);
错误读取;“构造函数 ColorProcessor(Image) 引用了缺少的类型 Image”。谁能向我指出我错过了什么或不认识什么。任何帮助都感激不尽。
// a local version on the computer
URL url = FeatureExtraction.class.getResource(name);
System.out.println("url = " + url);
Bitmap image = null;
// ImageIO is not supported in Android SDK so use Bitmap to achieve the
// same thing.
//Bitmap img = BitmapFactory.decodeFile(name);
// System.out.println("image = " + img);
try {
//image = ImageIO.read(url);
image = BitmapFactory.decodeFile(name);
//image = BitmapFactory.decodeStream(url.openConnection().getInputStream());
} catch(IOException e) {
System.out.println("read error: " + e.getMessage());
}
ColorProcessor cp = new ColorProcessor(image);