Leptonica

Leptonica is a pedagogically-oriented open source site containing software that is broadly useful for image processing and image analysis applications.

http://www.leptonica.com/

Featured operations are

  • Rasterop (a.k.a. bitblt)
  • Affine transformations (scaling, translation, rotation, shear) on images of arbitrary pixel depth
  • Binary and grayscale morphology, rank order, and convolution
  • Seedfill and connected components
  • Image transformations combining changes in scale and pixel depth
  • Pixelwise masking, blending, enhancement, arithmetic ops, etc.

Ancillary operations include

  • I/O for standard image formats
  • Utilities to handle arrays of image-related data types
  • Utilities for generic stacks, queues, heaps and lists; and for byte queues and arrays of numbers and strings

Example applications include

  • Octcube-based color quantization, with and without dithering
  • Modified median-cut color quantization, with and without dithering
  • Skew determination of text images
  • Segmentation of page images with mixed text and images
  • jbig2 unsupervised classifier
  • Border representations of 1 bit/pixel images and raster conversion for SVG
  • PostScript generation (levels 1, 2, 3) of images for device-independent output
  • PDF generation (levels 1, 2) of images for device-independent output
  • Dewarping images of text taken with a camera
  • Rendering text on an image
  • Connectivity-preserving thinning and thickening of 1 bit/pixel images
  • Line removal from a grayscale sketch
  • Search for least-cost paths on binary and grayscale images

————————————————————————————————————————————————————————

最近做个图像识别的东西,需要将图片中的文字识别出来。

使用tesseract ORC,又发现tesseract ORC依赖leptonica,于是,干脆把leptonica也弄弄好了。

http://www.leptonica.com/
可以下载:
        leptonica-1.68.tar.gz  //源码 linux
        vs2008-1.68.zip  ///源码 Windows vs2008

leptonica-1.68-win32-lib-include-dirs.zip  //头文件和lib

安装gnuplot
        环境变量PATH加入 C:\gnuplot\bin(安装路径\bin,可能也是binary)
        创建新环境变量GDFONTPATH 值为C:\WINDOWS\Fonts
        创建新环境变量GNUPLOT_FONTPATH值为C:\WINDOWS\Fonts

安装IrfanView
        环境变量PATH加入C:\Program Files\IrfanView (安装路径)

解压 leptonica-1.68-win32-lib-include-dirs.zip  //头文件和lib

环境变量PATH加入D:\share\leptonica-1.68\lib (解压路径), 这里如果不加的话,需要将dll放到你的工程目录下。因为运行过程中需要调用liblept168.dll这个动态链接库。否刚的话,肯定会报这个“liblept168.dll找不到”的。

xxx..vcproj 同一个目录

新建一个工程,设置Include files路径和lib库路径

即你解压后的Include

        

导入lib库

建立link到leptonica的新的空工程,工程配置里linker->input里加入leptonica的lib

link动态库的release版:leptonlib168.dll
                ink动态库的debug版:leptonlib168d.dll(168是版本号)
                link静态库的release版:
                giflib$(GIFLIB_VERSION)-static-mtdll.lib
                        libjpeg$(LIBJPEG_VERSION)-static-mtdll.lib
                        libpng$(LIBPNG_VERSION)-static-mtdll.lib
                        libtiff$(LIBTIFF_VERSION)-static-mtdll.lib
                        zlib$(ZLIB_VERSION)-static-mtdll.lib
                        liblept$(LIBLEPT_VERSION)-static-mtdll.lib
                link静态库的debug版:

......

如果你找不到GIFLIB_VERSION 类似这些变量的话,写死也行的。就是解压的那些库

giflib416-static-mtdll.lib

giflib416-static-mtdll-debug.lib
                        libjpeg8c-static-mtdll.lib
                        libjpeg8c-static-mtdll-debug.lib
                        libpng143-static-mtdll.lib
                        libpng143-static-mtdll-debug.lib
                        libtiff394-static-mtdll.lib
                        libtiff394-static-mtdll-debug.lib
                        zlib125-static-mtdll.lib
                        zlib125-static-mtdll-debug.lib
                        liblept168.lib
                        liblept168d.lib

相对来说代码都相当简单了。

// my-leptonica.cpp : Defines the entry point for the console application.
// #include "stdafx.h" #include <allheaders.h> int _tmain(int argc, _TCHAR* argv[])
{
PIX *pixs, *pixt1, *pixt2;
pixs = pixRead("..\\..\\test\\test.bmp");
pixDisplayWithTitle(pixs, 700, 500, NULL, 1);
pixDestroy(&pixs);
return 0;
}

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
以后的笔记潇汀会尽量详细讲解一些相关知识的,希望大家继续关注我的博客。
本节笔记到这里就结束了。

潇汀一有时间就会把自己的学习心得,觉得比较好的知识点写出来和大家一起分享。
编程开发的路很长很长,非常希望能和大家一起交流,共同学习,共同进步。
如果文章中有什么疏漏的地方,也请大家指正。也希望大家可以多留言来和我探讨编程相关的问题。
最后,谢谢你们一直的支持~~~

C++完整个代码示例(代码在VS2005下测试可运行)

