摘要: 图片缩放应用比较多,我们看看imageFilters提供的ScaleFilter怎么完成这项工作。首先了解怎么调用过滤器,实例代码如下:?public void imageScale(String fromPath, String toPath, int width, int height) throws IOException { // 定义“缩放过滤器” ScaleFilter scaleFilter = new ScaleFilter(width, height); BufferedImage fromImage = ImageIO.read(new File(fromPath)); / 阅读全文
posted @ 2013-06-15 19:18 k2013 阅读(199) 评论(0) 推荐(0) 编辑
摘要: Java Image Filters 是由 Jhlabs 开发的一组用来处理 Java 图像的类库,提供各种常用的图像处理效果,例如反转色、扭曲、水波纹、凹凸、黑白效果等等数十种效果,如下图所示:Color Adjustment FiltersChannelMixFilter- Mixes the RGB channelsContrastFilter- Adjusts brightness and contrastCurvesFilter- Apply adjustment curves to an imageDiffusionFilter- Error-diffusion dithering 阅读全文
posted @ 2013-06-15 19:17 k2013 阅读(693) 评论(0) 推荐(0) 编辑
摘要: 一、用imagemagic对图片进行预处理,以提高识别率convert -compress none -depth 8 -alpha off -crop 112x15+0+1 -monochrome ./1.png ./1.tif 1.-compress none,必选参数.必须在无压缩模式下进行,否则tesseract可能不接受图片。 2.-depth 8,可选参数。加上据说可以提高识别率。 3.-alpha off,可选参数。加上据说可以提高识别率。 4.-crop ... 可选参数。用来裁掉图片的空白区域和下划线。具体格式为:width x height + x + y,按照矩形... 阅读全文
posted @ 2013-06-15 03:44 k2013 阅读(671) 评论(0) 推荐(0) 编辑