hello, I could help, I am new to "terrseract-OCR" I need to create a software to detect and read the license plates of cars. I am implementing the OCR with a project in OpenCV and C ++ but when I try to read the text of the plates car I can not make me read this correctly, and tried with language packs "eng" and "spa" on occasion I read all the text and at other times I ignored the text. I could advise on an algorithm for leectura plate cars with OpenCV and C++
after reading I pretengo opencv enter this code to link to a video reading. but I need help in an algorithm that reads correctly car plates
#include
#include
#include
using namespace cv;
using namespace tesseract;
int main()
{
char *outText;
TessBaseAPI *api = new TessBaseAPI();
// Inicializar tesseract para el lenguaje español
if (api->Init(NULL, "spa")) {
fprintf(stderr, "Error al inicializar.\n");
system("pause");
exit(1);
}
// Abrir la imagen leptonica library
Pix *image = pixRead("C:\\Sin título.png");
api->SetImage(image);
// Obtener el texto de la imagen
outText = api->GetUTF8Text();
printf("Texto leido: %s", outText);
// Liberar memoria
api->End();
//delete[] outText;
pixDestroy(&image);
system("pause");
return 0;
}
↧