我正在构建一个程序,通过扫描书名页并使用 OCR 来获取书的出版商……因为出版商总是在书名页的底部我认为检测由空格分隔的行是一种解决方案,但是我不知道如何测试。这是我的代码:
Dim builder As New StringBuilder()
Dim reader As New StringReader(txtOCR.Text)
Dim iCounter As Integer = 0
While True
Dim line As String = reader.ReadLine()
If line Is Nothing Then Exit While
'i want to put the condition here
End While
txtPublisher.Text = builder.ToString()