(self, img_path)
| 585 | pass |
| 586 | |
| 587 | def __call__(self, img_path): |
| 588 | if py_version == 2: |
| 589 | fin = open(img_path) |
| 590 | else: |
| 591 | fin = open(img_path, "rb") |
| 592 | sample = fin.read() |
| 593 | data = np.fromstring(sample, np.uint8) |
| 594 | img = cv2.imdecode(data, cv2.IMREAD_COLOR) |
| 595 | ''' |
| 596 | img = cv2.imread(img_path, -1) |
| 597 | channels = img.shape[2] |
| 598 | ori_h = img.shape[0] |
| 599 | ori_w = img.shape[1] |
| 600 | ''' |
| 601 | return img |
| 602 | |
| 603 | def __repr__(self): |
| 604 | return self.__class__.__name__ + "()" |