if __name__ =="__main__":
img_path=r"./smoke/allsmoke/image_3.jpg"
#img_path='./data/imagePart_train/smoke/allsmoke/image_3.jpg'
img = cv2.imread(img_path)
print(img.shape)
f=getFeature(img, 5)
print(f)
问题1: print(img.shape)
AttributeError: 'NoneType' object has no attribute 'shape'
解决方案:把img_path的路径写全,或者好好检查该路径下是否有图像