import cv2
import glob
import numpy as np
print("Dude Test me \n")
sample_folder=input("Enter the image containg folder you want to test : ")
sample_image=input("Enter image name(number) : ")
print(str(sample_image)+'.png')
for i in glob.glob('E:\dataset\TRAINING DATA\small\a\str(sample_image)+'.png''):
img1=cv2.imread(i)
b,g,r=cv2.split(img1)
red_value1=np.array(r)
dup_input_vector1=red_value1.reshape(7990,1)
dup_input_vector1[dup_input_vector1==255]=1
print(dup_input_vector1.shape)
我是否正确使用了str()函数?..如果我将输入图像设为2 ..它应该取2.png图像并单独打印其红色值..帮助我..