当前位置:网站首页>利用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
边栏推荐
猜你喜欢
本地yum源搭建
SSL证书为什么要选付费?
Django QuerySet.order_by() SQL注入漏洞复现
(3) Software testing theory (understanding the knowledge of software defects)
Slurm基本使用
ssh中的密码登录和密钥登录
SECURITY DAY06 ( iptables firewall, filter table control, extended matching, typical application of nat table)
SSH服务详解
FusionCompute8.0.0实验(0)CNA及VRM安装(2280v2)
实操指南:多个域名该买哪种SSL证书?
随机推荐
MoreFileRename批量文件改名工具
xx is not recognized as internal or external command
Memory debugging tools Electric Fence
CLUSTER DAY03( Ceph概述 、 部署Ceph集群 、 Ceph块存储)
Threatless Technology-TVD Daily Vulnerability Intelligence-2022-7-28
处理eking.Devos勒索病毒防范解密恢复操作攻略
软件使用代码签名证书的好处和必要性
网络安全学习小结--kali基本工具、webshell、代码审计
MoreFileRename batch file renaming tool
不同类型SSL证书怎么选?
Project Notes - Take Notes
SSL证书为什么要选付费?
Threatless Technology-TVD Daily Vulnerability Intelligence-2022-8-1
SECURITY DAY01 (Monitoring Overview, Zabbix Basics, Zabbix Monitoring Services)
AUTOMATION DAY07( Ansible Vault 、 普通用户使用ansible)
ETCD容器化搭建集群
SSL证书部署后,为什么还是显示不安全?
Apache Flink jobmanager/logs 目录穿越漏洞复现
胖鸟博客之勒索病毒紧急处理文件恢复及防范方案
vulnhub靶机--6Day_Lab-v1.0.1