【问题标题】:libanpr non-documented library for vehicle plate recognition用于车牌识别的 libanpr 非文档库
【发布时间】:2013-09-25 07:52:09
【问题描述】:

这里有人处理过libanpr吗? 这是一个用于自动车牌识别的库。 我试图编译它,但我有很多我无法解决的错误。我什至找不到一页文档! 有人可以帮忙吗?

已编辑:

解决方案。

我在Linux下无法编译它,但在windows下我可以。 现在我的问题是关于这个库既没有文档也没有讨论!我尝试了下一个代码,但在执行时它崩溃了,当我调试(逐步)时,代码可以工作,但我不能用这种方式来获得结果。 我无法操作代码,因为我们不知道任何类或任何函数!!

有没有人有兴趣与我分享以找到解决方案??

#include "../source/AvcodecImgSrc.h"
#include "../locate/CarLocate.h"
#include "../plate/PlateCut.h"
#include "../ocr/PlateOcr.h"
#include "../exception/Exception.h"

static void show(const std::vector<OcrData>& plates) {
for (int i=0;i<plates.size();i++)
printf("%s\n", plates[i].getPlate().c_str());

}

int main(int argc, const char* argv[]) {
      try {
         AvcodecImgSrc src(argv[1], 400, 3450);
         CarLocate car(2048/4, 1536/4, 8, 5);
         PlateCut plate;
    PlateOcr ocr;
    while (src.hasNext()) {
      NTCImg img = src.next();
      int w = img.dimx();
      int h = img.dimy();
      int w2 = w/2;
      int h2 = h/2;
      NTCImg img2 = img.getScale(w2, h2);
      int w4 = w/4;
      int h4 = h/4;
      NTCImg img4g = img.getScaleG(w4, h4);
      std::vector<CarData> cars = car.locate(img4g);
      for (int i=0;i<cars.size();i++) {
        printf("CAR[%dx%d]!\n", cars[i].getRect().getWidth(), cars[i].getRect().getHeight());
      }
      std::vector<PlateData> plates = plate.cut(img2, CarData::scale2(cars));
      for (int i=0;i<plates.size();i++) {
        printf("PLATE[%dx%d]!\n", plates[i].getRect().getWidth(), plates[i].getRect().getHeight());
      }
      //show(ocr.run(plate.cut(cars)));
    }
  } catch (const Exception& ex) {
    printf("Exception: %s\n", ex.getMsg().c_str());
  } catch (const Err& err) {
    printf("Err!\n");
  }
}

【问题讨论】:

  • 这个库已经 3 年了?
  • 是的,但自 2013-04-19 起更新

标签: image-processing anpr


【解决方案1】:

真是浪费时间! 这个库不完整,我可以编译它,经过艰苦的调试,OCR,非常重要的部分,被删除了!! 我不建议任何人因此而失去精力。

【讨论】:

    【解决方案2】:

    查看 OpenALPR (http://www.openalpr.com)。它是一个用 C++ 编写的完整的开源车牌识别库。编译也相当简单。

    【讨论】:

      猜你喜欢
      • 2013-05-11
      • 1970-01-01
      • 1970-01-01
      • 2013-10-16
      • 2016-11-03
      • 2014-11-04
      • 2014-12-31
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多