DeepCreamPy/results/make_results.py
2018-02-09 17:52:53 -05:00

11 lines
239 B
Python

import cv2
import glob
paths = glob.glob('../src/test/a/*')
paths.sort()
for i, path in enumerate(paths):
x = cv2.imread(path)
x = x[160:340, 70:585, :]
dst = './{}.jpg'.format("{0:03d}".format(i + 1))
cv2.imwrite(dst, x)