Guest User

Untitled

a guest
Dec 19th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.46 KB | None | 0 0
  1. pathC = './cityscape/'
  2. dirs = os.listdir(pathC)
  3.  
  4. #Resize para o pathC np.array
  5.  
  6. def resize():
  7. path = pathC
  8. os.path.exists(path)
  9. orig = cv2.imread('./cityscape/')
  10. for img in dirs:
  11. if os.path.isfile(path+img):
  12. img = cv2.imread(path+img)
  13. img2 = np.array(cv2.resize(img,(512,512)))
  14. gray = cv2.cvtColor(img, cv2.COLOR_BRG2GRAY)
  15.  
  16. resize()
  17.  
  18. AttributeError: module 'cv2.cv2' has no attribute 'COLOR_BRG2GRAY'
Add Comment
Please, Sign In to add comment