(self, box, text, confidence)
| 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)) |
| 2333 | bound.top = int(min(p[1] for p in box)) |
| 2334 | bound.bottom = int(max(p[1] for p in box)) |
| 2335 | bound.right = int(max(p[0] for p in box)) |
| 2336 | info = dict(text=text, confidence=confidence, |
| 2337 | bound=bound) |
| 2338 | return info |
| 2339 | |
| 2340 | |
| 2341 | class Device(object): |
no outgoing calls
no test coverage detected