5

Using Vision. Is there a way to detect line breaks in VNRecognizeTextRequest?

This is a part of my code:

let text = observation.compactMap({
                $0.topCandidates(1).first?.string
            }).joined(separator: "\n")

the result of a multiline text ignores the real line breaks in the image. example:

enter image description here

Hassan Taleb
  • 2,350
  • 2
  • 19
  • 24

0 Answers0