-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Description
Dear Team,
OCR reader(text recognizer) is working fine in english language but not recognized in tamil language may be some of the other languages also not working.
How to solve this issue. please provide the solution.
My code is:
private fun recognizeText(image: InputImage) {
val recognizer = TextRecognition.getClient()
val identification = LanguageIdentification.getClient()
val result = recognizer.process(image)
.addOnSuccessListener { visionText: Text ->
processTextBlock(visionText)
Log.e(TAG, "Success")
}
.addOnFailureListener { e ->
Log.e(TAG, "${e.message}")
}}
private fun processTextBlock(result: Text) {
val resultText = result.text
var lineText: String = ""
for (block in result.textBlocks) {
val blockText = block.text
Log.e("Block text", "$blockText")
for (line in block.lines) {
lineText = lineText + "\n" + line.text
Log.e("Line text", "$lineText")
}
}
}
Metadata
Metadata
Assignees
Labels
No labels