【图像识别】 图像处理和图像分析(leptonica)leptonica-1.68安装配置 (vs2008)的更多相关文章

  1. 【转】vs2008中leptonica-1.68安装配置

    tesseract ocr挺不好配置的,找到一篇不错的文章,分享如下:http://hi.baidu.com/ever8936/blog/item/6998e1196b1d0161dab4bd8f.h ...

  2. leptonica 学习笔记1

    Updated: April 26, 2015 Leptonica is a pedagogically-oriented open source site containing software t ...

  3. Leptonica在VS2010中的编译及简单使用举例

    在tesseract-ocr中会用到leptonica库.这里对leptonica简介下. Leptonica是一个开源的图像处理和图像分析库,它的license是BSD 2-clause.它主要包括 ...

  4. C&C++图形图像处理开源库

    Google三维APIO3D O3D 是一个开源的 WebAPI 用来在浏览器上创建界面丰富的交互式的 3D 应用程序.这是一种基于网页的可控3D标准.此格式期望真正的基于浏览器,独立于操作系统之外, ...

  5. Atitti 图像处理 特征提取的科技树 attilax总结

    Atitti 图像处理 特征提取的科技树 attilax总结 理论 数学,信号处理,图像,计算机视觉 图像处理 滤波 图像处理 颜色转换 图像处理 压缩编码 图像处理 增强 图像处理 去模糊 图像处理 ...

  6. 《HALCON数字图像处理》第一、二章笔记

    目录 第一章 绪论 1.1 图像和图像处理 1.1.1 图像 1.1.2 数字图像 1.1.3 图像处理及其发展过程 1.2 数字图像处理的步骤和方法 1.3 数字图像处理系统的硬件组成 1.4 数字 ...

  7. (1综述)从零开始的嵌入式图像图像处理(PI+QT+OpenCV)实战演练

    从零开始的嵌入式图像图像处理(PI+QT+OpenCV)实战演练 1综述http://www.cnblogs.com/jsxyhelu/p/7907241.html2环境架设http://www.cn ...

  8. (2环境架设)从零开始的嵌入式图像图像处理(PI+QT+OpenCV)实战演练

    从零开始的嵌入式图像图像处理(PI+QT+OpenCV)实战演练 1综述http://www.cnblogs.com/jsxyhelu/p/7907241.html2环境架设http://www.cn ...

  9. (3两个例子)从零开始的嵌入式图像图像处理(PI+QT+OpenCV)实战演练

    从零开始的嵌入式图像图像处理(PI+QT+OpenCV)实战演练 1综述http://www.cnblogs.com/jsxyhelu/p/7907241.html2环境架设http://www.cn ...

随机推荐

  1. Eclipse快捷键 10个最有用的快捷键(转载)

    现在很多开发人员都在用eclipse.用开发工具,就是为了方便,方便你开发你的软件,方便你管理你的工程,而开发工具提供各种功能大部分会有对应的快捷键,下面就列出了eclipse的快捷键.   Ecli ...

  2. ubuntu卸载vmware

    下面方法摘抄网上方法,经过证实好使 lsmod——显示已载入系统的模块 ps aux : 显示其他用户启动的进程(a)   查看系统中属于自己的进程(x)         启动这个进程的用户和它启动的 ...

  3. Content Providers的步骤,来自官网文档

    Content Providers In this document Content provider basics Querying a content provider Modifying dat ...

  4. CentOS6.5下VNC Server远程桌面配置详解

    参考文献: (总结)CentOS Linux下VNC Server远程桌面配置详解 远程桌面连接工具VNC——license Key 我的下载地址为 太平洋下载 VNC连接黑屏的问题 centos 6 ...

  5. 我的Python成长之路---第三天---Python基础(10)---2016年1月16日(雾霾)

    二.collections collections是对Python现有的数据类型的补充,在使用collections中的对象要先导入import collections模块 1.Counter——计数 ...

  6. Python 2.7 学习笔记 基本知识

    python是一种解释型的.面向对象的.带有动态语义的高级程序设计语言.本文介绍下python的基本知识. 一.安装 各种操作系统有自己的安装方法,linux系统一般都自带了python的环境.这里不 ...

  7. k路归并(败者树,记录败者)

          败者树在外排序中用到,每加入一个数字时,调整树需要o(lgk),比较快.外排序过程主要分为两个阶段:(1)初始化各归并段写入硬盘,初识化的方法,可利用内排序方法还可以一种叫置换选择排序的方 ...

  8. MySQL中关于日期、时间的数据类型和函数

    一.日期相关的数据类型 1.datetime 占用8字节,既显示了日期,又显示了时间.其表示的日期范围为“1000-01-01 00:00:00”到“9999-12-31 23:59:59” 2.da ...

  9. [置顶] T-sql sql server 设置主键约束、标示列、唯一约束、默认值、约束、创建表

    ----选择数据库 use ythome go ----查看表是否存在 if Exists ( select * from sysobjects where name='sys_menu' and t ...

  10. Android上成功实现了蓝牙的一些Profile

    前段时间做蓝牙方面的开发,Google的Android只实现了Handset/Handfree和A2DP/AVRCP等Profile,而其 它常用的Profile如HID/DUN/SPP/OPP/FT ...