当前位置:网站首页>图像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")
边栏推荐
猜你喜欢

sklearn中的pipeline机制

Introduction of linear regression 01 - API use cases

【go语言入门笔记】12、指针

剑指 Offer 2022/7/3

Jupyter Notebook installed library;ModuleNotFoundError: No module named 'plotly' solution.

NFT市场开源系统

【CV-Learning】Object Detection & Instance Segmentation

【深度学习21天学习挑战赛】2、复杂样本分类识别——卷积神经网络(CNN)服装图像分类

flink-sql大量使用案例

(十)树的基础部分(一)
随机推荐
Th in thymeleaf: href use notes
NFT市场可二开开源系统
SQL练习 2022/6/30
剑指 Offer 2022/7/4
[Introduction to go language] 12. Pointer
postgres 递归查询
WARNING: sql version 9.2, server version 11.0.Some psql features might not work.
postgresql 事务隔离级别与锁
Introduction of linear regression 01 - API use cases
剑指 Offer 2022/7/3
Dictionary feature extraction, text feature extraction.
JPEG2jpg
AIDL communication between two APPs
The difference between oracle temporary table and pg temporary table
flink onTimer定时器实现定时需求
Briefly say Q-Q map; stats.probplot (QQ map)
Learning curve learning_curve function in sklearn
MySql--存储引擎以及索引
Jupyter Notebook installed library;ModuleNotFoundError: No module named 'plotly' solution.
ReentrantLock(公平锁、非公平锁)可重入锁原理