Receipt clip contains structured background:
Tried to remove it using textcleaner ImageMagic wrapper script from Remove receipt image border using ImageMagick answer. Used code from answer How to use imagemagick.net in .net ? :
var proc = new Process
{
StartInfo = new ProcessStartInfo
{
FileName = "textcleaner.sh",
Arguments = "-f 20 -o 10 -e normalize krooningtaust.jpg result.jpg",
UseShellExecute = true,
RedirectStandardError = true,
CreateNoWindow = true
}
};
proc.Start();
string error = proc.StandardError.ReadToEnd();
proc.WaitForExit();
In result background still exists and tesseract Single Block Page segmentation mode does not recognize text:
How to remove background fully using C# .NET 9 or force Tesseract Single Block PSM mode do recognize text from it?
It looks like text is converted to blue color. How to remove all non- blue pixels or force Tesseract to use only blue for OCR ?




