当前位置:网站首页>利用opencv读取图片,重命名。
利用opencv读取图片,重命名。
2022-08-11 05:33:00 【我是无名的我】
# -*- coding: utf-8 -*-
""" Spyder Editor hgh """
import os
import cv2
path_img = r'/images'
dirs = os.listdir(path_img)
os.chdir(path_img)
try:
os.mkdir('rename')
except:
pass
count = 0
for img in dirs:
img = cv2.imread(img, 1)
Str = "%06d"% count
path = os.path.join('rename', Str + '.jpg')
cv2.imwrite(path, img)
count +=1
边栏推荐
猜你喜欢
随机推荐
CLUSTER DAY04(块存储应用案例 、 分布式文件系统 、 对象存储)
CLUSTER DAY04 (Block Storage Use Cases, Distributed File Systems, Object Storage)
企业怎样申请SSL证书?
VMware workstation 16 installation and configuration
CLUSTER DAY03 (Ceph overview, the deployment of Ceph CLUSTER, Ceph block storage)
vnc远程桌面安装(2021-10-20日亲测可用)
解决win10安装portal v13/v15要求反复重启问题。
内存调试工具Electric Fence
项目笔记——随机2
项目笔记——随记
window7开启远程桌面功能
无胁科技-TVD每日漏洞情报-2022-8-5
SECURITY DAY06 ( iptables firewall, filter table control, extended matching, typical application of nat table)
vnc remote desktop installation (available for personal testing on 2021-10-20)
Threatless Technology-TVD Daily Vulnerability Intelligence-2022-7-18
GoAhead Server 环境变量注入(CVE-2021-42342)漏洞复现
查看CPU和其他硬件温度的软件
Project Notes - Random 2
(二)软件测试理论(*重点用例方法编写)
mongo-express 远程代码执行漏洞复现