18 lines
480 B
Python
18 lines
480 B
Python
import os
|
|
import cv2
|
|
|
|
folder = "0_tmp_for_copy"
|
|
folder_out = "tmp_renamed"
|
|
filelist = os.listdir(folder)
|
|
print(len(filelist))
|
|
|
|
counter = 1
|
|
for i in range(835):
|
|
filename = folder + "/" + str(i).zfill(6) + ".png"
|
|
res = cv2.imread(filename)
|
|
print('saving to file: ', folder_out + "/" + str(counter + 834).zfill(6) + ".png")
|
|
cv2.imwrite(folder_out + "/" + str(counter + 834).zfill(6) + ".png", res)
|
|
cv2.imshow("out", res)
|
|
key = cv2.waitKey(1)
|
|
counter += 1
|