leptonica使用问题

想要使用leptonica编写一个图像处理程序,或者调用leptonica/prog下例子程序,出现类似错误:

leptTest  ./test
Error in pixReadStreamJpeg: function not present
Error in pixReadStream: jpeg: no pix returned
Error in pixRead: pix not read
Error in pixGetDimensions: pix not defined
Error in pixSaveTiledOutline: pixs not defined
Error in pixContrastNorm: pixs undefined or not 8 bpp
Time: Contrast norm:   0.000 Mpix/sec
Error in pixSaveTiledOutline: pixs not defined
Error in pixWrite: pix not defined

重新执行./configure,发现

checking for png_read_png in -lpng... no
checking for jpeg_read_scanlines in -ljpeg... no
checking for DGifOpenFileHandle in -lgif... no
checking for TIFFOpen in -ltiff... no
checking for WebPGetInfo in -lwebp... no
checking for opj_create_decompress in -lopenjp2... no

解决办法,

./configure LDFLAGS=-L/usr/local/lib/ CFLAGS=-I/usr/local/include/

这时就会显示

checking for png_read_png in -lpng... yes
checking for jpeg_read_scanlines in -ljpeg... yes
checking for DGifOpenFileHandle in -lgif... no
checking for TIFFOpen in -ltiff... yes

 

posted on 2016-01-21 10:37  cv_ml_张欣男  阅读(2137)  评论(0编辑  收藏  举报

导航