LEADTOOLS Support
General
General Questions
OCR Music Sheets results in garbled gook
#1
Posted
:
Wednesday, October 20, 2021 10:31:36 PM(UTC)
Groups: Registered
Posts: 2
I scanned a 152 page music book and I'd like to OCR it so it would be searchable but what I'm getting is all garbled looking. I don't even know what I'm seeing. The original is very nice and high quality.
#2
Posted
:
Thursday, October 21, 2021 8:24:42 AM(UTC)
Groups: Registered, Tech Support, Administrators
Posts: 105
Was thanked: 3 time(s) in 3 post(s)
Hello Dave,
My name is Matt and I am a member of the LEADTOOLS Support Team.
I will be happy to assist you with any questions your may have.
I am unaware of the code that you are using to convert your images to PDF, but from your description and the image provided it looks like for your use-case, you will need to set the ImageOverText property to true. ImageOverText adds a raster image overlay to the top of each pages in the resulting document. In your case the output PDF represents how the OCR Engine sees the document.
https://www.leadtools.co...tions-imageovertext.htmlCode:
using (IOcrEngine ocrEngine = OcrEngineManager.CreateEngine(OcrEngineType.LEAD))
{
//Startup the LEADTOOLS OCR Engine
ocrEngine.Startup(null, null, null, null);
PdfDocumentOptions _pdfOptions = ocrEngine.DocumentWriterInstance.GetOptions(DocumentFormat.Pdf) as PdfDocumentOptions;
_pdfOptions.ImageOverText = true;
ocrEngine.DocumentWriterInstance.SetOptions(DocumentFormat.Pdf, _pdfOptions);
//Run the AutoRecognizeManager and specify PDF format
ocrEngine.AutoRecognizeManager.Run(inputFile, outputFile, DocumentFormat.Pdf, null, null);
Console.WriteLine($"OCR output saved to {outputFile}");
}
If you have any further questions please feel free to reach back out to us.
Thanks,
Matt Bresson
Developer Support Engineer
LEAD Technologies, Inc.
#3
Posted
:
Thursday, October 21, 2021 8:30:58 AM(UTC)
Groups: Registered
Posts: 2
That did the trick! Thank you very much.
LEADTOOLS Support
General
General Questions
OCR Music Sheets results in garbled gook
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.