当前位置:网站首页>利用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 DAY03 (Ceph overview, the deployment of Ceph CLUSTER, Ceph block storage)
- 中小微企业需要使用SSL证书吗?
- MoreFileRename batch file renaming tool
- Msfvenom生成后门及运用
- SSH服务详解
- AUTOMATION DAY07 (Ansible Vault, ordinary users use ansible)
- No threat of science and technology - TVD vulnerability information daily - 2022-7-21
- CLUSTER DAY02 (Keepalived Hot Standby, Keepalived+LVS, HAProxy Server)
- GoAhead Server 环境变量注入(CVE-2021-42342)漏洞复现
- Threatless Technology-TVD Daily Vulnerability Intelligence-2022-7-28
猜你喜欢
随机推荐
MoreFileRename batch file renaming tool
SSL证书部署后,为什么还是显示不安全?
无胁科技-TVD每日漏洞情报-2022-7-28
Threatless Technology-TVD Daily Vulnerability Intelligence-2022-7-25
【LeetCode】2034. 股票价格波动(思路+题解)双map
vnc远程桌面安装(2021-10-20日亲测可用)
Threatless Technology-TVD Daily Vulnerability Intelligence-2022-7-19
处理eking.Devos勒索病毒防范解密恢复操作攻略
无胁科技-TVD每日漏洞情报-2022-7-30
中小微企业需要使用SSL证书吗?
FusionCompute8.0.0 实验(2)虚拟机创建
SSH服务详解
ETCD容器化搭建集群
2022年全国职业技能大赛网络安全竞赛试题B模块自己解析思路(2)
buildroot setup dhcp
Vulnhub靶机--DC7
Vulnhub靶机--Chronos
勒索病毒eking.devos.mkp.makop.lockbit.eight.locked.roger等剖析及中毒文件恢复
内存调试工具Electric Fence
AUTOMATION DAY07( Ansible Vault 、 普通用户使用ansible)