I have updated emgu from 4.1 to 4.4.0.4099 in c# .netframework. I have a BitMap image where the image contains a border. I am not getting the empty result from it (it was working in older version emgu 4.1). I am not getting what I need to change to work it.
Attached sample file:
string filePath = @"C:\Users\Testing\Desktop\AI Image\3.PNG";
string Save=(@"C:\Users\Testing\Desktop\AI Image\Vikas1.png");
Bitmap imageBmp = new Bitmap(filePath);
var tesseract = new Tesseract(@"D:\\Model\OCR\English\", "eng", OcrEngineMode.TesseractLstmCombined);
{
// Load the image
//using (Image<Gray, byte> img = imageBmp.ToImage<Gray, byte>())
using (var img = new UMat(filePath, ImreadModes.Grayscale))
{
img.Save(Save);
// Set the image for Tesseract
tesseract.SetImage(img);
// Perform OCR
tesseract.Recognize();
// Retrieve the detected text
string ocrText = tesseract.GetUTF8Text();
// Print the OCR result
Console.WriteLine("Detected text: " + ocrText);
}
}
