1
I am resizing images from a folder and am encountering the following error: module 'cv2.cv2' has no attribute 'COLOR_BRG2GRAY' Code:
pathC = './cityscape/'
dirs = os.listdir(pathC)
#Resize para o pathC np.array
def resize():
    path = pathC
    os.path.exists(path)
    orig = cv2.imread('./cityscape/')
    for img in dirs:
        if os.path.isfile(path+img):
            img = cv2.imread(path+img)
            img2 = np.array(cv2.resize(img,(512,512)))
            gray = cv2.cvtColor(img, cv2.COLOR_BRG2GRAY)
resize()
Error:
AttributeError: module 'cv2.cv2' has no attribute 'COLOR_BRG2GRAY'
Later I noticed that I had changed the letters when writing with the prey, thank you.
– DidiMaster
It really happens. hehe
– Marcos Pinho