(self, screenshot)
| 2323 | result = self._service.readtext(image) |
| 2324 | return result |
| 2325 | def ocr(self, screenshot): |
| 2326 | img = screenshot.getvalue() |
| 2327 | result = self._ocr(img) or [] |
| 2328 | output = [self.format(*n) for n in result] |
| 2329 | return output |
| 2330 | def format(self, box, text, confidence): |
| 2331 | bound = Bound() |
| 2332 | bound.left = int(min(p[0] for p in box)) |