It is resolve it just issue of decoding. Thanks

On Thursday, 12 July 2018 18:45:51 UTC+5:30, mahendrag gajera wrote:
>
> Hello all
>
 

>
> I am try to ocr japanese images via below code. But it give junk character.
> My tesseract version is 4.0 
>
> Please let me know what is missing here.
>
> void Test(char* imagePath)
> {
> char *outText;
>
> tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();
> // Initialize tesseract-ocr with English, without specifying tessdata path
> if (api->Init("D:\\tessdata", "jpn", 
> tesseract::OcrEngineMode::OEM_TESSERACT_ONLY))
> {
> fprintf(stderr, "Could not initialize tesseract.\n");
> exit(1);
> }
>
> // Open input image with leptonica library
> Pix *image = pixRead(imagePath);
> api->SetImage(image);
> // Get OCR result
> outText = api->GetUTF8Text();
> printf("OCR output:\n%s", outText);
>
> // Destroy used object and release memory
> api->End();
> delete[] outText;
> pixDestroy(&image);
> }
>
> Using train data from here
>
> https://github.com/tesseract-ocr/tessdata
>
> Test data image
>
>
> <https://lh3.googleusercontent.com/-nn1FgPUWwZA/W0S_PJ_D8UI/AAAAAAAACaY/Y9Y6uByvN3kP1vN8tKFP8VMKlIwPIPwyACLcBGAs/s1600/japan4.png>
>
> Thanks,
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tesseract-ocr.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/a0cb0d94-7195-475a-b752-88e786f14691%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to