Hi All,
I am trying to detect the numeric values from the digital display LED/LCD(Remote and other devices). Integrated the tesseract along with GPUImage and used the trained data. But it's not giving a proper result. Integration using Swift(iOS).
Here is the code:
let tesseract: G8Tesseract = G8Tesseract(language: "eng")!
Current Behavior
Hi All, I am trying to detect the numeric values from the digital display LED/LCD(Remote and other devices). Integrated the tesseract along with GPUImage and used the trained data. But it's not giving a proper result. Integration using Swift(iOS).
Here is the code:
let tesseract: G8Tesseract = G8Tesseract(language: "eng")!
tesseract.delegate = self
tesseract.charWhitelist = "0123456789:"
tesseract.charBlacklist = "abcdefghijklmnopqrstuvwxyz_+-=/?.,><()*&^%$#@!:;"
let imageCheck = UIImage(named: "remote1.jpg")//Sample image, but we need to capture the image from camera then used it
let scaledImage = newImage?.scaledImage(1000) let preprocessedImage = scaledImage?.preprocessedImage() ?? scaledImage if let tesseract = G8Tesseract(language: "eng") { tesseract.engineMode = .tesseractOnly tesseract.pageSegmentationMode = .auto //Auto Adjustment to Input Image var inputImage = CIImage(image: preprocessedImage!) let options:[CIImageAutoAdjustmentOption : AnyObject] = [.enhance:1 as AnyObject] let filters = inputImage!.autoAdjustmentFilters(options: options)
} Scaled image reference get from: https://www.kodeco.com/2010498-tesseract-ocr-tutorial-for-ios
O/P which is am getting: Optional(" 9 9\n 11593 7\n 1 80\n \n0\n5533\n\n")"
Expected Behavior
Expected Output: 25, 5:21
Suggested Fix
No response
tesseract -v
No response
Operating System
macOS 14 Sonoma
Other Operating System
No response
uname -a
No response
Compiler
No response
CPU
No response
Virtualization / Containers
No response
Other Information
Could you please anyone guide me to resolve this
Thanks!