EasyPR Linux测试

EasyPR在Ubuntu14.04上进行了编译,遇到了几个问题记录一下。

  1. 由于OpenCV 3.0与2.x不兼容,现在版本的EasyPR还只兼容OpenCV 2.x。

  2. 源文件使用的是GBK编码,而在Linux下默认是UTF-8的编码,默认编译出的可执行文件会出现中文乱码。我采用的解决办法是将源码文件进行编码转换,然后再进行编译。

cd test
mv main.cpp main_gbk.cpp
iconv -f gbk -t utf8 main_gbk.cpp > main.cpp
cd ../src/core
mv chars_identify.cpp chars_identify_gbk.cpp
iconv -f gbk -t utf8 chars_identify_gbk.cpp > chars_identify.cpp

  3. test_plate_locate报错

test_plate_locate
OpenCV Error: Unspecified error (The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script) in cvShowImage, file /opencv-2.4.11/modules/highgui/src/window.cpp, line 501
terminate called after throwing an instance of 'cv::Exception'
  what():  /opencv-2.4.11/modules/highgui/src/window.cpp:501: error: (-2) The function is not implemented. Rebuild the library with Windows, GTK+ 2.x or Carbon support. If you are on Ubuntu or Debian, install libgtk2.0-dev and pkg-config, then re-run cmake or configure script in function cvShowImage

apt-get install libgtk2.0-dev

cd /opencv-2.4.11/

cmake

make

make install

已放弃 (核心已转储)

后面有问题再更新。

你可能感兴趣的:(EasyPR Linux测试)