Has anyone here dealt with libanpr? it's a library for automatic vehicle plate recognition. I tried to compile it, but I had a lot of errors that I can't resolve them. I don't find even one page of documentation! can some one help?
Edited:
Solution.
I could not compile it under Linux, but under windows I did. Now my problem is that there are neither documentations nor discussion about this library!. I tried the next code, but upon execution it crashes, where when I debug (step by step), the code works, but I can't work with this way to get the results. I can't manipulate over the code because we have no idea about any class or any function!!
Is there someone interested to share me to find a solution ??
#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");
}
}
What a waste of time! this library is not complete, I could compile it, after a tough debugging, OCR, the very important part, is removed !! I don't suggest anybody to loose his energy with it.