First time here? Check out the FAQ!
answered 2020-11-21 09:49:33 -0600
your image was not loaded (and thus you feed an empty image into cvtColor(),
you MUST CHECK the result of imshow() before proceeding !!!
(and seriously, that must be the 5000th time we answer this question here....)