Nandhini
Nandhini

Reputation: 720

How to Capture/Text Recognize the Remote LED/LCD display characters in iOS Swift

Need to process the image, get the text from the Remote LED/LCD display Image. Tried a Vision Kit but as per this link:

https://developer.apple.com/forums/thread/651059?answerId=615679022#615679022

It's not possible to capture it.

enter image description here

enter image description here

Trained data using Tesseract.

So Tried the create a ML, not sure about which option need to check. Selected Object detection, its capture the remote area, But not able to get the text.

Integrated the Tesseract trained data for LCD/LED display(used the ssd.traineddata) but I am get the proper usage of ssd.traineddata.

Code using tesseract:

let tesseract: G8Tesseract = G8Tesseract(language: "eng")!

tesseract.delegate = self

tesseract.charWhitelist = "0123456789:"

let imageCheck = UIImage(named: "remote1.jpg")

let scaledImage = imageCheck?.scaledImage(1000)

let preprocessedImage = scaledImage?.preprocessedImage() ?? scaledImage

if let tesseract = G8Tesseract(language: "eng+fra") {

    tesseract.engineMode = .tesseractCubeCombined

    tesseract.pageSegmentationMode = .auto

    tesseract.image = preprocessedImage!

    tesseract.recognize()

    debugPrint("Text: \(String(describing: tesseract.recognizedText))")

}

Output:

"Text: Optional(\" \\n\\n \\n\\nSET\\nCLEAR y\\nTIME (t s! AICLEAN\\n\\n \\n\\n \\n\\n \\n\\n\")"

I need a LED/LCD display values: 18 / 12: 00

It's not detect the display text. Could you please any one let me know the process of using ssd.trainedata or using ML how to achieve it.

Thanks in advance.

Upvotes: 0

Views: 81

Answers (0)

Related Questions