当前位置:网站首页>图像resize
图像resize
2022-08-04 05:29:00 【CV小Rookie】
import cv2
import os
# 读取函数,用来读取文件夹中的所有函数,输入参数是文件名
def read_directory(directory_name):
for filename in os.listdir(directory_name):
print(filename)
if "DS_Store" in filename:
continue
img = cv2.imread(directory_name + "/" + filename)
img = cv2.resize(img,(512,512))
filename = directory_name + "/" + filename
cv2.imwrite(filename,img)
# cv2.imshow(filename, img)
# cv2.waitKey(0)
read_directory("./nolight")
边栏推荐
猜你喜欢
Introduction of linear regression 01 - API use cases
Kubernetes基础入门(完整版)
超详细MySQL总结
逻辑回归---简介、API简介、案例:癌症分类预测、分类评估法以及ROC曲线和AUC指标
flink on yarn任务迁移
sklearn中的pipeline机制
动手学深度学习__张量
Vision Transformer 论文 + 详解( ViT )
【CV-Learning】语义分割
TensorFlow2 study notes: 6. Overfitting and underfitting, and their mitigation solutions
随机推荐
安装dlib踩坑记录,报错:WARNING: pip is configured with locations that require TLS/SSL
WARNING: sql version 9.2, server version 11.0.Some psql features might not work.
两个APP进行AIDL通信
Jupyter Notebook installed library;ModuleNotFoundError: No module named 'plotly' solution.
Linear Regression 02---Boston Housing Price Prediction
thymeleaf中 th:href使用笔记
k9s-终端UI工具
二月、三月校招面试复盘总结(二)
剑指 Offer 2022/7/11
postgres recursive query
k3s-轻量级Kubernetes
【深度学习21天学习挑战赛】备忘篇:我们的神经网模型到底长啥样?——model.summary()详解
【CV-Learning】线性分类器(SVM基础)
Vision Transformer 论文 + 详解( ViT )
flink-sql所有表格式format
SQL的性能分析、优化
(五)栈及其应用
剑指 Offer 2022/7/4
flink-sql查询配置与性能优化参数详解
【go语言入门笔记】12、指针