Image Processing: Extracting Grayscale Images for Analysis
data = []
# Iterate over each image in the dataframe
for index, row in df.iterrows():
filename = os.path.join(r'E:\Desktop Content\Project_IITB\submission\train_images', row['image_id'])
img = imread(filename)
# Convert image to grayscale
gray = rgb2gray(img)
原文地址: https://www.cveoy.top/t/topic/pGbi 著作权归作者所有。请勿转载和采集!