14 lines
500 B
Python
Executable File
14 lines
500 B
Python
Executable File
import os
|
|
import cv2
|
|
|
|
root = "H:\\Fine-grained-identification\\2021.3.25\\image\\灰斑鸻"
|
|
def jpg(root):
|
|
filelist = os.listdir(root)
|
|
num = 6000
|
|
for file in filelist:
|
|
os.rename(os.path.join(root,file),os.path.join(root,file.replace(".png",".jpg")))
|
|
# img = cv2.imread(os.path.join("E:\\semi_dianli_image",file))
|
|
# img = cv2.resize(img,(1024,768))
|
|
#
|
|
# cv2.imwrite(os.path.join("E:\\semi_dianli_images","Hat{}.jpg".format(num)),img)
|
|
# num+=1 |