`COLOR_BGR2GRAY` is a constant in the `cv` namespace. Since this sample does not use `using`, you need a `cv::` prefix.