当前位置:网站首页>图像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")
边栏推荐
猜你喜欢
随机推荐
NFT市场以及如何打造一个NFT市场
Learning curve learning_curve function in sklearn
NFT市场可二开开源系统
win云服务器搭建个人博客失败记录(wordpress,wamp)
Kubernetes基本入门-名称空间资源(三)
postgres recursive query
NFT市场开源系统
【CV-Learning】Object Detection & Instance Segmentation
[Go language entry notes] 13. Structure (struct)
(TensorFlow)——tf.variable_scope和tf.name_scope详解
彻底搞懂箱形图分析
TensorFlow2学习笔记:7、优化器
【深度学习21天学习挑战赛】3、使用自制数据集——卷积神经网络(CNN)天气识别
flink-sql所有数据类型
[CV-Learning] Convolutional Neural Network Preliminary Knowledge
TensorFlow2学习笔记:4、第一个神经网模型,鸢尾花分类
TensorFlow:tf.ConfigProto()与Session
剑指 Offer 2022/7/2
剑指 Offer 2022/7/11
[Deep Learning 21 Days Learning Challenge] 1. My handwriting was successfully recognized by the model - CNN implements mnist handwritten digit recognition model study notes









