mirror of
https://github.com/Deepshift/DeepCreamPy.git
synced 2024-11-28 20:09:58 +00:00
11 lines
239 B
Python
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)
|