DeepCreamPy/results/make_results.py

11 lines
239 B
Python
Raw Normal View History

2018-02-09 22:52:53 +00:00
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)