BufferedImage image = ImageIO.read(file);//读取文件 LuminanceSource source = new BufferedImageLuminanceSource(image); BinaryBitmap bitmap = new BinaryBitmap(new HybridBinarizer( source)); //解码 Result result = new MultiFormatReader().decode(bitmap); String resultStr = result.getText(); System.out.println(resultStr);
初级程序员
by: ETmanwenhan 发表于:2013-04-18 14:32:36 顶(0) | 踩(0) 回复
代码片段
回复评论